paho.mqtt.javascript
paho.mqtt.javascript copied to clipboard
MQTT Error Code 7 - AMQJS0007E Socket error: Unknown socket error
I'm trying to use one Client (Mobile App) to subscribe to multiple topics at the same time. It works at first but then it keeps disconnecting my previous subscribed topics and shows this error message "AMQJS0007E Socket error: Unknown socket error". Instead, I want all the connections to be alive so I can receive real-time data instead of keeping reconnecting all the time.
Please help me resolving this issue.
Thank you.
the same issue. I subscribe a topics. The logs show "onConnectionLost:AMQJS0007E Socket error:undefined.', 7" or "onConnectionLost:AMQJS0008I Socket closed.', 8" and then reconnecting successful. 我想到的唯一方法就是把keepAliveInterval设置的尽可能长。
the same issue. I subscribe a topics. The logs show "onConnectionLost:AMQJS0007E Socket error:undefined.', 7" or "onConnectionLost:AMQJS0008I Socket closed.', 8" and then reconnecting successful. 我想到的唯一方法就是把keepAliveInterval设置的尽可能长。 keepAliveInterval: integer [0..65535] (CONNECT)
the same issue. I subscribe a topics. The logs show "onConnectionLost:AMQJS0007E Socket error:undefined.', 7" or "onConnectionLost:AMQJS0008I Socket closed.', 8" and then reconnecting successful. 我想到的唯一方法就是把keepAliveInterval设置的尽可能长。 keepAliveInterval: integer [0..65535] (CONNECT)
Some disconnection errors are due to reuse the same clientID
.
If a client connects with the same clientID, the previous client is disconnected with error 7 or 8.
Try to use a unique clientID or randomize it.
any solution?