-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identifierRejected when connect to mosquitto 2.0 #325
Comments
The client has no knowledge of what broker its talking to, it only knows that protocol to use, from the log above -
Your broker is rejecting the connect message, the first thing to check is what version of MQTT you are setting the client to, you can use 3.1 or 3.1.1 using the setProtocol client methods, this must match your broker version. Some brokers are stricter than others with this. The second thing to check is if you are supplying your own connect message then take out things like will period settings etc. boil it down to the basics and see what happens. Why brokers like mosquitto do not actually tell you what's wrong rather than just say 'Invalid arguments' baffles me slightly. |
I managed to solve this by setting a non-zero value to the keepAlivePeriod property of the MqttServerClient isntance, after some trial and error. The problem may be related to this issue: eclipse/mosquitto#2309 . Thanks! |
Thanks for the great work.
The MqttServerClient works perfectly with the mosquitto broker 1.x until the broker is upgraded to 2.0.12.
Could someone please point me out if the MqttServerClient is compatible with the mosquitto V2 broker? Or do we need additional configuration?
The broker is a mosquitto 2.0.12 instance installed as a snap package on Debian 10 with the configuration below.
And the logs about the connection:
The following is the log from flutter:
It seems that the connection message is rejected by the broker.
The text was updated successfully, but these errors were encountered: