Connection timed out
Maybe the server is not listening on the specified port or is not accepting the connection. This could be due to a firewall (software or hardware).
I would check the server connection with a third party app. For example, just telnet to a host on a given port (if it's a TCP connection) and check if the connection is up.
On the server, you can run netstat -na
(in windows) to see if there is anything listening on the target port.
a source to share
Go to your computer and use telnet locally:
telnet localhost yourportnumberhere
... if you don't get a connection, forget about firewalls - you're just not listening on that port.
If that works, go back from your computer to one on the network and try again. If that fails, it is the firewall on the computer that is blocking it.
If that works, use the same telnet command on your computer (or at least the one that runs the code that tries to connect)
a source to share