504 Gateway timeout when setting up Confluence Data Center in AWS
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
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.
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.
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.