So I have a Windows 2012 server with Jira server only. The server seems to work fine, except for sending email notifications. I am using smtp.office365.com for the smtp outgoing.
If I disable TLS, the test connection seems to work successfully. If I enable TLS, it fails.
IOException: DerInputStream.getLength(): lengthTag=109, too big.
If I try to send a test email with TLS enabled, I get Error 1 below.
If I try to send a test email without TLS enabled, I get Error 2 below.
I read an article on this error, but everything is pretty cryptic. Do I really need to regenerate all the SSL certs and get them signed again, and re-import the into the keystore and all that?
It's so confusing. Not sure what to do to get the emails working.
Please help.
Error 1
An error has occurred with sending the test email:
com.atlassian.mail.MailException: javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:224)
.
.
.
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2140)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:734)
at javax.mail.Service.connect(Service.java:342)
at javax.mail.Service.connect(Service.java:222)
at javax.mail.Service.connect(Service.java:243)
at com.atlassian.mail.server.InternalAuthenticationContext.connectService(InternalAuthenticationContext.java:35)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:196)
... 282 more
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:248)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:270)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:528)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2135)
... 288 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at java.security.Provider$Service.newInstance(Provider.java:1617)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:523)
... 289 more
Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
.
.
.
Error 2
An error has occurred with sending the test email:
com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 451 5.7.3 STARTTLS is required to send mail [BL0PR02CA0128.namprd02.prod.outlook.com]
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:224)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:176)
at com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:95)
at webwork.action.ActionSupport.execute(ActionSupport.java:165)
.
.
.
at java.lang.Thread.run(Thread.java:748)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 451 5.7.3 STARTTLS is required to send mail [BL0PR02CA0128.namprd02.prod.outlook.com]
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2374)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1808)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1285)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendMimeMessage(SMTPMailServerImpl.java:242)
at com.atlassian.mail.server.managers.EventAwareSMTPMailServer.sendMimeMessage(EventAwareSMTPMailServer.java:30)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:198)
... 282 more
Hi @Bryan Boone ,
please take a look to the following troubleshooting article https://confluence.atlassian.com/jirakb/java-certificate-issue-ioexception-derinputstream-getlength-lengthtag-109-too-big-761505154.html
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.