Error 502 after upgrade 11.0.3 to 11.2.1


#1

After an hour of googling I registered here since I couldn’t resolve this.

My setup:

  • Debian Stretch with Promox 5.2.5
  • Gitlab-CE running fine in LXC container ever since Gitlab 10 was released
  • upgrade went through without errors

In the past I often had a Error 502 after upgrade but most of the time I could resolve it with either gitlab-ctl restart, gitlab-ctl reconfigure or just reboot the container.

Today nothing seemed to help in whatever order I tried it.

gitlab-rake gitlab:check returned no errors either

gitlab-ctl tail returned an overwhelming amount of lines but only those below seemed relevant

==> /var/log/gitlab/nginx/current <==
2018-08-25_13:41:08.29191 2018/08/25 13:41:07 [emerg] 1835#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018-08-25_13:41:08.29195 2018/08/25 13:41:07 [emerg] 1835#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018-08-25_13:41:08.79211 2018/08/25 13:41:07 [emerg] 1835#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018-08-25_13:41:08.79216 2018/08/25 13:41:07 [emerg] 1835#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018-08-25_13:41:09.29758 2018/08/25 13:41:07 [emerg] 1835#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018-08-25_13:41:09.29771 2018/08/25 13:41:07 [emerg] 1835#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018-08-25_13:41:09.79835 2018/08/25 13:41:07 [emerg] 1835#0: still could not bind()

I’d appreciate any help with finding and resolving the cause and hopefully help to improve Gitlab further.


#2

A friend was able to help me. Now I remember that when I installed the brand new Gitlab 10 I had no clue (about Linux either) and when I wanted to activate SSL I couldn’t find /etc/nginx/*. So I installed it and that was the cause of error 502 because I had no idea that gitlab shipped with it’s own nginx.

We uncommented this line in /etc/gitlab/gitlab.rb and remove the asterix.

nginx['listen_addresses'] = ['[::]']

Now all is working and the system nginx is disabled.