You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having issues in production where I am running nginx on HTTPS and uwsgi deployed on an EC2 instance.
In the browser console I get this error:
WebSocket connection to 'wss://ec2-***:5002/session_id/username' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
What I Did
Here are my settings:
CHAT_WS_SERVER_HOST = 'ec2-***' # here I am using EC2 Public IPv4 DNS
CHAT_WS_SERVER_PORT = 5002
CHAT_WS_SERVER_PROTOCOL = 'wss'
I run the server as following:
python manage.py run_chat_server
And in the server console I get:
`07.10.20 16:58:49:DEBUG:Invalid handshake
Traceback (most recent call last):
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/http.py", line 96, in read_request
request_line = await read_line(stream)
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/http.py", line 219, in read_line
raise EOFError("line without CRLF")
EOFError: line without CRLF
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/server.py", line 233, in read_http_request
path, headers = await read_request(self.reader)
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/http.py", line 98, in read_request
raise EOFError("connection closed while reading HTTP request line") from exc
EOFError: connection closed while reading HTTP request line
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/server.py", line 134, in handler
extra_headers=self.extra_headers,
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/server.py", line 526, in handshake
path, request_headers = await self.read_http_request()
File "/home/admin/poc_platform/env/lib/python3.7/site-packages/websockets/server.py", line 235, in read_http_request
raise InvalidMessage("did not receive a valid HTTP request") from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP request
07.10.20 16:58:49:DEBUG:server > HTTP/1.1 400 Bad Request
Any idea?
thanks
The text was updated successfully, but these errors were encountered:
Description
I am having issues in production where I am running nginx on HTTPS and uwsgi deployed on an EC2 instance.
In the browser console I get this error:
WebSocket connection to 'wss://ec2-***:5002/session_id/username' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
What I Did
Here are my settings:
CHAT_WS_SERVER_HOST = 'ec2-***' # here I am using EC2 Public IPv4 DNS
CHAT_WS_SERVER_PORT = 5002
CHAT_WS_SERVER_PROTOCOL = 'wss'
I run the server as following:
python manage.py run_chat_server
And in the server console I get:
Any idea?
thanks
The text was updated successfully, but these errors were encountered: