Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sheraz
Contributor II
Contributor II

Exception in tSendMail_1 after converting job to .bat

Hi,

I'm using JRE 1.8.0_291 and was unable to send email via tSendMail from Talend Studio. This email send error was fixed by commenting following lines in :C:\Program Files\Java\jre1.8.0_291\lib\security\java.security

# jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \

#   DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \

Now, I have generated .bat file to run talend job for Windows Scheduler, but it is giving same email send error here. I'm not sure how instruct this compiled job not use above setting that I earlier fixed in JRE security file.

I'm getting below error while running the same job after converting to .bat from console:

Exception in component tSendMail_1 (MTest)

javax.mail.MessagingException: Can't send command to SMTP host;

 nested exception is:

    javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)

    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)

    at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:847)

    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:384)

    at javax.mail.Service.connect(Service.java:297)

    at javax.mail.Service.connect(Service.java:156)

    at javax.mail.Service.connect(Service.java:105)

    at javax.mail.Transport.send0(Transport.java:168)

    at javax.mail.Transport.send(Transport.java:98)

    at local_project.mtest_0_1.MTest.tSendMail_1Process(MTest.java:448)

    at local_project.mtest_0_1.MTest.runJobInTOS(MTest.java:793)

    at local_project.mtest_0_1.MTest.main(MTest.java:634)

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

    at java.base/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:172)

    at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)

    at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)

    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:434)

    at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:904)

    at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1274)

    at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:101)

    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)Exception in component tSendMail_1 (MTest)

javax.mail.MessagingException: Can't send command to SMTP host;

 nested exception is:

    javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)

    at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)

    at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:847)

    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:384)

    at javax.mail.Service.connect(Service.java:297)

    at javax.mail.Service.connect(Service.java:156)

    at javax.mail.Service.connect(Service.java:105)

    at javax.mail.Transport.send0(Transport.java:168)

    at javax.mail.Transport.send(Transport.java:98)

    at local_project.mtest_0_1.MTest.tSendMail_1Process(MTest.java:448)

    at local_project.mtest_0_1.MTest.runJobInTOS(MTest.java:793)

    at local_project.mtest_0_1.MTest.main(MTest.java:634)

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

    at java.base/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:172)

    at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)

    at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)

    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:434)

    at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:904)

    at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1274)

    at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:101)

    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)

Any help is appreicated.

Cheers.

Labels (4)
1 Solution

Accepted Solutions
Sheraz
Contributor II
Contributor II
Author

Obviously, this is the problem with conflicting versions of Jay. I installed below versions and SMTP version is working like a charm, if I run the job with studio of a from a batch file, all worked perfectly for me as of today 🙂

 

jdk-14.0.2

jre1.8.0_271

View solution in original post

5 Replies
gjeremy1617088143

Hi , have you set -Dmail.smtp.ssl.protocols=TLSv1.1 in the property of the JVM ?

Send me Love and Kudos

Anonymous
Not applicable

Hello,

We see you have disabled “jdk.tls.disabledAlgorithms” parameter for your Java. Did you generate .bat file to run your talend job for Windows Scheduler on the same server?

Best regards

Sabrina

 

Sheraz
Contributor II
Contributor II
Author

Hi Sabrina,

 

yes, after disabling security tls algorithm in java, tSendmail started to send email from Talend Studio. Later , I generated.bat file and getting this this error when running batch on console.

 

what should i do next

 

Appreciate you help and Thanks,

Sheraz

Sheraz
Contributor II
Contributor II
Author

Obviously, this is the problem with conflicting versions of Jay. I installed below versions and SMTP version is working like a charm, if I run the job with studio of a from a batch file, all worked perfectly for me as of today 🙂

 

jdk-14.0.2

jre1.8.0_271

Anonymous
Not applicable

Hello,

Actually JDK 14 is not list in the compatible java environment table officially.

Here is online documentation about: TalendHelpCenter: Compatible Java Environments

Best regards

Sabrina