Websocket handshake Error: 525

I am having trouble getting WebSockets to work over https.

WebSocket connection to ‘wss://someDomain.com:2053/’ failed: Error during WebSocket handshake: Unexpected response code: 525

Here is a link with more information:

https://support.cloudflare.com/hc/en-us/articles/200278659-Error-525-SSL-handshake-failed

Can I get some help diagnosing this issue? I’m not sure where to start.

I’m using node on the backend, and the ws WebSocket library

  const WebSocket = require('ws');

  const wss = new WebSocket.Server({ port: 2053 });

  wss.on('connection', function connection(ws) {

The server is nginx, i’m hoping or assuming I just have to change some settings on the nginx server in order for the handshake to go through.

Please advise.

Hi @trevordowdle,

Sorry for the delays. I circled up with some SSL folks and while they are pretty confident it’s a configuration issue at your origin server, they think it’s best to submit a support ticket so our support engineers can look closer and see what they can suggest.

You may also want to try and get a pcap of the failed handshake at the origin. That will probably be one of the first steps in troubleshooting this.

A post was split to a new topic: Websocket issue

Thank you for getting back to me ryan, i’ll look into getting a pcap.
Appreciate it!

A post was split to a new topic: Websocket 525 error