The error during websocket Handshake: Net:: err often appears in WSS services generated by Apache proxy_ RESPONSE_ HEADERS_ Truncated
, but you can connect successfully by refreshing the page several times
No way was found in the official documents, and finally in the https://github.com/ratchetphp/Ratchet/issues/645 A solution has been found
This is not a worker’s warehouse, but the solution is universal
I could say that when some client disconnects without default websockt close protocol, ratchet keeps the connection “open”, but when a new user connects then ratchet reuses somehow the last “open”(closed) connection… Because the new client uses a old “active” connection, when it sends the HTTP handshake, ratchet complains because it isn’t the default message frame.
It’s the reuse of connections that causes this problem
Modify the configuration file of Apache conf.d/ssl.conf
Add a configuration disableeuse = on
in the reverse proxy, and the problem is solved
ProxyPass /wss ws://127.0.0.1:8282/wss disablereuse=On
ProxyPassReverse /wss ws://127.0.0.1:8282/wss
Reference Links
https://github.com/ratchetphp/Ratchet/issues/645
http://doc.workerman.net/faq/secure-websocket-server.html
Similar Posts:
- Solve the 400 error of nginx forwarding websocket
- How to Solve error: NSPOSIXErrorD omain:100
- [Solved] Nginx proxy Timeout: upstream timed out (110: Connection timed out)
- Error during WebSocket handshake 403 [How to Solve]
- Tomcat a bug causes close_ WAIT
- Failed to connect to github.com port 443: Timed out(Windows)
- [Solved]failed to receive handshake ssl/tls connection failed github
- About the Ubuntu configuration file apache2 httpd.conf position
- Nginx error 111: connection rejected [How to Solve]
- [Solved] Github Push Error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443