1

Am trying to calling Jira using Jira Rest Api. While creating a connection am getting below error.

Jira URL: https://jira.dv.xxxxx.com/rest/api/2/search?&fields=status,projectkey&jql=clientId%3DTABC+and+taskid%3DTABC-2

Java Code:

public static HttpURLConnection getJiraClientConnection(final URL url) throws IOException{
        PropertiesManager prMgr = PropertiesManager.getInstance();
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod(CommonConstants.GET);
        conn.setRequestProperty(CommonConstants.ACCEPT, CommonConstants.ACCEPTTYPE);
        conn.setRequestProperty(CommonConstants.AUTHORIZATION, CommonConstants.BASIC + prMgr.getPassword());
}

Error:

        javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
        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)

I googled for this error, I was not getting any correct solution for this.

Thank you in advance!

1
  • This answer has some options that may help: stackoverflow.com/questions/6353849/… I would first check your SSL version compatibility and certificate trust path. Commented Oct 12, 2018 at 12:49

1 Answer 1

0

From another user, "This error means your java truststore doesnt have ssl certificate for service you are trying to connect." javax.net.ssl.SSLHandshakeException. And a more in depth trouble shooting guide here Received fatal alert: handshake_failure through SSLHandshakeException

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.