Users receive 404 Not Found error when accessing Jira through nginx

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

This may happen after a VM restart or an OS restart.

Whenever you try to access JIRA through the proxy URL, you get the following generic 404 error:

(Auto-migrated image: description temporarily unavailable)

You will also see the following "permission denied" errors in the nginx logs: 

1 2020/08/22 12:31:22 [xxxx] 3xx#3xxx: *138 connect() to 10.xxx.xxx.xxx:8080 failed (13: Permission denied) while connecting to upstream, client: 10.xxx.xxx.xxx, server: , request: "GET /rest/gadget/1.0/issueTable/filter?

Environment

  • Any Linux distribution that ships with SELinux 

  • Any version of Jira

Diagnosis

Check for errors in the SELinux logs (you'll see permission denied for the nginx server over 8080 or whatever port Jira is listening on):

1 sudo cat /var/log/audit/audit.log | grep nginx | grep denied

Cause

SELinux is preventing connections on port 8080 for the nginx process.

Note that this port may be different depending on your setup.

Solution

Execute the following command in your server:

1 setsebool httpd_can_network_connect on -P

Refer to http://stackoverflow.com/questions/23948527/13-permission-denied-while-connecting-to-upstreamnginx for more info.

You should not need to restart any services, including Jira. 

Updated on February 27, 2025

Still need help?

The Atlassian Community is here for you.