javax.mail.MessagingException

Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect


Samebug tips9

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.

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.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web715

Solution icon of oraclecommunity
via Oracle Community by 843830, 1 month ago
Connect failed; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of oraclecommunity
via Oracle Community by 843830, 1 month ago
Connect failed; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of web
via wpthm.com by Unknown author, 1 year ago
Connect failed; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of googlegroups
Connect failed; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of oraclecommunity
via Oracle Community by 843834, 1 year ago
Connect failed; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of coderanch
via Coderanch by geeu mom, 9 months ago
Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of jasig
via Apereo Issues by Drew Wills, 10 months ago
Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of stackoverflow
Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of stackoverflow
Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect

Solution icon of coderanch
Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect

Stack trace

  • javax.mail.MessagingException: Connection timed out: connect; nested exception is: java.net.ConnectException: Connection timed out: connect at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:670) at javax.mail.Service.connect(Service.java:295) at usingJavaMail.OutlookReader_imap.<init>(OutlookReader_imap.java:45) at usingJavaMail.OutlookReader_imap.main(OutlookReader_imap.java:126) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:319) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:207) at com.sun.mail.iap.Protocol.<init>(Protocol.java:113) at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:111) at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:637)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
991 more bugmates