socket.io-client-cpp icon indicating copy to clipboard operation
socket.io-client-cpp copied to clipboard

Invalid HTTP Status

Open jammerxd opened this issue 7 years ago • 20 comments

Websocketpp is failing with Invalid HTTP Status...

jammerxd avatar Mar 10 '17 10:03 jammerxd

Did you resolve this issue? I am getting the same error for some days now...

[2017-10-04 18:46:23] [connect] Successful connection [2017-10-04 18:46:23] [error] Server handshake response error: websocketpp.processor:20 (Invalid HTTP status.) Connection failed. Reconnect for attempt:4

FinnGu avatar Oct 04 '17 16:10 FinnGu

Yes I did, I had to make some changes to allow for https connections.

jammerxd avatar Oct 04 '17 18:10 jammerxd

I ended up resolving this issue by using a different underlying service for my server socketio implementation: Instead of using gevent which relies on long-polling, I now use eventlet which additionally supports websocket transport and allows for communication with this client out of the box.

FinnGu avatar Oct 05 '17 13:10 FinnGu

@jammerxd care to share your changes?

aolivier avatar Oct 30 '17 22:10 aolivier

Sure, give me a day or 2.

jammerxd avatar Oct 31 '17 14:10 jammerxd

@aolivier I uploaded my mods to this repo: https://github.com/jammerxd/secure-socket.io-client-cpp

jammerxd avatar Nov 06 '17 04:11 jammerxd

Soooo is this still open? Currently seeing this same error in my application and cant seem to get past it. Relevant stack trace:

proxy_1 | [2018-06-13 19:33:54] [connect] successful connection 
proxy_1 | [2018-06-13 19:33:54] [error] server handshake response error: websocketpp.processor:20 (invalid http status.) 
proxy_1 | [2018-06-13 19:33:59] [connect] successful connection

austinpaine avatar Jun 13 '18 20:06 austinpaine

Me as well, looks like it is still an issue:

Jun 13 16:45:24 medrc-recorder-1 recorder[19546]: [2018-06-13 16:45:24] [connect] Successful connection
Jun 13 16:45:24 medrc-recorder-1 recorder[19546]: [2018-06-13 16:45:24] [error] Server handshake response error: websocketpp.processor:20 (Invalid HTTP status.)
Jun 13 16:45:24 medrc-recorder-1 recorder[19546]: [2018-06-13 16:45:24] [application] on_fail: WebSocket Connection failed, stopping telemetry!
Jun 13 16:45:24 medrc-recorder-1 recorder[19546]: [2018-06-13 16:45:24] [application] on_fail: Will try to reconnect in:  19

johann8384 avatar Jun 13 '18 21:06 johann8384

Did any one got how to resolve this issue?

ImSanjayChintha avatar Apr 03 '19 08:04 ImSanjayChintha

Maybe just try the tls branch? I'll check it in a day.

polishchlieb avatar Apr 12 '19 19:04 polishchlieb

Any news on the issue?

gituser9 avatar May 31 '19 15:05 gituser9

Any updates ?

alter-sachin avatar Sep 23 '19 10:09 alter-sachin

Hi guys , Any updates on this ?

AbhishekDroid1609 avatar Jul 15 '20 09:07 AbhishekDroid1609

I thought I found the issue was because I was trying to go with wss;// instead of https:// and having the web socket server be behind nginx and having nginx upgrade the connection...I can't remember if that was the issue or not.

jammerxd avatar Jul 19 '20 00:07 jammerxd

for me issue was the tls version was wrong as this library is not upto date + there was no way to add path . I change the codebase and it worked . cheers

AbhishekDroid1609 avatar Jul 19 '20 06:07 AbhishekDroid1609

I still have this problem. What was the change that fixed it? Any links?

rthickling avatar Sep 04 '20 20:09 rthickling

@jammerxd I also meet this issue.when I connect to a wss server without nginx,it works;but when I connect a wss server with nginx,it doesn't work! why?

wangbing8895 avatar Jan 19 '21 08:01 wangbing8895

any updates about this?

zak905 avatar Feb 04 '21 15:02 zak905

I encountered the same problem and resolved it by appending "/" to the resource path:

https://somehost/somepath -> https://somehost/somepath/

Laateef avatar Aug 06 '21 09:08 Laateef

Using vcpkg, just install openssl-windows, then compile the project with tls version sioclient.lib. If you use visual studio, set properties => vcpkg => Use Static Libraries to yes. libcrypto.dll and libssl.dll will be created when the project is compiled.

But now I am wondering why I set the property to no, tls does not work properly.

zeze-zeze avatar Jul 28 '22 10:07 zeze-zeze