#1 2019-02-28 14:11:32

ern15s
Member
Registered: 2019-02-28

Scheduler error: Could not convert socket to TLS

Hello

Just started using RS.
I am trying to send birt report by email and I am getting this error from scheduler:

java.lang.RuntimeException: 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 net.datenwerke.rs.scheduler.service.scheduler.mail.MailReportAction$1.handleException(MailReportAction.java:149)
    at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:243)
    at net.datenwerke.rs.scheduler.service.scheduler.mail.MailReportAction.doExecute(MailReportAction.java:140)
    at net.datenwerke.scheduler.service.scheduler.entities.AbstractAction.execute(AbstractAction.java:59)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeAction(SchedulerTask.java:495)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeActions(SchedulerTask.java:385)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.safeCall(SchedulerTask.java:209)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:101)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:1)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
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:1918)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:652)
    at javax.mail.Service.connect(Service.java:317)
    at javax.mail.Service.connect(Service.java:176)
    at javax.mail.Service.connect(Service.java:125)
    at javax.mail.Transport.send0(Transport.java:194)
    at javax.mail.Transport.send(Transport.java:124)
    at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:233)
    ... 11 more
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at java.base/javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:263)
    at java.base/javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:285)
    at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:484)
    at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1913)
    ... 18 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at java.base/java.security.Provider$Service.newInstance(Provider.java:1831)
    at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
    at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
    at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:168)
    at java.base/javax.net.ssl.SSLContext.getDefault(SSLContext.java:99)
    at java.base/javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:123)
    at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:479)
    ... 19 more
Caused by: java.lang.NullPointerException: No password supplied for PKCS#12 KeyStore.
    at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown Source)
    at java.base/java.security.KeyStore.load(KeyStore.java:1479)
    at java.base/sun.security.ssl.TrustStoreManager$TrustAnchorManager.loadKeyStore(TrustStoreManager.java:365)
    at java.base/sun.security.ssl.TrustStoreManager$TrustAnchorManager.getTrustedCerts(TrustStoreManager.java:313)
    at java.base/sun.security.ssl.TrustStoreManager.getTrustedCerts(TrustStoreManager.java:55)
    at java.base/sun.security.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:49)
    at java.base/javax.net.ssl.TrustManagerFactory.init(TrustManagerFactory.java:278)
    at java.base/sun.security.ssl.SSLContextImpl$DefaultManagersHolder.getTrustManagers(SSLContextImpl.java:1052)
    at java.base/sun.security.ssl.SSLContextImpl$DefaultManagersHolder.<clinit>(SSLContextImpl.java:1022)
    at java.base/sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:1197)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at java.base/java.security.Provider.newInstanceUtil(Provider.java:153)
    at java.base/java.security.Provider$Service.newInstance(Provider.java:1824)
    at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
    at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
    at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:168)
    at java.base/javax.net.ssl.SSLContext.getDefault(SSLContext.java:99)
    at java.base/javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:123)
    at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:479)
    at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1913)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:652)
    at javax.mail.Service.connect(Service.java:317)
    at javax.mail.Service.connect(Service.java:176)
    at javax.mail.Service.connect(Service.java:125)
    at javax.mail.Transport.send0(Transport.java:194)
    at javax.mail.Transport.send(Transport.java:124)
    at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:233)
    at net.datenwerke.rs.core.service.mail.MailServiceImpl$1.run(MailServiceImpl.java:266)
    ... 3 more




My SMTP config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <smtp>
      <host>smtp.gmail.com</host>
      <port>587</port>
      <username>xxx@gmail.com</username>
      <password>xxx</password>

      <ssl>false</ssl>
      <tls>
         <enable>true</enable>
         <require>false</require>
      </tls>
   </smtp>
   <mail>
      <sender>xxx@gmail.com</sender>
      <forceSender>false</forceSender>
      <encryptionPolicy>allow_mixed</encryptionPolicy>
   </mail>
</configuration>

I tried different variants: using ssl true, and also 465 port and random other combinations. Same error.
Am I missing something? sad

Additional info:

JAVA jdk1.8.0.202
Windows 7

Thanks for the help.

Last edited by ern15s (2019-02-28 14:15:39)

Offline

#2 2019-02-28 15:09:30

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduler error: Could not convert socket to TLS

Hi ern15s,

please check this: https://forum.reportserver.net/viewtopic.php?pid=2291
Further, try to send a simple email first. For example, create a simple dynamic list and try to send it by email (send to -> email). Do you get the same error ?

Regards,
Eduardo

Offline

#3 2019-02-28 17:13:28

ern15s
Member
Registered: 2019-02-28

Re: Scheduler error: Could not convert socket to TLS

Hello eduardo,

I checked this topic before and as mentioned tried different combinations.
Errors are not the same as from other topic.

Regarding send now, I get notification email sent, but I never receive it.

Offline

#4 2019-03-01 08:02:45

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduler error: Could not convert socket to TLS

Hi ern15s,

ern15s wrote:

Regarding send now, I get notification email sent, but I never receive it.

do you get any error stack in the tomcat logs in this case ? Even if you don't see any error in the GUI, please check the tomcat logs.

Regards,
Eduardo

Offline

#5 2019-03-01 08:10:22

ern15s
Member
Registered: 2019-02-28

Re: Scheduler error: Could not convert socket to TLS

Hi,

I already solved this issue. Everything works fine now smile Warning I was gettiing in logs : "server certificate does NOT include an ID which matches the server name".

After long hours of clicking on random files related to ssl (I am not a programmer) I found out openssl.exe gave out error what it can not find ssi.conf file. It had a wrong path. Fixed it.
Thanks smile

Last edited by ern15s (2019-03-01 08:10:50)

Offline

#6 2019-03-01 08:19:01

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduler error: Could not convert socket to TLS

Hi ern15s,

I am glad it works now and thanks for letting us know what the problem was together with the solution!

Happy reporting,
Eduardo

Offline

Board footer

Powered by FluxBB