404s when accessing Jira through nginx
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
We witnessed this issue after a VM restart. This issue can occur whenever the OS is restarted. Whenever you try to access JIRA through the proxy URL, you get the following generic 404 error:
You will also see the following "permission denied" errors in the nginx logs:
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?
- Any Linux distribution that ships with SELinux
- Any version of Jira
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):
sudo cat /var/log/audit/audit.log | grep nginx | grep denied
SELinux is preventing connections on port 8080 for the nginx process.
Note that this port may be different depending on your setup.
Execute the following command in your server:
setsebool httpd_can_network_connect on -P
You should not need to restart any services, including Jira.