Problems creating trusted connection between JIRA and Confluence?
Asked by Rondel Ward:

I have a problem setting up a trusted connection between JIRA and counfluence. I followed the instructions here <http://confluence.atlassian.com/display/CONF35/Setting+Up+Trusted+Communication+between+JIRA+and+Confluence>. I am using Confluence 3.5.11 and JIRA 4.4.3 and I am unable to set up the trusted connection from either direction.

I really only want to be able to insert JIRA issues into Confluence. I had the JIRA admin set up Incoming Authentication using Trusted Applications link to Confluence using URL of the form http:\\\\abc:8080. (All these servers are internal if that matters). He left the IP and Timeout blank and used the following URL patterns:

/plugins/servlet/streams

/sr/jira.issueviews:searchrequest

/secure/RunPortlet

/rest

/rpc/soap  
When he clicks apply, he gets the following error:  
**Unable to retrieve the application's certificate: org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms**

The server URL is correct so that isn't the issue. On the Confluence side, I set up Outgoing Authentication to use Trusted communication. I didn't have any options for configuration here, only a 'Press apply to enable Trusted Applications' button.

How can I resolve this problem? Both server URLs have been verified so that isn't the problem. Is there some step that I am missing or is there a workaround to fix this issue?


Answers:
author: Frederic Iterbeke
body: We are having some kind of similar problem, haven't completely figured it out yet BUT a possible (very ugly) workaround might be to configure your (Confluence and JIRA) server URLs based on IP addresses instead of hostnames. It works for us, partially.

Nevertheless, since it is a connection error it could always be the machines cannot physically access each other. Can both servers reach one another (e.g. ping)?

comments: author: Rondel Ward
body: That's it! It's weird because both machines or in the same internal network but I can't ping from the Confluence server to JIRA. I'm going to have to talk to the network admins because I can't even ping it using the IP address.


author: Frederic Iterbeke
body: Could be a firewall issue, or just be the machines CAN reach each other but one machine refuses ICMP messages (ping), in which case it still is a different problem. But judging by the fact that one machine can reach the other and the inverse is not true, my guess would be a faulty network config...

Be sure to check with your network admins if the URLs (and ports) for both servers are reachable from both sides :)


author: Rondel Ward
body: The ping failed from both servers with both IPs and names. I'm getting the network admins to create a rule to allow the 2 servers to talk to each other. Thanks!


author: Frederic Iterbeke
body: Glad I could be of any help :) Good luck with it!


author: Andrew Frayling
body: Hi Rondel,

Are your Confluence and JIRA instances on separate machines? If so you need to make sure that the clocks on each server are synchronised otherwise you'll get mismatches between certificate requests and replies which could cause the error that you're seeing.

Andrew.

comments: author: Rondel Ward
body: They are on seperate machines. I will check to see if I can get the clocks synchronized but that makes sense to me. I will provide an update when I get that resolved. I'm guessing that it is probably not recommended to set the timeout to 0.


author: Julio Mugabe
body: Did u ever get a resolution for this? I'm having the same issue now.


author: Cyrille Martin
body: You don't use any SSO plugin for your JIRA ?You could try to delegate the user management to JIRA.

comments: author: Rondel Ward
body: I could try that but I don't think that's the issue. I can't seem to successfully link to JIRA at all despite having the application links set up 'seemingly' correctly. My issue isn't really connected to the Authentication piece. Confluence and JIRA both authenticate to AD successfully but I can't get them to communicate with each other.


author: Cyrille Martin
body: Hi Rondel,

Do you have any configuration or delegation of the user authentification on JIRA and/or Confluence ?

Regards,

comments: author: Rondel Ward
body: Well my JIRA instance and Confluence instance have the same user base because they both pull from Active Directory. I didn't explicitly configure any delegation in Confluence besides trying to follow the steps in the documentation to set up a 'Trusted Connection' between the two applications.

Should I have performed some extra step?


Tags: confluence-app

jira