Skip to content
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

Improve error when non-unique MQTT client ID causes broker disconnection #49

Open
ximon18 opened this issue Oct 30, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@ximon18
Copy link
Member

ximon18 commented Oct 30, 2023

Currently this results in the following unhelpful log message: (line wrapped for readability)

[2023-11-20 23:28:10] WARN  rotonda::targets::mqtt::status_reporter: mqtt: MQTT connection error: 
Mqtt state: Io error: Custom { kind: ConnectionAborted, error: "connection closed by peer" }
@ximon18
Copy link
Member Author

ximon18 commented Nov 20, 2023

At least in the case of broker.emqx.io it seems there's nothing we can do about this as the underlying rumqttc client code doesn't receive anything either, it just discovers that its connection has been closed hence the error message it produces. Also, when reconnecting we cause another connected client to disconnect, the rumqttc client code doesn't receive an error about duplicate client ID.

@ximon18 ximon18 added the enhancement New feature or request label Nov 20, 2023
@ximon18
Copy link
Member Author

ximon18 commented Nov 20, 2023

The same behaviour was also observed with broker.hivemq.com, test.mosquitto.or, publicmqtt.bevywise.com and a locally running EMQX Docker MQTT broker.

@ximon18
Copy link
Member Author

ximon18 commented Nov 22, 2023

I wonder if this is an MQTTv3 protocol thing and with v5 it would be different?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant