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, 2020 in Jenkins by akhtar
• 38,230 points
20,557 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, 2020 by MD
• 95,440 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

0 votes
1 answer
0 votes
1 answer
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,458 views
+2 votes
1 answer
+3 votes
7 answers

Is it possible to shift or move jobs between two jenkins servers?

Hi, You can copy Jobs in between your ...READ MORE

answered Dec 16, 2020 in Jenkins by MD
• 95,440 points
44,382 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP