DebugFactor.com | Forum

Ansible Tower: 502 Bad Gateway error

When I try to login into Ansible Tower UI, I am getting 502 Bad Gateway nginix in the browser. The issue is mostly seen when we have couple of Ansible Jobs running in parallel.

Is there a way to identify the root cause of this issue and fix it? This keeps happening frequently.

You can check the below logs to check if there were any issues.

/var/log/supervisor/awx-uwsgi.log
/var/log/nginx/error.log
/var/log/supervisor/supervisord.log

Also, you can try restarting the tower service using the below command.
Make sure to execute with root user.

ansible-tower-service restart

After restart, check the status using below command.

 ansible-tower-service status

Verify all the processes are running.

ansible-tower
nginx
memcache
supervisord

Also check supervisorctl status and make sure all processes are running.

supervisorctl status