0

after a

service nginx stop

I checked for ports 80:

ps ax | grep nginx
  898 ?        Ss     0:00 runsv nginx
  943 ?        S      0:00 svlogd -tt /var/log/gitlab/nginx
 4063 pts/0    S+     0:00 grep --color=auto nginx
29681 ?        Ss     0:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
29682 ?        S      0:00 nginx: worker process
29683 ?        S      0:00 nginx: worker process
29684 ?        S      0:00 nginx: worker process
29685 ?        S      0:00 nginx: worker process
29686 ?        S      0:00 nginx: worker process
29687 ?        S      0:00 nginx: worker process
29688 ?        S      0:00 nginx: worker process
29689 ?        S      0:00 nginx: worker process
29690 ?        S      0:00 nginx: worker process
29691 ?        S      0:00 nginx: worker process
29692 ?        S      0:00 nginx: worker process
29693 ?        S      0:00 nginx: worker process
29694 ?        S      0:00 nginx: worker process
29695 ?        S      0:00 nginx: worker process
29696 ?        S      0:00 nginx: worker process
29697 ?        S      0:00 nginx: worker process
29698 ?        S      0:00 nginx: cache manager process

Then I killed all those processes

kill -9 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 29697 29698

aaaand its still there?

ps ax | grep nginx:
 9074 ?        Ss     0:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
 9105 ?        S      0:00 nginx: worker process
 9107 ?        S      0:00 nginx: worker process
 9108 ?        S      0:00 nginx: worker process
 9109 ?        S      0:00 nginx: worker process
 9110 ?        S      0:00 nginx: worker process
 9111 ?        S      0:00 nginx: worker process
 9112 ?        S      0:00 nginx: worker process
 9113 ?        S      0:00 nginx: worker process
 9114 ?        S      0:00 nginx: worker process
 9115 ?        S      0:00 nginx: worker process
 9116 ?        S      0:00 nginx: worker process
 9117 ?        S      0:00 nginx: worker process
 9118 ?        S      0:00 nginx: worker process
 9119 ?        S      0:00 nginx: worker process
 9120 ?        S      0:00 nginx: worker process
 9121 ?        S      0:00 nginx: worker process
 9122 ?        S      0:00 nginx: cache manager process
 9123 ?        S      0:00 nginx: cache loader process
 9297 pts/0    R+     0:00 grep --color=auto nginx:

How and why? This makes it super confusing with an error I am trying to trace where I am getting a bind() to 0.0.0.0:80 failed (98: Address already in use) - nginx is blocking itself or what? :D

2

Your own process list should tell you what's going on:

nginx: master process /opt/gitlab/embedded/sbin/nginx

See where it says embedded nginx.

So when you run service nginx stop this stop the system nginx.

The nginx run by gitlab is another one you have to deal with separately. As in, if you don't want to use Gitlab's embedded nginx, you need to unbundle it.

| improve this answer | |
  • Thanks. I totally missed that :) For anyone stumbling across this: gitlab-ctl stop nginx did the job in this case.. – Gnaar-o-mat Aug 18 '19 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.