Nginx – “gitlab-shell self-check failed” after installing GitLab

gitlabnginxUbuntu

So I installed GitLab and nginx and now i get a 502 Bad Gateway error when accessing it.
I went through with the check sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production and found out I have an error that reads:

  Check GitLab API access: FAILED. code: 502
  gitlab-shell self-check failed
  Try fixing it:
  Make sure GitLab is running;
  Check the gitlab-shell configuration file:
  sudo -u git -H editor /home/git/gitlab-shell/config.yml
  Please fix the error above and rerun the checks.

Best Answer

I had the same problem. In the error log file (log/unicorn.stderr.log) I found the problem. Mine was a port problem that was already used in the file (config/unicorn.rb) I changed :listen "localhost: 8081" by default is in 8080