java.net.ConnectException: Connection timed out

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if ip adress is correct, if the port is correct, and if the server is up and running and waiting for connections. Also, check if there's no firewall blocking you and if your internet connection is working.

,
Expert tip

Check if your server (or a proxy server) is not going up and down. There might be something between a proxy and a client sending intermittent requests to non-functioning hosts as well. There might as well be too many requests in a short amount of time.

Solutions on the web

via GitHub by muthukumarkubendran
, 1 year ago
Connection timed out
via Google Groups by Jens Petersen, 3 months ago
via Stack Overflow by krn-prog
, 2 years ago
via GitHub by mcjaeger
, 1 year ago
Connection timed out (Connection timed out)
via Stack Overflow by Unknown author, 2 years ago
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)

Users with the same issue

551 times, 2 hours ago
140 times, 7 hours ago
11 times, 2 days ago
26943 times, 2 days ago
5 times, 4 days ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.