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

Mosquitto websockets not work with paho clients #1228

Closed
IanCloutier opened this issue Apr 17, 2019 · 5 comments
Closed

Mosquitto websockets not work with paho clients #1228

IanCloutier opened this issue Apr 17, 2019 · 5 comments

Comments

@IanCloutier
Copy link

Hi,

I am trying to get some paho clients to work with a mosquitto server running on ubuntu 18.02. I've confirmed that the websocket is open on the desired port (both through netstat and logs). I'm running version 1.5.8 built with libwebsockets version 1.4 (I tried with the most recent libwebsockets version but that didn't work either). I keep getting Socket error: undefined on the paho js utility when trying to connect. Any advice on helping me narrow down the issue here?

Thanks!

@ralight
Copy link
Contributor

ralight commented Apr 17, 2019

libwebsockets 2.4 has proved to be the most stable version in my experience.

Could you share your broker config?

@IanCloutier
Copy link
Author

Here it is, the only changes I made from the default were
port 1883
listener 9001
protocol websockets

mosquitto.txt

@ralight
Copy link
Contributor

ralight commented Apr 25, 2019

Could you try connecting to test.mosquitto.org port 8080? This is a websockets listener and has many people connecting to it. If that fails for you, then it is the client that is at fault.

@IanCloutier
Copy link
Author

I actually fixed it, my browser was blocking external scripts from running on browser pages.

@ralight
Copy link
Contributor

ralight commented Apr 26, 2019

Great to hear, I'll close this report then.

@ralight ralight closed this as completed Apr 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants