ws:// works well, but wss:// connection failed.
See original GitHub issue- I’ve searched for any related issues and avoided creating a duplicate issue.
Description
Connecting on ws://
works well but wss://
doesn’t.
If I try to connect to wss://
, then an error occurs:
WebSocket connection to ‘wss://[host]/’ failed
I think it’s not a problem about my server but ws
because when I run my server on HTTPS then it works well.
How do I figure it out? or any tips to debug the problem in ws
?
Thank you for viewing my question.
Reproducible in:
- version: 7.5.3
- Node.js version(s): 16.6.0
- OS version(s): Amazon Linux
Attachments:
I’ve also asked this in more detail on Stack Overflow: https://stackoverflow.com/questions/68745030/websocket-aws-websocket-connection-to-wss-host-failed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
WebSocket connection on wss failed - Stack Overflow
Now, I am trying to establish a socket connection using wss, but it failed. The error at the Javascript client side is like...
Read more >WebSocket connection to 'wss://[host]/' failed - Server Fault
In the EC2 instance, when I run an HTTPS server which shows "hello world" as a text, it works well in a client...
Read more >WebSocket connection failed. Error in browser console, since ...
I know this is closed, I have trying to establish connection to wss using apache httpd on Oracle Linux 8 and i keep...
Read more >WebSocket connection to 'wss://...' failed. ASP .Net Core Web ...
The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not...
Read more >WebSocket Connection to 'wss://mydomain' - Failed (wss)
I'm using laravel forge to deploy and projects works fine in localhost but doesn't work after deploying to laravel forge. enter image description...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@charlieheslington if you are running this https://github.com/websockets/ws#external-https-server, then it can’t work with
ws://
as it only accepts TLS connections.If you are using a TLS terminating reverse proxy / load balancer like @ygnoh make sure it correctly forwards the upgrade requests to the WebSocket server.
I’m closing this as answered. Discussion can continue if needed.