Login and session conflicts with multiple Atlassian applications

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

Symptoms

If you have another Atlassian application (or another Java web application) available at the same hostname and context path as Bitbucket Server, you may experience problems such as:

  • being unable to log in to Bitbucket Server

  • being unable to set your Bitbucket Server license or otherwise complete the Bitbucket Server installation wizard

  • being unexpectedly logged out of Bitbucket Server, for example after logging in to another Atlassian application such as Confluence or Bamboo.

Cause

Java web applications identify your session by setting a cookie in your browser. This cookie is bound to the hostname and path that each application is deployed to, but ignores the port. Applications that reside at URLs where only the port is different may unintentionally overwrite each other's session information, resulting in lost sessions.

You will experience these problems if you are running your Atlassian (or other Java) applications on the same URL path with the only difference between applications being the port. Examples are:

1 2 http://localhost:8080 and http://localhost:8090 http://your.domain.com:8080 and http://your.domain.com:8090

This can occur with 2 instances of the same Atlassian application (e.g. Bitbucket Server) or with 2 different applications (e.g. Confluence and Bitbucket Server). This can also happen with any 2 Java applications, whether from Atlassian, or not.

Note that this is not the same problem that is caused by running multiple Atlassian applications in a single application server (e.g. Tomcat) container.

Resolution

The recommended resolution is to change the context path for Bitbucket Server. Please see Change Bitbucket's context path.

Ideally, you want to perform this action for other products:

A possible workaround is to use separate browsers when accessing each application (for example Firefox and Chrome).

Note that:

  • Deploying multiple Atlassian applications in a single Tomcat container is not supported, so the use of name-based virtual hosting is not recommended.

  • Because JIRA and Confluence both make heavy use of the CPU, Atlassian recommends running JIRA and Confluence on different physical machines, behind an Apache web server.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.