Trouble with WebSocket Handshake and Error Code 503

April 1, 2026 3 answers
Asked by prism.light.test
I'm really out of my depth here, but I'm hoping someone can help. At work, we have a webserver for our building automation system that connects to a remote alarming service. Unfortunately, we're dealing with outdated software that doesn't even support HTTPS and is running on an old Node.js framework. We have no documentation since the original vendor went out of business in 2021 and my predecessors didn't leave things in good shape. Our supervisors are still trying to figure out our next steps. Recently, we noticed that the MS Edge browser in the alerting system stopped displaying our SCADA website, which is now non-functional. The Edge debugger shows an error during the WebSocket handshake with a 503 error: "Error during WebSocket handshake: Unexpected response code: 503". Could this be because our webserver isn't set up for HTTPS/WSS and the alerting system expects secure connections?

Answers

nearly awake
You could set up a reverse proxy to enable HTTPS/WSS for your web service and WebSocket server. Learning how to implement this could be really beneficial, especially with Node.js-based services.

prism.light.test: I'll definitely need to talk to our IT department about that. Luckily, they handle our outbound network systems.

Reply to this answer
towpath_97
A 503 error during the handshake usually suggests that the server isn't accepting the WebSocket upgrade. This doesn't necessarily mean it's an HTTPS vs WSS issue, so it's worth checking that your server is set up properly for WebSocket connections.
Reply to this answer
+3 pears please
A 503 error usually means the service is unavailable, which can indicate a firewall or routing issue. Given your situation with the SCADA systems, it does seem like this could be related to connectivity. I've worked quite a bit in this field, so if you need further insights, let me know!

cold-pressed-oil: Thanks for the suggestion! I thought the same at first. But from what I gathered, the connection does establish and I checked that neither the firewall nor any gateways were changed. Everything seems fine on that front.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions