Websocket Connect Problem

Hello everyone. There is a problem with websocket. I'd like to get your opinion.

When I connect to the server with the Node-Redin websocket client node in a project, the server disconnects immediately, but when I connect with the client I created in the browser, it connects without any problems. Do you think this is due to the network structure or the network's firewall? Can you give an idea?

My impressions from wireshark;

photo_2024-02-29_15-16-17

Here are the pictures when I connected from the browser


Hi @sercancetin

Not being an expert at TCP/Packet sniffing....

if the connection in a browser is fine, but your "Project" is failing...
Are there some expectations in the project?

  • Requires WSS?
  • Some certain packet handshake?
  • Some sequence of packets being required (length, header, hello)?
  • Does the "Project" understand the upgrade mechanics?

The WebSocket sever in Node RED is "flat" - A Web Socket server - nothing more, any certain packet exchange will need to be provided by you.

Also check if the "Project" is on a different network

:man_shrugging:

He thinks it's related to the network structure, but I couldn't find the problem. It works smoothly on different local networks with the same scenarios. It just doesn't work on that network.