Error sending email. Could not convert socket to TLS

Hi all,

Wondering what the cause is, haven’t found much answers online. One forum posts mentioned something about reinstalling the alarm module. I have tried this but still same thing.
I am not setting up any type of alarming anyway.

I’ve set up a button with a script to send email.

The Email script works fine on one machine. (Running Win 10, 64bit), can send the email.

But I get an error on my other machine. (Running XP SP3, 32bit), which I need for testing purposes.

Both machines use the exact same script.
Tried running just the one machine at a time but to no avail.

I suspect it something is blocking connection, Java type issue?

Anyone with ideas, please share suggestions or ideas to resolve this.
Cheers.

Below is the error log.

Error Log:
Traceback (most recent call last):

File “event:actionPerformed”, line 19, in

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error sending email.

caused by GatewayException: Error sending email.
caused by javax.mail.MessagingException: Could not convert socket to TLS;

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

Ignition v7.7.5 (b2015071516)
Java: Oracle Corporation 1.8.0_60

Expanded version:
Traceback (most recent call last):
File “event:actionPerformed”, line 19, in
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:328)

at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:302)

at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendEmail(GatewayInterface.java:624)

at com.inductiveautomation.factorypmi.application.script.builtin.ClientNetUtilities._sendEmail(ClientNetUtilities.java:105)

at com.inductiveautomation.ignition.common.script.builtin.AbstractNetUtilities.sendEmail(AbstractNetUtilities.java:115)

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)

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error sending email.

at org.python.core.Py.JavaError(Py.java:495)
at com.inductiveautomation.factorypmi.application.script.builtin.ClientNetUtilities._sendEmail(ClientNetUtilities.java:108)
at com.inductiveautomation.ignition.common.script.builtin.AbstractNetUtilities.sendEmail(AbstractNetUtilities.java:115)
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 org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.__call__(ScriptManager.java:428)
at org.python.core.PyObject.__call__(PyObject.java:320)
at org.python.pycode._pyx1.f$0(<event:actionPerformed>:19)
at org.python.pycode._pyx1.call_function(<event:actionPerformed>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:624)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:168)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:265)
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)
at com.sun.proxy.$Proxy20.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error sending email.
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:328)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:302)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendEmail(GatewayInterface.java:624)
at com.inductiveautomation.factorypmi.application.script.builtin.ClientNetUtilities._sendEmail(ClientNetUtilities.java:105)
… 54 more
Caused by: javax.mail.MessagingException: Could not convert socket to TLS;
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.startTLS(SMTPTransport.java:1999)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:709)
at javax.mail.Service.connect(Service.java:386)
at javax.mail.Service.connect(Service.java:245)
at javax.mail.Service.connect(Service.java:194)
at javax.mail.Transport.send0(Transport.java:253)
at javax.mail.Transport.send(Transport.java:124)
at com.inductiveautomation.ignition.gateway.script.GatewayNetUtilities.sendEmail(GatewayNetUtilities.java:155)
at com.inductiveautomation.ignition.gateway.servlets.Gateway._sendEmail(Gateway.java:993)
at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:393)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
at java.lang.Thread.run(null)

Ignition v7.7.5 (b2015071516)
Java: Oracle Corporation 1.8.0_60

The client on your XP machine is having trouble talking to the Gateway, and that trouble involves SSL.

  1. What version of Java is the XP machine running?
  2. Did you have this problem before the Gateway upgraded Java to 8u60?
  3. Have you made any SSL-related changes to your ignition.conf file?

[quote=“KathyApplebaum”]The client on your XP machine is having trouble talking to the Gateway, and that trouble involves SSL.

  1. What version of Java is the XP machine running?

  2. Did you have this problem before the Gateway upgraded Java to 8u60?

  3. Have you made any SSL-related changes to your ignition.conf file?[/quote]

  4. The XP machine is running Java 8u60 (Oracle Corporation 1.8.0_60)

  5. I am not sure whether I had this problem before. Ignition has only been recently installed on this machine. This is the first time on this machine I am trying this.

  6. I have not touched the ignition.conf file or made any SSL related changes.

Darn, that took away the easy fixes.

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: 

looks like it’s the pertinent error. Google indicates that means your client can’t find the cached certificate. This might be an issue that’s much, much faster to resolve if you call in to support.

I got it going again. Appears to be my Antivirus software blocking the SSL.

I have Avast anti virus installed. Disabling it did the trick as suggested by support.

To be more specific, and for reference to those having a similar issue, I found that disabling the ‘SSL Scanning’ within the Avast settings will also work, rather than disabling the whole of Avast.

1 Like