mqtt-cli icon indicating copy to clipboard operation
mqtt-cli copied to clipboard

username/password from config.properties ignored

Open strowi opened this issue 3 years ago • 0 comments

Expected behavior

mqtt test should succeed.

Actual behavior

mqtt test fails with login error.

To Reproduce

Steps

create $HOME/.mqtt-cli/config.properties:

mqtt.host=xyz
mqtt.port=8883
mqtt.version=5
auth.username=emqx123
auth.password=password

And run:

~> mqtt test
MQTT 3: NOT_AUTHORIZED
MQTT 5: NOT_AUTHORIZED

while the following works:

~> mqtt test -u emqx123 -pw password
MQTT 3: OK
	- Maximum topic length: 4096 bytes
	- QoS 0: Received 10/10 publishes in 27,38ms
....

Reproducer code

Details

  • Affected MQTT CLI version(s): 4.8.3, Picocli 4.6.2, JVM: 11.0.16 (Ubuntu OpenJDK 64-Bit Server VM 11.0.16+8-post-Ubuntu-0ubuntu122.04),OS: Linux 5.15.0-46-generic amd64

  • Used JVM version: 11.0.16 (Ubuntu OpenJDK 64-Bit Server VM 11.0.16+8-post-Ubuntu-0ubuntu122.04)

strowi avatar Sep 05 '22 09:09 strowi