Insights 502 Bad Gateway nginx

When attempting to go to Looker, a 502 Bad Gateway nginx/1.24.0 error is thrown.

Issue Description: When going to the Looker portal, a 502 Bad Gateway Error is thrown.



Root Cause: The 502 error usually means that the Container with the Looker process is failing which means Looker is not starting.

Diagnosing:

  • A 503 error is thrown in the development tool that pointed to 3 items:
  1. The first thing Insights attempts to do is access Looker. The 502 error usually means that the Looker container process could not start with gninx
  2. Following under the Insights installation directory - docker exec -it looker-container
  3. Perform cd workdir
  4. Run ls to list all the files in workdir
  5. Run the supervisorctl status all command to see that the Looker container was showing as FATAL
  1. Because of this error, go to lookeriniterror file and observe permission-denied error:
  1. If found the user that Insights is installed under, check the permission level
  2. Verify if the user has incorrect permissions
  3. Update the permissions by running (first command changes the owner of the file if its not 'looker' "chown -R looker insights" "chmod -R 0755 insights"
  4. Restart the container - "docker restart looker-container"
  5. Run "docker exec -it looker-container" and "supervisorctl status all" nd can see the looker container running