-
Notifications
You must be signed in to change notification settings - Fork 50
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
MQTT client is disconnected and cannot reconnect after sending message #623
Comments
Hi @gavinheale ,
I've tried it using these steps with the mqtt intro, and it was all working, so maybe I misunderstood your use case. Can you elaborate a little bit more?
I can see in the payload "Hello World MQTTX 3". Based on this, maybe you're using V3 protocol? Note that we're only supporting v3.1.1 and v5 right now. |
Hi @bmaidics, I just reproduced this using the following steps
To answer your questions
Here is the output from subscribing using mosquitto (base) MacBook-Pro:logs gavin$ docker run -it --rm eclipse-mosquitto mosquitto_sub -V 'mqttv5' --topic 'zilla' --host 'host.docker.internal' --port 7183 --debug Here is the log from MQTTX bash-3.2$ tail -f log |
Thanks @gavinheale , now I could reproduce the issue. We're working on it and update you here once it's fixed |
@gavinheale fyi - fix released in 0.9.61 |
Thanks for the quick response. I pulled the release and all looks good now. |
I am testing the mqtt functionality using MQTTX (https://mqttx.app/) and the setup described in the intro (https://docs.aklivity.io/zilla/next/tutorials/mqtt/mqtt-intro.html).
I am connecting to the zilla broker using the address mqtt://localhost:7183
I can connect successfully and receive messages but when I send a message, I am automatically disconnected and the reconnects do not work.
I dont see anything in the zilla logs using the docker logs command.
I get the following log from MQTTX
[2023-12-06 17:28:16] [INFO] Message Arrived with topic: zilla
[2023-12-06 17:28:16] [INFO] Zilla message arrived: message added "message_a1f68ecf-3a0b-4fab-9856-264f001b3ded" and added to topic: "zilla", payload: "Hello World MQTTX 3" MQTT.js onMessageArrived trigger with Properties: undefined
[2023-12-06 17:28:16] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:20] [INFO] Zilla reconnect: 0 times retry
[2023-12-06 17:28:20] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:24] [INFO] Zilla reconnect: 1 times retry
[2023-12-06 17:28:25] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:29] [INFO] Zilla reconnect: 2 times retry
[2023-12-06 17:28:29] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:33] [INFO] Zilla reconnect: 3 times retry
[2023-12-06 17:28:33] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:37] [INFO] Zilla reconnect: 4 times retry
[2023-12-06 17:28:37] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:41] [INFO] Zilla reconnect: 5 times retry
[2023-12-06 17:28:41] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:45] [INFO] Zilla reconnect: 6 times retry
[2023-12-06 17:28:45] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:49] [INFO] Zilla reconnect: 7 times retry
[2023-12-06 17:28:50] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:54] [INFO] Zilla reconnect: 8 times retry
[2023-12-06 17:28:54] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:28:58] [INFO] Zilla reconnect: 9 times retry
[2023-12-06 17:28:58] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:29:02] [INFO] Zilla reconnect: 10 times retry
[2023-12-06 17:29:02] [INFO] Zilla connect close, MQTT.js onClose trigger
[2023-12-06 17:29:06] [WARN] Connection maxReconnectTimes limit, stop retry
[2023-12-06 17:29:06] [ERROR] Zilla connect fail, MQTT.js onError trigger, Error: client disconnecting
at MqttClient._checkDisconnecting (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:577:26)
at MqttClient.subscribe (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:723:12)
at MqttClient._resubscribe (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:1747:16)
at deliver (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:340:14)
at MqttClient. (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:369:5)
at MqttClient.emit (events.js:327:22)
at MqttClient._onConnect (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:1768:10)
at MqttClient._handleConnack (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:1386:10)
at MqttClient._handlePacket (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:549:12)
at work (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:438:12)
at Writable.writable._write (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:452:5)
at doWrite (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:409:139)
at writeOrBuffer (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:398:5)
at Writable.write (/Applications/MQTTX.app/Contents/Resources/app.asar/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:307:11)
at Socket.ondata (internal/streams/readable.js:719:22)
at Socket.emit (events.js:315:20)
The text was updated successfully, but these errors were encountered: