1. connection timeout occurs:
the IP address for the requested server is successfully found,
connection establishment packets are dispatched to the IP address,
the destination address deliberately ignores or does not receive them
your packets are just being lost.. either the system or some intermediate system is firewalled. follow CMA's advice.. if you cant connect using telnet, a browser or some other app, its a network problem, not a java one
2. Connection Timeouts (assuming a local network and several client machines) typically result from
a) some kind of firewall on the way that simply eats the packets without telling the sender things like "No Route to host"
b) packet loss due to wrong network configuration or line overload
c) too many requests overloading the server
d) a small number of simultaneously available threads/processes on the server which leads to all of them being taken. This happens especially with requests that take a long time to run and may combine with c).
2. similar to connection timeout is Connection Refused:
but in this case the destination system is actually sending packets back saying "go away, there is no service running on the port you are trying to connect to"