Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Paho mqtt connection(Connection closed before receiving a handshake response)
Paho mqtt connection [message #1786592] Tue, 08 May 2018 05:58 Go to next message
Srinivas Pokala is currently offline Srinivas PokalaFriend
Messages: 7
Registered: May 2016
Junior Member
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 07:49 Go to previous messageGo to next message
James Sutton is currently offline James SuttonFriend
Messages: 69
Registered: July 2015
Member
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 09:07 Go to previous messageGo to next message
Srinivas Pokala is currently offline Srinivas PokalaFriend
Messages: 7
Registered: May 2016
Junior Member
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 09:35]

Report message to a moderator

Re: Paho mqtt connection [message #1786655 is a reply to message #1786603] Wed, 09 May 2018 04:31 Go to previous message
Srinivas Pokala is currently offline Srinivas PokalaFriend
Messages: 7
Registered: May 2016
Junior Member
in logs getting this error "Ran out of header data space"
Previous Topic:Paho mqtt connection
Next Topic:Connection Error Handling
Goto Forum:
  


Current Time: Fri Sep 21 12:10:37 GMT 2018

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

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

Back to the top