java.net.ConnectException: Connection timed out: connect

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 Stack Overflow by tibortru
, 2 years ago
Connection timed out: connect
via codejava.net by Unknown author, 1 year ago
Connection timed out: connect
via GitHub by g-tiwari
, 10 months ago
Connection refused: connect
via Stack Overflow by user3466950
, 2 years ago
Connection refused: connect
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:924)
at org.apache.commons.net.ftp.FTPSClient._openDataConnection_(FTPSClient.java:627)
at org.apache.commons.net.ftp.FTPClient._storeFile(FTPClient.java:657)
at org.apache.commons.net.ftp.FTPClient.__storeFile(FTPClient.java:643)
at FTP.FTP_connector.uploadFile(FTP_connector.java:113)

Users with the same issue

78 times, 1 month ago
2 times, 4 months ago
Once, 6 months ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
1195 more bugmates

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