Cannot use Confluence XML-RPC API with https

Hi All

I am using confluence 5.10. We use XML-RPC API to connect to Confluence (from 3rd party tools) and take site exports.

Now, this process works as long as we make http calls and base URL on confluence is http.

But the moment we switch over to https, the site export falls apart and gives error message - Failed to log in to Confluence.

We have confirmed it is not an issue with SSL certificates. 

Here is the error we receive

 

 

BUILD FAILED

/home/jenkins/jobs/XXX-XXXX/workspace/cdbtool/build.xml:20: Failed to login to Confluence

        at com.xxxxx.confluenceexporter.ConfluenceExportTask.login(ConfluenceExportTask.java:118)

        at com.xxxxx.confluenceexporter.ConfluenceExportTask.execute(ConfluenceExportTask.java:59)

        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)

        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

        at org.apache.tools.ant.Task.perform(Task.java:348)

        at org.apache.tools.ant.Target.execute(Target.java:435)

        at org.apache.tools.ant.Target.performTasks(Target.java:456)

        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)

        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)

        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)

        at org.apache.tools.ant.Main.runBuild(Main.java:851)

        at org.apache.tools.ant.Main.startAnt(Main.java:235)

        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)

        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Caused by: org.apache.xmlrpc.XmlRpcException: Failed to read server's response: Remote host closed connection during handshake

        at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:161)

        at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)

        at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)

        at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)

        at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)

        at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)

        at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)

        at com.xxxxx.confluenceexporter.ConfluenceExportTask.login(ConfluenceExportTask.java:116)

        ... 17 more

1 answer

0 vote

How did you get the connection certificate info from the server and how did you add it to Jenkins? 

The error "Failed to read server's response: Remote host closed connection during handshake" suggests Jenkins is not passing any ssl information to Confluence while trying to log in.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,132 views 22 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you