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
NOTE: I wrote this issue mainly to have the details available when someone asks again in the future - problem is solved already; per Venus OS v3.31
The story:
Per Venus OS ... we switched from Mosquitto to FlashMQ. And that resulted, for some MQTT clients, in a regression:
There is a difference between how Mosquitto and FlashMQ treat anonymous logins on MQTT. Mosquitto treated the specifications a bit loosely, and accepted an empty username, instead of only no username. FlashMQ is more strict, and if during login the client says that there is a username, it also expects one. And if there is none, it refuses to connect.
On some clients and implementations that works fine; but - as clear now - there are also implementations on which that gives a problem. What you see then is that the software you're using is unable to connect. If you'd look in the logs on the GX device, you'd see this:
[ERROR] Unspecified or non-MQTT protocol error: Username flagged as present, but it's 0 bytes.. Removing client.
To work around this, configure a username and password in the MQTT software you are using. Then FlashMQ will accept the connection, even though there is no username or password required.
Note that that workaround does not require you to login to the GX command line and make changes there.
Per Venus OS v3.31, that was fixed, by updating flashmq + enabling the new zero_byte_username_is_anonymous option.
Which clients were affected is not totally clear, but names that were mentioned on Community are the openEVSE charger and edomi/knx. The often used MQTT Explorer package is not affected.
Here is how to test / reproduce it, all using the MQTT v5 protocol. With v3.11 protocol its the same.:
## No user name against Venus OS v3.30 - connects OK
matthijs@mva-ubuntu2204:~$ mosquitto_sub -d -t '#' -h 192.168.178.221 -V 5
(...)
{"value":"c0847dc9a93d"}
## Empty user name against Venus OS v3.30 - connection FAILS:
$ mosquitto_sub -d -t '#' -h 192.168.178.221 -u '' -P '' -V 5
Client (null) sending CONNECT
Client (null) received CONNACK (129)
Connection error: Malformed Packet
Client (null) sending DISCONNECT
^C
## No user name against Venus OS v3.31 - still connects OK
$ mosquitto_sub -d -t '#' -h 192.168.178.221 -V 5
(...)
{"value":"c0847dc9a93d"}
^C
## Empty user name againast Venus OS v3.31 - connects OK - PROBLEM SOLVED:
$ mosquitto_sub -d -t '#' -h 192.168.178.221 -u '' -P '' -V 5
(...)
{"value":"c0847dc9a93d"}
^C
The text was updated successfully, but these errors were encountered:
NOTE: I wrote this issue mainly to have the details available when someone asks again in the future - problem is solved already; per Venus OS v3.31
The story:
Per Venus OS ... we switched from Mosquitto to FlashMQ. And that resulted, for some MQTT clients, in a regression:
Per Venus OS v3.31, that was fixed, by updating flashmq + enabling the new
zero_byte_username_is_anonymous
option.Which clients were affected is not totally clear, but names that were mentioned on Community are the openEVSE charger and edomi/knx. The often used MQTT Explorer package is not affected.
Here is how to test / reproduce it, all using the MQTT v5 protocol. With v3.11 protocol its the same.:
The text was updated successfully, but these errors were encountered: