javax.mail.MessagingException

Remote host closed connection during handshake; nested exception is: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

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

Solutions on the web671

  • via Google Groups by deep shah, 9 months ago
    Remote host closed connection during handshake; nested exception is: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  • Can't send command to SMTP host; nested exception is: java.net.SocketException: Connection closed by remote host
  • via GitHub by royerloic
    , 3 months ago
    Can't send command to SMTP host; nested exception is: java.net.SocketException: Connection closed by remote host
  • Stack trace

    • javax.mail.MessagingException: Remote host closed connection during handshake; nested exception is: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479) at javax.mail.Service.connect(Service.java:275) at model.XoauthAuthenticator.connectToImap(XoauthAuthenticator.java:92) at model.XoauthAuthenticator.main(XoauthAuthenticator.java:180) Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:808) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:744) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at com.sun.mail.iap.ResponseInputStream.read0(ResponseInputStream.java:81) at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:67) at com.sun.mail.iap.Response.<init>(Response.java:83) at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:48) at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:122) at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:230) at com.sun.mail.iap.Protocol.<init>(Protocol.java:91) at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87) at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446) ... 3 more Caused by: java.io.EOFException: SSL peer shut down incorrectly at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789) ... 18 more

    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

    Unknown user
    Once, 2 years ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    4 more bugmates