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
How to start server with ws(websocket)/Mqtt protocol ? #665
Comments
Same question here, I was using Eclipse Paho JavaScript Client but got "WebSocket connection to 'ws://127.0.0.1:8081/' failed" error. In the broker config I have "websocket_port 8081". |
Figured it out, the correct way is to set websocket_port 9090 in config file and connect to the broker with a url like "ws://127.0.0.1:9090/mqtt". The "mqtt" is expected by the broker by default so "ws://127.0.0.1:9090" wouldn't work. Verified that it's possible to run tcg and ws connections at the same time. Also had one interesting finding: do not use 8081 for websocket_port if you are running the embedded mqtt broker on spring boot, it looks like 8081 is used for some ping mechanism so mqtt broker keeps getting this error: ERROR NewNettyMQTTHandler - Unexpected exception while processing MQTT message. Closing Netty channel. CId=null |
We are connecting the app using the client in the browser so we can only use ws/mqtt protocol because TCP is not supported in the browser, can you help here? #question
The text was updated successfully, but these errors were encountered: