-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Websockets behind http2 nginx #15028
Comments
Yes there is a disparity between these: The only config seeming to show http2 is the Raspberry Pi version. Nonetheless I upgraded my test docker rig to http2 and it works without issues.
nginx -t service nginx restart Try reconnecting with Rocket: So this most likely is not your issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Be aware: There This error persists since a long time: RocketChat/developer-docs@a1ebcd1 |
Description:
Client connection issues on Android / ios and destkop. I believe the cause is HTTP2 reverse proxy.
Clients work however they frequently show "disconnected" "reconnecting" etc.
I ran the same tests on the open.rocket.chat and received the same response as our domain.
Steps to reproduce:
(use a curl client with HTTP2)
Results in * Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
< HTTP/2 400
HTTP/2 400
< date: Sun, 21 Jul 2019 16:38:19 GMT
date: Sun, 21 Jul 2019 16:38:19 GMT
< set-cookie: _f993b=http://10.10.50.242:3000; Path=/
set-cookie: _f993b=http://10.10.50.242:3000; Path=/
< content-type: text/plain; charset=utf-8
content-type: text/plain; charset=utf-8
< content-length: 29
content-length: 29
<
Not a valid websocket request* Connection #0 to host open.rocket.chat left intact
Then attempt with 1.1
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: open.rocket.chat" -H "Origin: open.rocket.chat" -H "Sec-WebSocket-Key: JKQgGgL0BZ5uBnFnEFvsKQ==" -H "Sec-WebSocket-Version: 13" https://open.rocket.chat/websocket -v --http1.1
< HTTP/1.1 101 Switching Protocols
HTTP/1.1 101 Switching Protocols
< Upgrade: websocket
Upgrade: websocket
< Connection: Upgrade
Connection: Upgrade
< Sec-WebSocket-Accept: PVT/B550DR00T9L0+tGlhVQPSbY=
Sec-WebSocket-Accept: PVT/B550DR00T9L0+tGlhVQPSbY=
< Set-Cookie: _f993b=http://10.10.17.50:3000; Path=/
Set-Cookie: _f993b=http://10.10.17.50:3000; Path=/
<
��{"server_id":"0"}
Expected behavior:
Valid websocket setup when behind http2 reverse proxy
Actual behavior:
Web-sockets fail to establish - chrome stops on switching protocol
Server Setup Information:
Additional context
Clients frequently display "disconnected" and "reconnecting" - I'm hoping this is why and there is a solution.
Followed setup from https://github.com/RocketChat/Rocket.Chat.RaspberryPi/wiki/NGINX-reverse-proxy-for-Rocket.Chat-Snap-installation
Relevant logs:
The text was updated successfully, but these errors were encountered: