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
Mosquitto 2.0.4 WebSockets connect failed, but 1.6.2 is works. #1974
Comments
You should note that version 2.0 onwards will default to |
Ehh, The mosquitto.conf just for simplify, It's my mistake。 Actually I had both tried allow_anonymous equals true or false. In the below, I post complete mosquitto.conf configuration and docker command. mosquitto.conf
Docker Command
The mosquitto 2.0.4 docker logs. Do I need to provide more information? |
I confess I only had a quick glance and didn't actually check it, what with it being holiday here. I'll have a proper look. |
hha, in fact the version 1.6.12 works well for me, that performance is awesome, especial It's help me to easy build high available, scale-out IoT system. based-on mqtt brokers routing table and message routing (a little work), that's bottleneck is just only bandwidth. I try upgrade to 2.0, just only try it's, not must. Thank you for your to mqtt contributions, happy holiday to you :P |
I've found the problem now, it's a typo in calculating the end of the mqttx does see the problem because it is pretty badly behaved in how it sends packets - it sends a new websockets packet (and a new TCP packet) for each part of each MQTT packet. For example, a CONNECT packet with authentication has: command, remaining length, length of protocol string, protocol string, protocol level, connect flags, keepalive, length of client id, client id, length of username, username, length of password, password. Each one of those ends up being a new TCP packet. If you use the default mqttx client id and Still, I'm grateful for this behaviour because this might not have got found for a while otherwise. I'll get the fix into 2.0.5, most likely in early January. |
Only affects those clients that send fragmented packets. Closes #1974. Thanks to 贺亚东.
I'm afraid this got missed for 2.0.5, I thought I'd already fixed it. I've done it now for 2.0.6. |
Hi @ralight, long time no see :-) I just happened to update my mosquitto to a recent version (after that libwebsockets regression was finally sorted out with a new release on their side). I can confirm that 2.0.5 does not work when sending large messages via websockets (small messages are fine). Current master (f1180dd) works for all message sizes (tried a few megabytes in size). By the way: the problem also exist(ed) with |
@yschroeder thanks for the feedback, it's good to hear 2.0.6 fixes that for you. |
I have the same issue as @028820 in Pub/Sub works perfectly via MQTT but does not work on WebSockets even with the same credentials. |
I working on 1.6.2, when I upgrade to 2.0.4, I got a problem, WebSockets connect failed.
I'm missing some configuration at 2.0.4 ?
exmaple configuration on the below
mosquitto.conf
Mosquitto 1.6.2 WebSockets is works
Mosquitto 2.0.4 WebSockets connect failed
MQTT GUI Client
mqttx.app
The text was updated successfully, but these errors were encountered: