Support Questions
Find answers, ask questions, and share your expertise

Getting MessagingException Failure from PutEmail Processor

New Contributor

Hi,

 

I am getting failure in PutEmail Processor in our organization's nifi server.The error states that "Could not convert socket to TLS:routing to failure: javax.mail.MessagingException: Could not convert socket to TLS:
nested exception is:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake"

 

I routed the failure relation back to processor and after 30-40(randomly) or more retries it processes successfully.Though trying to figure out why its getting failure in first place.

Attaching the log here.

2021-10-25 12:44:36,643 ERROR [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.PutEmail PutEmail[id=bdc0872f-2860-12ce-c193-24605d5b6823] Failed to send email for StandardFlowFileRecord[uuid=844b4761-2a4c-439a-9f3d-5e6f06739c00,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1635165813775-357600, container=default, section=224], offset=3718, length=82370],offset=0,name=SampleFile.csv,size=82370]: Could not convert socket to TLS; routing to failure: javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
javax.mail.MessagingException: Could not convert socket to TLS
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1907)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:666)
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 org.apache.nifi.processors.standard.PutEmail.send(PutEmail.java:541)
at org.apache.nifi.processors.standard.PutEmail.onTrigger(PutEmail.java:395)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1174)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1002)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:549)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:486)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1902)
... 20 common frames omitted
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
... 26 common frames omitted

 

Any help would be appreciated.

 

https://community.cloudera.com/t5/Support-Questions/remote-host-closed-connection-during-handshake/m... 

 

Thanks,

Kamal

1 ACCEPTED SOLUTION

Accepted Solutions

New Contributor

We resolved this issue by updating the version of java from 8 to 9

View solution in original post

1 REPLY 1

New Contributor

We resolved this issue by updating the version of java from 8 to 9

View solution in original post