Skip to main content



      Home
Home » Eclipse Projects » Paho » Paho mqtt connection(Connection closed before receiving a handshake response)
Paho mqtt connection [message #1786592] Tue, 08 May 2018 01:58 Go to next message
Eclipse UserFriend
Hi,
We are getting below error in some browsers(chrome or mozilla) when we connect mqtt using web sockets. When we clear browser history then connected.
Error:
WebSocket connection to 'wss://host:port/mqtt' failed: Connection closed before receiving a handshake response Paho.MQTT.ClientImpl._doConnect @ mqttws31.js:979

My connection:

var client = new Paho.MQTT.Client("host", Number(port), "myClientId" + new Date().getTime());
client.connect({userName:username,password:password,onSuccess:onConnect,onFailure:doFail,useSSL:true,cleanSession:false});

So please look into this.
Thanks
Re: Paho mqtt connection [message #1786597 is a reply to message #1786592] Tue, 08 May 2018 03:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Srinivas,

Sorry to hear that you're having a problem, could you provide some more info for us please? It would be good to know what version of Chrome and Firefox you are seeing this issue with, and also, could you look at the network tab in the developer console to see what response code the secure websocket connection receives from the sever when this issue occurs?

Thanks,

James
Re: Paho mqtt connection [message #1786603 is a reply to message #1786597] Tue, 08 May 2018 05:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi James,

Please check screen shots of chrome versions and response code of different systems, one system got error and another one connected succesfully.

Mosquitto configuration:

# Plain WebSockets configuration
listener port
protocol websockets

# WebSockets over TLS/SSL
listener port
protocol websockets
cafile ca.crt
certfile cer.crt
keyfile key

[Updated on: Tue, 08 May 2018 05:35] by Moderator

Re: Paho mqtt connection [message #1786655 is a reply to message #1786603] Wed, 09 May 2018 00:31 Go to previous message
Eclipse UserFriend
in logs getting this error "Ran out of header data space"
Previous Topic:Paho mqtt connection
Next Topic:Java: QoS 2 wrong packet id
Goto Forum:
  


Current Time: Fri Jun 20 07:39:11 EDT 2025

Powered by FUDForum. Page generated in 0.07565 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top