Problem creating an Application Link from JIRA to a HTTPS Bitbucket Server (or vice-versa)
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Trying to create an Application Link
from JIRA to Bitbucket Server can result in the following ERROR:
The host is unknown. Verify that the URL is correct.
And when attempting to create the same Application Link
from Bitbucket Server to JIRA the below error may occur:
The Remote application is not able to connect to 'Repository Manager'(Bitbucket Server) by using the URL 'https://<HOST_NAME>.<DOMAIN>:8443'.
Cause
This happens because JIRA doesn't have the Bitbucket Server Certificate on its Trusted Certs (Cacerts file).
Resolution
To successfully connect JIRA
with Bitbucket Server
using the Application Links
it is needed to import the Bitbucket Server Certificate into the JIRA Server Cacerts file.
Export the Bitbucket Server Certificate:
1
$JAVA_HOME/bin/keytool -export -alias tomcat -file file.cer
Import the Bitbucket Server's Certificate into JIRA Server Cacerts file:
1
$JAVA_HOME/bin/keytool -import -alias tomcat -file file.cer
Configure
JAVA_OPTS
variable with the path to Cacerts file:1
export JAVA_OPTS=-Djavax.net.ssl.trustStore="$JAVA_HOME/jre/lib/security/cacerts" -Djavax.net.ssl.trustStorePassword="changeit"
ℹ️ If the JIRA instance is also configured to use HTTPS thesame procedure has to be repeated on the Bitbucket Server (export JIRA Certificate, Import JIRA Certificate into Bitbucket Server Cacerts and configure the JAVA_OPTS variable on the Bitbucket Server).
Was this helpful?