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

MQTT Error Code 7 - AMQJS0007E Socket error: Unknown socket error #237

Open
benjaminle9x opened this issue Jun 30, 2021 · 7 comments
Open

Comments

@benjaminle9x
Copy link

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.

@inkCrazy
Copy link

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设置的尽可能长。

@inkCrazy
Copy link

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)

1 similar comment
@inkCrazy
Copy link

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)

@punkman
Copy link

punkman commented Oct 24, 2021

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.

@jatin-bhuva
Copy link

any solution?

@fdacio
Copy link

fdacio commented Jul 15, 2024

the same issue on connect

@MaxTheTurtle0
Copy link

having the same issue in react native it just sometimes works and sometimes it throws this error

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

No branches or pull requests

6 participants