What does this error "javax.net.ssl.SSLException" mean?

I keep getting this error whenever Im trying to use slackSend . I get this error even when I’m just trying to print “hello world” on a channel using slackSend .

WARNING jenkins.plugins.slack.StandardSlackService publish
Error posting to Slack
javax.net.ssl.SSLException: Received fatal alert: protocol_version
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:709)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
    at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at jenkins.plugins.slack.StandardSlackService.publish(StandardSlackService.java:88)
    at jenkins.plugins.slack.workflow.SlackSendStep$SlackSendStepExecution.run(SlackSendStep.java:182)
    at jenkins.plugins.slack.workflow.SlackSendStep$SlackSendStepExecution.run(SlackSendStep.java:149)
    at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
    at hudson.security.ACL.impersonate(ACL.java:213)
    at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Please help I will highly appreciate any suggestions.

Essentially your talking to a service that uses a newer version of SSL than your configured for.

I was trying to find a good link for it, but couldn’t find anything super helpful.

I would recommend upgrading to the latest build of the java your using. Simpliest fix If your using java 8, grab latest build of java 8, if 11, use latest build of java 11.

Jenkins is eventually going to have java 11 as minimum version of java, so I also recommend upgrading to latest version of java 11 right now.

If for some reason you can’t upgrade the version of java running your controller, There are properties you can set that will tell SSL to use newer tls protocols, but i would strongly recommend upgrading instead.

1 Like

Thank you soo much for your help. I agree with you but my company is still using jenkins1.609 with old plugins and we cant upgrade it, that’s why we all have to face such type of issues everyday :frowning:

I just have one doubt, even when I’m trying this-

slackSend teamDomain: "mycompany", channel: "#re-build", message: " Please Ignore ", tokenCredentialId: "slack-rebuild"

I still get the previously mentioned error. Is there any way to explicitly mention your slack credentials, so far I tried this -

WithCredentials([string(credentialsId: 'theSlackToken', variable: 'slackCredentials')]) {
    slackSend (channel: '@johnsmith', message: 'hello there', color: '#3eb991', failOnError: true, teamDomain: 'myteamsubdomain', token: slackCredentials)

But when I copy paste these above lines in my Jenkinsfile I get error saying no such DSL method string.

There should be a syntax generator link on the side of any job. From there you can generate the exact syntax for withCredentials that your install will handle.

I don’t think the change of parameters will help slackSend though, you might be able to curl or something from the cli with withCredentials

1 Like

Firstly, Thank you sooo much for still giving attention to my question I truly appreciate it. That’s actually the first thing I tried and even after that I still got the same error. At this point I have basically tried all the combinations possible on the internet and I still got the same error. I’m veryyyy sad that I cannot get this working :frowning: :sob:

That why I posted my question here in hopes may be someone with superior expertise might be able to give a solution for this :sob: :sob:

i mean your running jenkins which is at least 5+ years out of date? I can’t imagine what your system libraries are like. There’s only going to be so much help volunteers can provide.

You could try setting up an https proxy that uses a lower tls protocol on a system with newer https libraries
You could try completely disabling tls verification (I don’t think it’ll work, and I don’t suggest it, but it might)
You could try forcing java to use newer tls protocols (as mentioned), but from back in my dot net days, that didn’t really work.

Good luck though