You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anjas-MacBook-Pro:hivemq-cli ahelmbre$ java -jar build/libs/mqtt-cli-1.0.0.jar pub -pw test -u anja -t test -m ";2Cmessage" -i test -d
Client test: sending CONNECT
Client test: com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5DisconnectException: Exception while decoding CONNACK: remaining length too short
at com.hivemq.client.internal.mqtt.MqttBlockingClient.connect(MqttBlockingClient.java:91)
at com.hivemq.cli.mqtt.MqttClientExecutor.mqtt5Connect(MqttClientExecutor.java:79)
at com.hivemq.cli.mqtt.AbstractMqttClientExecutor.connectMqtt5Client(AbstractMqttClientExecutor.java:238)
at com.hivemq.cli.mqtt.AbstractMqttClientExecutor.connect(AbstractMqttClientExecutor.java:201)
at com.hivemq.cli.mqtt.MqttClientExecutor.connect(MqttClientExecutor.java:62)
at com.hivemq.cli.mqtt.AbstractMqttClientExecutor.getMqttClientFromCacheOrConnect(AbstractMqttClientExecutor.java:432)
at com.hivemq.cli.mqtt.AbstractMqttClientExecutor.publish(AbstractMqttClientExecutor.java:110)
at com.hivemq.cli.mqtt.MqttClientExecutor.publish(MqttClientExecutor.java:62)
at com.hivemq.cli.commands.cli.PublishCommand.run(PublishCommand.java:109)
at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
at picocli.CommandLine.execute(CommandLine.java:1864)
at com.hivemq.cli.MqttCLIMain.main(MqttCLIMain.java:72)
Caused by: com.hivemq.client.mqtt.exceptions.MqttDecodeException: Exception while decoding CONNACK: remaining length too short
Client test: Exception while decoding CONNACK: remaining length too short
To Reproduce
try to publish with an Mqtt 5 Client
broker is set to a mosquitto broker
Steps
Reproducer code
Details
Affected HiveMQ MQTT Client version(s): 1.1.2
Used JVM version:1.8
The text was updated successfully, but these errors were encountered:
The mosquitto broker is an old version which only supports MQTT 3.
The ConnAck is then an MQTT 3 ConnAck which has a shorter length (2) than MQTT 5 (3).
SgtSilvio
changed the title
Wrong error message when sending CONNACK failes
Misleading error message when connecting to an MQTT 3 only broker with MQTT 5
Oct 2, 2019
Expected behavior
Handle error with a better exception
Actual behavior
To Reproduce
Steps
Reproducer code
Details
The text was updated successfully, but these errors were encountered: