504 Gateway timeout when setting up Confluence Data Center in AWS

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

Summary

Problem

You receive a 504 Gateway Timeout in your browser while walking through the set up process for Confluence Data Center in an AWS environment.

This typically occurs when after you click next on the database setup stage.

(Auto-migrated image: description temporarily unavailable)

Diagnosis

Environment

  • Confluence Data Center running on one or more EC2 instances

  • You already have an Elastic Load Balancer setup for this

Cause

The 504 Gateway Timeout is caused by the using the Elastic Load Balancer (ELB) address. When the ELB is unable to reach the /status url of the Confluence page during the short process-intensive period required for the database setup, the ELB serves the user a 504.

Solution

Workaround

Wait for the database setup to finish in the background, as it's likely still running in the background and simply being masked by the 504 error.

Resolution

  • Temporarily increase the Idle-timeout to a very high value at ELB as per the AWS document

  • If you still running into issues, connect your browser directly to the Confluence node on the IP and default port (i.e. http://10.10.10.153:8090/) instead of using the ELB address. You may need to restart the setup process if you are unable to access the setup page after several minutes have passed.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.