Socket.io timeout I am trying to get socket.io to work on my remote server but it I keep getting a timeout error. I have changed my connection, like so:
var ioconnection = 'http://[remote-ip-address]:3000';
But I get this status:
(failed)
net::ERR_CONNECTION_TIMED_OUT
Has anyone else experienced this / have any suggestions? I'm using Digital Ocean Nginx.
Appreciate any help,
Gary
Have you managed to test it with telnet?
telnet <ip> 3000
I just tried it and it says unable to connect to remote host. Do you think I should restart the server?
Either your node server is not running/not accepting connections or the port is blocked.
Restart the node server first and see if that resolves your issue, if it does not, you'll likely need to update firewall config.
The node server is defo running; I've started / restarted it several times. I'm not really sure how I'd go about updating the firewall config.
And you're certain the node server is listening on port 3000?
Here's some info on opening ports: http://www.daveperrett.com/articles/2006/08/16/opening-a-port-on-linux/
The short answer is:
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT
but that won't persist after a reboot.. refer to the link above to make that change persistent... but I'd probably just run that command on its own first to see if that gets it opened up for you.
5+ hours to not check any firewalls? :D Next time you'll know what to check at least.
Please sign in or create an account to participate in this conversation.