Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket server upgrade from 4.X to 5.X and server.xml customizations to bitbucket.properties

Petri Panula October 24, 2018

Hi,

I need to upgrade Our bitbucket from 4.14.12 to 5.15.0.

As I haven't made the customizations to server.xml I'm a bit confused what changes I need to make to  bitbucket.properties file.

Here is the server.xml file:

<?xml version="1.0" encoding="utf-8"?>
<Server port="11005" shutdown="SHUTDOWN">
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<!--Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /-->

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<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>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">

<Connector port="11009" acceptCount="100" disableUploadTimeout="true" redirectPort="8443" enableLookups="false" maxPostSize="106700800" maxHttpHeaderSize="16384" packetSize="65536" maxThreads="300" minSpareThreads="10" protocol="org.apache.coyote.ajp.AjpProtocol" URIEncoding="UTF-8" useBodyEncodingForURI="true" scheme="https" proxyName="asd.google.fi" proxyPort="443" secure="true" connectionTimeout="60000"/>

<Connector port="11010" acceptCount="100" disableUploadTimeout="true" redirectPort="8443" enableLookups="false" maxPostSize="106700800" maxHttpHeaderSize="16384" packetSize="65536" maxThreads="300" minSpareThreads="10" protocol="HTTP/1.1" URIEncoding="UTF-8" useBodyEncodingForURI="true" scheme="https" proxyName="asd.google.fi" proxyPort="443" secure="true" connectionTimeout="60000"/>

<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="/stash" reloadable="false" useHttpOnly="true"/>
</Host>
</Engine>
</Service>
</Server>

 

So my current bitbucket.properties (is that correct?):

 

# Disable public access to projects and repositories
feature.public.access=false

#>*******************************************************
#> Migrated to database at jdbc:mysql://localhost:3306/stash_1?characterEncoding=utf8&useUnicode=true&sessionVariables=storage_engine%3DInnoDB
#> Updated on 2015-08-18T16:04:56.095+03:00
#>*******************************************************
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/stash_1?characterEncoding=utf8&useUnicode=true&sessionVariables=storage_engine%3DInnoDB
jdbc.user=stash
jdbc.password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Enable Crowd SSO
plugin.auth-crowd.sso.enabled=true

plugin.bitbucket-git.path.executable=/opt/rh/rh-git29/root/usr/bin/git

# Customizations from server.xml (need when upgraded from bitbucket 4.X to 5.X)
server.connection-timeout=60000
server.additional-connector.1.connection-timeout=60000
server.port=11009
server.additional-connector.1.port=11010
server.secure=true
server.additional-connector.1.secure=true
server.redirect-port=8443
server.additional-connector.1.redirect-port=8443
server.proxy-port=443
server.additional-connector.1.proxy-port=443
server.proxy-name=asd.google.fi
server.additional-connector.1.proxy-name=asd.google.fi
server.scheme=https
server.additional-connector.1.scheme=https


server.context-path=/stash
server.displayName=Atlassian Bitbucket
server.session.cookie.http-only=true


server.session.cookie.name=JSESSIONID
 

 

Do I need to configure that " <Server port="11005" shutdown="SHUTDOWN">" which is in server.xml to bitbucket.properties? 

And what about those " maxHttpHeaderSize" configurations? How to migrate those?

 

1 answer

1 vote
Prasanth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2018

Hi Petri

Regarding the shutdown port, this specific Tomcat property is not made available in Springboot - please see Springboot Common Application Properties. So you don't have to specify that.

Regarding maxHttpHeaderSize, you can use  server.max-http-header-size. Please see Config Properties

For more details on migrating server.xml customization have a look at Migrate server.xml customizations

Best regards,
Prasanth Thaikkalloor

Petri Panula October 25, 2018

Thanks,

I'll try those and let you know after upgrade :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events