K
K
Kirill Bobykin2015-08-18 16:10:13
Email
Kirill Bobykin, 2015-08-18 16:10:13

I'm trying to connect to MS exchange via davmail, I'm getting javax.net.ssl.SSLHandshakeException, what's the problem?

I installed davmail, configured it, made an SSL certificate, connected it to davmail. It crashes during handshake, the actual log:

2015-08-18 14:56:49,243 DEBUG [SmtpConnection-55101] davmail  - Exception sending error to client Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1508)
  at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1520)
  at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:70)
  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
  at davmail.AbstractConnection.sendClient(AbstractConnection.java:183)
  at davmail.AbstractConnection.sendClient(AbstractConnection.java:163)
  at davmail.smtp.SmtpConnection.run(SmtpConnection.java:206)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:965)
  at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
  at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:721)
  at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
  at davmail.AbstractConnection.sendClient(AbstractConnection.java:183)
  at davmail.AbstractConnection.sendClient(AbstractConnection.java:163)
  at davmail.smtp.SmtpConnection.run(SmtpConnection.java:65)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
  at sun.security.ssl.InputRecord.read(InputRecord.java:482)
  at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:946)
  ... 8 more
2015-08-18 14:56:49,243 DEBUG [PopConnection-40159] davmail  - Exception sending error to client Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1508)
  at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1520)
  at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:70)
  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
  at davmail.AbstractConnection.sendClient(AbstractConnection.java:183)
  at davmail.pop.PopConnection.sendERR(PopConnection.java:305)
  at davmail.pop.PopConnection.run(PopConnection.java:282)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
  at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:965)
  at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
  at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:721)
  at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
  at davmail.AbstractConnection.sendClient(AbstractConnection.java:183)
  at davmail.pop.PopConnection.sendOK(PopConnection.java:293)
  at davmail.pop.PopConnection.run(PopConnection.java:98)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
  at sun.security.ssl.InputRecord.read(InputRecord.java:482)
  at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:946)
  ... 8 more

What could be the problem? And how, presumably, to fix this matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-08-19
@Yestestvenno

I met somewhere that for exchange + self-signed certificate + davmail to work , the
latter needs to be edited, I advise you to dig towards the work of a self-signed certificate with davmail
, unfortunately I won’t help you anymore, because I didn’t use this bundle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question