I have a server side js script which was working some time ago. I tried to start it yesterday and faced this error when I was trying to connect to the server socket:
WebSocket connection to 'wss://ohrana.ua:55533/' failed
The dump of the error is:
bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: WebSocket {url: "wss://ohrana.ua:55533/", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
defaultPrevented: false
eventPhase: 0
isTrusted: true
path: []
returnValue: true
srcElement: WebSocket {url: "wss://ohrana.ua:55533/", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
target: WebSocket {url: "wss://ohrana.ua:55533/", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
timeStamp: 2467.9999999934807
type: "error"
It looks like the request from browser doesnt even reach the script because something is blocking it. I cant understand what is wrong because some time ago everything was working fine.
I am starting js script like this:
node /home/admin/web/ohrana.ua/public_html/webrtc/pinrtc_socket.js
also I have executed these commands:
sudo iptables -t filter -A INPUT -p udp --dport 55533 -j ACCEPT
sudo iptables -t filter -A INPUT -p tcp --dport 55533 -j ACCEPT
also I have turned firewall of.
But I still cant connect to the socket and it gives me that same error.
Can anyone give me some advice what I am doing wrong and how to trace what stops the script from working?
Any help appriciated!