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
{{ message }}
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
I'm running an MQTT client that is able to connect to the public MQTT brokers at broker.mqtt-dashboard.com and iot.eclipse.org, but when I try to connect the client to a stand-alone surgemq broker running on my own machine it fails.
The broker runs without error messages, so I guess it is listening for connections. My client however, cannot connect.
Does anyone have an idea what might be wrong with my setup?
The text was updated successfully, but these errors were encountered:
Figured it out:
I checked the CONNACK return code from the broker and found that it was 0x02 which means the broker rejects the client ID. The rejection is due to the regular expression against which the client ID is checked (see file surgemq/message/connect.go). It is ^[0-9a-zA-Z _]*$ which means that a client ID containing hyphens (-) will not be accepted.
Once I picked a client ID without hyphens the client connected without further issues. I wonder if there is a reason for rejecting hyphens as part of a client ID.
I'm running an MQTT client that is able to connect to the public MQTT brokers at broker.mqtt-dashboard.com and iot.eclipse.org, but when I try to connect the client to a stand-alone surgemq broker running on my own machine it fails.
The broker runs without error messages, so I guess it is listening for connections. My client however, cannot connect.
Does anyone have an idea what might be wrong with my setup?
The text was updated successfully, but these errors were encountered: