4

I'm using Gitlabs latest Omnibus-package on an EC2 Ubuntu machine.

To refresh my SSL certificate (issued via Let's Encrypt) I need to stop Gitlab's Nginx so Let's Encrypt can verify that I possess the domain. Therefore I hit sudo gitlab-ctl stop.

The sudo gitlab-ctl status afterwards is:

down: gitlab-workhorse: 325s, normally up; run: log: (pid 1109) 5361843s
down: logrotate: 324s, normally up; run: log: (pid 1104) 5361843s
down: nginx: 324s, normally up; run: log: (pid 1103) 5361843s
down: postgresql: 324s, normally up; run: log: (pid 1101) 5361843s
down: redis: 323s, normally up; run: log: (pid 1102) 5361843s
down: sidekiq: 322s, normally up; run: log: (pid 1112) 5361842s
down: unicorn: 322s, normally up; run: log: (pid 1100) 5361843s

However when I access my domain I get Nginx' 502 Bad Gateway.

How can I truly stop its internal Nginx.

Besides the certificate part the etc/nginx/gitlab.rb is still the default.

Here's the output of ps -eaf|grep -i nginx

root      1091   985  0  2015 ?        00:07:15 runsv nginx
root      1103  1091  0  2015 ?        00:04:14 svlogd -tt /var/log/gitlab/nginx
gitlab-+ 24669     1  0  2015 ?        01:03:38 nginx: worker process
root     27272  1091  0 13:12 ?        00:00:00 /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
ubuntu   27275 27254  0 13:12 pts/2    00:00:00 grep --color=auto -i nginx
Hedge
  • 16,142
  • 42
  • 141
  • 246
  • Is it related to https://gitlab.com/gitlab-org/gitlab-ci/issues/136#note_1196543? (the error itself can also mean https://github.com/gitlabhq/gitlabhq/issues/1527#issuecomment-8821679) – VonC Feb 08 '16 at 12:26
  • From what I read the other people are actually trying to run Gitlab. All I want is to stop its Nginx. – Hedge Feb 08 '16 at 12:30
  • If you have access to the server, do you see an nginx process still running? – VonC Feb 08 '16 at 12:31
  • I don't know where to look for it. It is neither installed as a service (`sudo service --status-all`) neither `initctl` (`sudo initctl list`) – Hedge Feb 08 '16 at 12:37
  • I mean: `ps -eaf|grep -i nginx` return nothing? – VonC Feb 08 '16 at 12:37
  • I added the output to the question. – Hedge Feb 08 '16 at 13:13
  • Don't you have a reverse proxy ahead of your gitlab instance ? Seems it's something else than gitlab that answer 502 – Tensibai Feb 08 '16 at 13:31
  • @Tensibai Yes, I have. But it is stopped independently of gitlab (`nginx stop`) – VonC Feb 08 '16 at 14:28
  • You seems to still have something in between which answer to external request, contact your netadmin ... – Tensibai Feb 08 '16 at 14:38
  • 1
    Just run this sudo gitlab-ctl stop nginx https://stackoverflow.com/a/32974637 – user8215365 Jun 26 '17 at 11:50

1 Answers1

2

For completeness sake what I ended up doing three years ago was what @user8215365 suggested. Simply invoking sudo gitlab-ctl stop nginx did the trick.

Hedge
  • 16,142
  • 42
  • 141
  • 246