Setting scheme="https" breaks application link from JIRA to Bitbucket

Unless scheme="https" is set in server.xml, gravatar images are served over http, breaking https.

However, if scheme="https" is set, then the application link between JIRA and Bitbucket is broken on the JIRA side.

When this happens, the following message will be displayed on the JIRA side, even though the Bitbucket side says that they are connected.

"Application 'Bitbucket' seems to be offline. Click here to Relocate."

2 answers

What's your end-to-end config here?

In my shop I let Apache do the "https" on 443, and use Apache's ProxyPass and ProxyPassReverse directives to route the traffic to Bitbucket Server's tomcat running on its default port 7990.

I had all sorts of problems with my JIRA <--> Bitbucket link initially.  The trick in my case was to let Bitbucket's Tomcat know what was going on in its config (bitbucket-data/shared/server.xml), like so:

&lt;!-- The 5 un-indented lines are the ones I had to
     add to make my JIRA/Bitbucket application link work:
--&gt;
&lt;Connector port="7990" protocol="HTTP/1.1"
           connectionTimeout="20000"
           useBodyEncodingForURI="true"

redirectPort="443"
secure="true"
scheme="https"
proxyName="bitbucket.internal.mycompany.com"
proxyPort="443"

           compression="on"
/&gt;

 

- Regards,
Sylvie Davies
Founder and Software Engineer, bit-booster.com

 

p.s.  be sure to try out my Bit-Booster Commit Graph And More add-on.  It's the best commit graph add-on for Bitbucket Server. Dramatically improves your team's ability to see exactly what's happening in your Git repositories. Don't forget to enable the included Bit-Booster hook to prevent foxtrot merges in master.

Steve King Atlassian Team Jul 07, 2016

Great point Sylvie!

We also have some other guides about offloading SSL before it gets to Tomcat, for Apache: Securing Bitbucket Server with Apache using SSL and for a more extensive guide check out the guide on Proxying and Securing Bitbucket Server.

I tired it and the problem persists with those 5 options set. If either the scheme or proxyPort options are set, then when I look at the application link on the JIRA server it sees Bitbucket as being offline.

0 vote
Steve King Atlassian Team Jul 07, 2016

Hi Tony,

Thanks for getting in contact. When you switch your Bitbucket or JIRA instance to HTTPs you will need to update the applink to tell it to look at https://your.example instead of http://your.example. The easiest way to do this is to click on the 'relocate application' link that appears on the applinks page when it shows you Bitbucket is offline.

However, if you're using a self signed certificate you might have some additional steps to go through, due to the way CA certificates need to be trusted for the instances to talk to each other securely. You can see our troubleshooting guide on applinks and SSL at https://confluence.atlassian.com/display/APPLINKS/SSL+and+application+link+troubleshooting+guide, but I'd recommend raising a support request to track it as well, to make sure you get answers fast if something else is going on.

Thanks!

Even if I update the app link to https it doesn't make any difference. Our certificate is already signed and the https site appears normally secured. But the problem is not the website, it's the application link on the JIRA side.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

28,934 views 26 12
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