RJS-IT

SSL Error? with Windows 10 / FMP 15.3 / Java 8u121

3 posts in this topic

We have been using 360Works Email 2 plugin, Version: 2.17 successfully for about a year now.  I have been diligently upgrading our PC's with the latest Filemaker Pro (15.3) and Java (8u121).   (from FMP 15.1 and Java 8u111)

Our Windows 7's PC's have been updated and after a restart work as normal.

Unfortunately we have some Windows 10 PC's and they are unwilling to play nice any more.  I have tried uninstalling/reinstalling versions of Java/FMP to no avail.  Is anyone able to save me from reinstalling these PC's?

Below example log event:

CONFIG: === Executing plugin function EmailConnectSMTP on thread main ===
Mar 27, 2017 2:08:53 PM com.prosc.emailplugin.EmailerModel connectSMTP
INFO: Auto-closing SMTP connection which was opened previously
Mar 27, 2017 2:08:53 PM com.prosc.emailplugin.EmailerModel connectSMTP
INFO: Connecting to SMTP server mailserver.address.com, username admin@address.com, port=465
Mar 27, 2017 2:08:53 PM com.prosc.fmkit.Plugin setLastError
SEVERE: PluginFunction PluginFunction{name='EmailConnectSMTP', functionID=-24868, minArgs=1, maxArgs=-1} got an error with converted args [mailserver.address.com:465, [ssl=1, timeout=9], null, null]
javax.mail.MessagingException: Could not connect to SMTP host: mailserver.address.com, port: 465;
  nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2055)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)
    at javax.mail.Service.connect(Service.java:364)
    at com.prosc.emailplugin.EmailerModel.connectSMTP(EmailerModel.java:141)
    at com.prosc.emailplugin.EmailerPlugin.EmailConnectSMTP(EmailerPlugin.java:1786)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.prosc.fmkit.StaticFunction.invoke(StaticFunction.java:231)
    at com.prosc.fmkit.Plugin.invokeFunction(Plugin.java:352)
    at com.prosc.fmkit.RegisterablePlugin.invokeFunction(RegisterablePlugin.java:170)
    at com.prosc.fmkit.Plugin.invokeFunctionNoErrors(Plugin.java:333)
    at com.prosc.fmkit.PluginBridge$4.run(PluginBridge.java:1203)
    at com.prosc.fmkit.PluginBridge.runTask(PluginBridge.java:1443)
    at com.prosc.fmkit.PluginBridge.doFunction(PluginBridge.java:1220)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    at sun.security.ssl.Handshaker.processLoop(Unknown Source)
    at sun.security.ssl.Handshaker.process_record(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:543)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:348)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)
    ... 15 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    ... 27 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
    at java.security.cert.CertPathBuilder.build(Unknown Source)
    ... 33 more

Mar 27, 2017 2:08:53 PM com.prosc.fmkit.PluginBridge$4 run
CONFIG: === Executing plugin function EmailLastError on thread main ===
Mar 27, 2017 2:18:26 PM com.prosc.fmkit.PluginBridge$4 run
CONFIG: === Executing plugin function EmailConnectSMTP on thread main ===
Mar 27, 2017 2:18:26 PM com.prosc.emailplugin.EmailerModel connectSMTP
INFO: Auto-closing SMTP connection which was opened previously
Mar 27, 2017 2:18:26 PM com.prosc.emailplugin.EmailerModel connectSMTP
INFO: Connecting to SMTP server mailserver.domain.com, username admin@domain.com, port=465
Mar 27, 2017 2:18:27 PM com.prosc.fmkit.Plugin setLastError
SEVERE: PluginFunction PluginFunction{name='EmailConnectSMTP', functionID=-24868, minArgs=1, maxArgs=-1} got an error with converted args [mailserver.domain.com:465, [ssl=1, timeout=9], null, null]
javax.mail.MessagingException: Could not connect to SMTP host: mailserver.domain.com, port: 465;
  nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2055)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)
    at javax.mail.Service.connect(Service.java:364)
    at com.prosc.emailplugin.EmailerModel.connectSMTP(EmailerModel.java:141)
    at com.prosc.emailplugin.EmailerPlugin.EmailConnectSMTP(EmailerPlugin.java:1786)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.prosc.fmkit.StaticFunction.invoke(StaticFunction.java:231)
    at com.prosc.fmkit.Plugin.invokeFunction(Plugin.java:352)
    at com.prosc.fmkit.RegisterablePlugin.invokeFunction(RegisterablePlugin.java:170)
    at com.prosc.fmkit.Plugin.invokeFunctionNoErrors(Plugin.java:333)
    at com.prosc.fmkit.PluginBridge$4.run(PluginBridge.java:1203)
    at com.prosc.fmkit.PluginBridge.runTask(PluginBridge.java:1443)
    at com.prosc.fmkit.PluginBridge.doFunction(PluginBridge.java:1220)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    at sun.security.ssl.Handshaker.processLoop(Unknown Source)
    at sun.security.ssl.Handshaker.process_record(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:543)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:348)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)
    ... 15 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    ... 27 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
    at java.security.cert.CertPathBuilder.build(Unknown Source)
    ... 33 more

Mar 27, 2017 2:18:27 PM com.prosc.fmkit.PluginBridge$4 run
CONFIG: === Executing plugin function EmailLastError on thread main ===

Share this post


Link to post
Share on other sites

HI RJS-IT,

The error you are getting means that Java cannot complete the SSL handshake because the mail server you are trying to connect to either has a self-signed certificate or the certificate it has is not part of the Java trust store. Try adding the "forceTrust=true" parameter to the EmailConnectSMTP function call. This should force Java to trust the SMTP server's certificate and complete the SSL handshake. 

1 person likes this

Share this post


Link to post
Share on other sites

Thank you, service restored!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now