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
I have two instances of mosquitto running, and have MQTT v5 clients talking to both. I noticed my client wasn't working on one of my instances when I didn't send a client ID, but did on the other.
Then I noticed the following on the one that was failing:
mosquitto_pub -t tmp/test -m testing
worked, but
mosquitto_pub -t tmp/test -m testing -V 5
failed with Connection error: Unspecified error
It did work when I sent a -i, so I checked the manual and found
allow_zero_length_clientid [ true | false ]
MQTT 3.1.1 and MQTT 5 allow clients to connect with a zero length client id and have the broker generate a client id for them. Use this option to allow/disallow this behaviour. Defaults to true.
I'm also using per_listener_settings on the system that isn't working (it has a TLS listener), so I tried explicitly setting allow_zero_length_clientid true in each section and it started allowing empty client IDs.
The text was updated successfully, but these errors were encountered:
You're right, thanks. I've written a big test that goes through a lot of variations of this and have fixed a few places where it wasn't behaving properly.
I have two instances of mosquitto running, and have MQTT v5 clients talking to both. I noticed my client wasn't working on one of my instances when I didn't send a client ID, but did on the other.
Then I noticed the following on the one that was failing:
worked, but
failed with
Connection error: Unspecified error
It did work when I sent a
-i
, so I checked the manual and foundI'm also using
per_listener_settings
on the system that isn't working (it has a TLS listener), so I tried explicitly settingallow_zero_length_clientid true
in each section and it started allowing empty client IDs.The text was updated successfully, but these errors were encountered: