Bitbucket Upgrade to 5.5.1 properties file

mindoverdata February 15, 2018

Trying to upgrade from 4.14.3 to 5.5.1 but am running into a problem with the new configuration scheme. Running IIS in front of all of our Atlassian products, worked fine via HTTPS until this upgrade. Need some help decrypting the new properties.

Highlights:
IIS Connector setting in server.xml - need some direction in configuring this into the new format:
<Connector port="8011" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

Original connector:
<Connector port="7990" protocol="HTTP/1.1" connectionTimeout="20000" useBodyEncodingForURI="true" redirectPort="8443" compression="on" compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />


added
server.context-path=/bitbucket to get the pathing correct

tried adding this (with variations) to get HTTPS and the redirect working:
server.secure=true
server.scheme=https
server.proxy-port=443
server.proxy-name=support.mod-llc.com
server.additional-connector.1=8011
server.additional-connector.1.secure=true
server.additional-connector.1.scheme=https
server.additional-connector.1.ssl.enabled=true
server.additional-connector.1.redirect-port=8443

but I cannot get to the site unless I use http and add the port :7990 to the URL.

Any help would be greatly appreciated.

Old Server.xml:
<?xml version='1.0' encoding='utf-8'?>
<Server port="8006" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name="Catalina">

<Connector port="8011" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

<Connector port="7990" protocol="HTTP/1.1"
connectionTimeout="20000"
useBodyEncodingForURI="true"
redirectPort="8443"
compression="on"
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />
<Engine name="Catalina" defaultHost="localhost">

<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Context docBase="${catalina.home}/atlassian-bitbucket"
path="/bitbucket"
reloadable="false"
useHttpOnly="true"/>

</Host>
</Engine>
</Service>
</Server>

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2018

Hi Tom! For the server.addition-connector.1 you'll need to specify the proxy-name again. Also, the redirect-port to 8443 isn't really needed. Since the proxy is handling SSL, the communication between the proxy and Bitbucket will be http anyways. As long as people are going through the proxy first (which they always should) there shouldn't be an issue.

We're not really sure what you're doing with the 8011 connector port, what are you using it for?

Another thing we've noticed is that AJP went away in 5.x. For more info about that, you can read this thread.

 

Lastly, your comment about "I cannot get to the site unless I use http and add the port :7990 to the URL." might just be due to you not setting the baseURL properly. Can you check that?

Let us know how it goes!

Ana

mindoverdata February 19, 2018

Hi Ana,

Thank you for your feedback.  The 8011 Connector port is how IIS, using AJP, connects to BitBucket's tomcat server (https://confluence.atlassian.com/adminjiraserver071/integrating-jira-applications-with-iis-802593039.html).  That explains how to make the connection (for Jira but it works for Confluence :8010 and BitBucket :8011).  So this is the root of my problem, removing AJP support removes the connector and I need to know how to tell IIS to send the request to the correct port.  The article you linked to explains the removal of AJP support but does not give any insight into how to reconfigure IIS to send requests to tomcat.

 

My comment about not getting to the site correctly is the entirety of this issue.  I cannot get to the site using a common URL via IIS.  Going to the port directly is bypassing IIS and hitting tomcat, which works so I'm guessing my bitbucket.properties file is set up correctly and does not need the old AJP connector info.

mindoverdata February 22, 2018

Any help on this?  The work around is changing all URL's to be http instead of https and including the port number so people can access the repository.  Not an optimum solution.

I'd still like IIS to handle the HTTPS requests and pass the info along to BitBucket much like the old AJP solution, please let me know if this is going to be supported going forward so we can decide if we want to continue our migration from our git repository to BitBucket.  We only have the introductory version of BitBucket while we determine if it is going to meet our needs.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events