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

Can't access using websockets running on Windows #2425

Open
cymplecy opened this issue Jan 4, 2022 · 5 comments
Open

Can't access using websockets running on Windows #2425

cymplecy opened this issue Jan 4, 2022 · 5 comments

Comments

@cymplecy
Copy link

cymplecy commented Jan 4, 2022

I think there is a bug in Windows installer in version 2.0.14 when trying to access via websockets

Summary
version 1.6.9 and version 2.0.9a work for me but not version 2.0.14

See here for background
https://discourse.nodered.org/t/cant-connect-to-local-mqtt-broker-using-websockets/56035/15?u=cymplecy

@Xtensa2C
Copy link

Xtensa2C commented Jan 11, 2022

I can confirm this issue. It affects versions 2.0.12, 2.0.13 & 2.0.14.

WORKAROUND:

  • Add "socket_domain ipv4" to the end of the config

See my stackoverflow post here for more information: https://stackoverflow.com/questions/70643455/mosquitto-no-websocket-connection-since-version-02-0-12#new-answer

@MattBrittan
Copy link

Confirmed with a fresh install of 2.0.14 running under Windows 11. Using a basic configuration (as below) appears to start up successfully (nothing unusual logged) but connection attempts fail (nothing is logged).

allow_anonymous true

listener 9001
protocol websockets

Adding socket_domain ipv4 (full configuration below) resolves the issue. I have not looked into why this helps but can confirm that it does.

allow_anonymous true

listener 9001
protocol websockets
socket_domain ipv4

@cymplecy
Copy link
Author

Thanks for finding the workaround
Confirm it works for me on 2.0.14

@himijendrix24
Copy link

Thanks!
This really took me some time to find out and should work by default.
Using 2.0.15 and windows 10 with local broker and clients.

@flashpoint90
Copy link

Had the same problem with 2.0.15 and Windows 11.
Connection worked with:

socket_domain ipv4

Thank you!

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

5 participants