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
Multiple error messages returned when parsing a MQTT connect telegram have little information about the conditions surrounding the error.
Information about telegram "CONNECT" and the Flag and Value the parsing failed on.
Use case
When trying to understand a MQTT connection problem, it was very hard to understand what was going on.
I had a PLC, with MQTT version 3.1.1, that tried to connect, but was refused a connection to a NATS server. Connection to a Mosquitto server worked without problems.
Finally, by looking at the CONECT telegram in Wireshark, we could see that the Will Topic looked more like Will Message and not a valid topic.
Connect Command
0001 0000 = Header Flags: 0x10 (Connect Command)
0001 .... = Message Type: Connect Command (1)
.... 0... = DUP Flag: Not set
.... .00. = QOS Level: Fire and Forget (0)
.... ...0 = Retain: Not set
Msg Len: 38
Protocol Name: MQTT
Version: 4
0000 0110 = Connect Flags: 0x06
0... .... = User Name Flag: Not set
.0.. .... = Password Flag: Not set
..0. .... = Will Retain: Not set
...0 0... = QOS Level: Fire and Forget (0)
.... .1.. = Will Flag: Set
.... ..1. = Clean Session Flag: Set
.... ...0 = (Reserved): Not set
Keep Alive: 15
Client ID: CPU313C
Will Topic: Connection Lost
Will Message:
The server logs did not tell me much about where and what was going on:
The power was recently cut off and after restoration, nats js does not see streams, consumers, messages, but they are present in the storage. Why did this happen and how to get the data back? They are physically present.
An example of a log in the attachment, it is the same on all 3 nodes, there is no hint for recovery or anything like that natsjs_1.log
Proposed change
Multiple error messages returned when parsing a MQTT connect telegram have little information about the conditions surrounding the error.
Information about telegram "CONNECT" and the Flag and Value the parsing failed on.
Use case
When trying to understand a MQTT connection problem, it was very hard to understand what was going on.
I had a PLC, with MQTT version 3.1.1, that tried to connect, but was refused a connection to a NATS server. Connection to a Mosquitto server worked without problems.
Finally, by looking at the CONECT telegram in Wireshark, we could see that the Will Topic looked more like Will Message and not a valid topic.
The server logs did not tell me much about where and what was going on:
Contribution
No response
The text was updated successfully, but these errors were encountered: