-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
WebSockets connections from common JS clients fail on 1.5.4 #1050
Comments
A bit more info:
So, for the MacOS one the dump is:
On Ubuntu I get:
I suspect the problem is actually in libwebsockets. The MacOS binary appears to be linked against version "12" (maybe 1.2?):
While the Ubuntu one is linked against 3:
And finally, I found a thread on the libwebsockets mailing list alluding to an infinite loop, but I am not familiar enough with the library to know if it's related: https://libwebsockets.org/pipermail/libwebsockets/2018-August/003811.html |
Okay, final word for tonight: I recompiled the Ubuntu version against libwebsockets 2.4.2 (like the MacOS) one and it works! So, seems there is a bug related to libwebsockets 3.0. |
The library SO version (12 and 3 in what you've quoted above) should be a binary compatibility version unrelated to the actual version of the project. If the developer changes the ABI of the library, it should be incremented. That means that SO version 3 isn't anything to do with version 3.0 of libwebsockets, it's actually a much much older version - version 1.2.2, as is present in ubuntu 14.04. This version has many problems unfortunately. If you want to use websockets on 14.04 the only realistic option is to compile with a more recent version of libwebsockets, exactly as you have done. |
Thanks @ralight, that was helpful. I checked the version of the websockets package that was installed when I I think we could probably close this unless you think it warrants further investigation. |
Great, will do! |
This is related to this issue in the Paho client: eclipse-paho/paho.mqtt.javascript#169
It seems that any JavaScript WebSockets client connection to Mosquitto 1.5.4 goes into an infinite loop after the connection. On the client side, it seems to see the connection received message an infinite amount of times, eventually crashing the browser.
On the Mosquitto side I logged the following:
The
written 6 bytes to client
message repeats forever, until you kill the connection.The server is running on Ubuntu 14.04 and the config is below:
I have tested and reproduced this issue with the Paho client, MQTT.js, and the Hive client.
Edit: It seems Mosquitto is sending an infinite number of CONNACK responses. Here is a snap from a WireShark capture:
The text was updated successfully, but these errors were encountered: