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

+1 vote

Hi Guys,

I tried to use email notification in jenkins. But it shows me the below error.

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:169)
at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)
at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:216)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:395)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
Caused: javax.mail.MessagingException: Could not connect to SMTP host: smtp.yandex.ru, port: 465;
  nested exception is:
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
at javax.mail.Service.connect(Service.java:317)
..........

How can I solve this error?

May 12 in Jenkins by akhtar
• 25,210 points
1,372 views

1 answer to this question.

0 votes

Hi@akhtar,

I also faced the same issue and I solved this by the following configuration change to /etc/sysconfig/jenkins.

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dmail.smtp.starttls.enable=true -Dmail.smtp.ssl.protocols=TLSv1.2"

After that restart your jenkins service.

Hope this will solve your error.

answered May 12 by MD
• 56,940 points
Goddamn, i spend almost 4 hrs for finding this solution! It's very helpful, thank you!
Many thanks for solution . This is typical issue with RHEL and Centos. You save my day.

Related Questions In Jenkins

+2 votes
6 answers
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
680 views
+2 votes
1 answer
0 votes
1 answer