On my server (Debian) I had nginx installed. Using this nginx I installed WordPress (NOT in docker, but “directly”).
Nginx was used to run the wordpress using SSL, redirecting all Port 80s to 443 and in addition worked as reverse proxy for docker containers (nextcould, mail, …).
Everything worked fine.
At a point in time my debian complained it is too old and not supported anymore, so I upgraded it. (Now its Debian Buster).
After the Debian upgrade “things” did not work anymore as before.
Currently I face the problem that I got two nginx master processes running:
root 929 0.0 0.0 9332 1184 ? Ss 12:58 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
nobody 930 0.0 0.0 9656 3756 ? S 12:58 0:00 nginx: worker process
nobody 931 0.0 0.0 9656 3740 ? S 12:58 0:00 nginx: worker process
nobody 932 0.0 0.0 9864 7108 ? S 12:58 0:00 nginx: worker process
nobody 933 0.0 0.0 9656 3764 ? S 12:58 0:00 nginx: worker process
root 2398 0.0 0.0 196 4 pts/0 S+ 12:59 0:00 s6-supervise nginx
root 2428 0.0 0.0 41532 7144 ? Ss 12:59 0:00 nginx: master process /usr/sbin/nginx -g daemon off;
www-data 2527 0.0 0.0 41888 4920 ? S 12:59 0:00 nginx: worker process
www-data 2528 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
www-data 2529 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
www-data 2530 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
www-data 2531 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
www-data 2532 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
www-data 2533 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
www-data 2534 0.0 0.0 41888 2912 ? S 12:59 0:00 nginx: worker process
root 16519 0.0 0.0 6204 892 pts/0 S+ 14:49 0:00 grep nginx
I wonder where those two instances are started. I a similar post here it said it could be started as startup script in /etc/init.d (where it is) or as service in /etc/initd
=> Not in my case, I checked
Another answer was: Maybe its running in docker => Not in my case. No docker running nginx.
Having the two master processes running the nginx log complains about not being able to access port 443 and 80. Seems like both masters try to handle those ports.
My assumption is that the upgrade of nginx got me the second nginx master.
having a look at the owners of the processes there is root and nobody. This seems to be the “new” nginx instance. user www-data sounds like my old one.
How to get rid of both masters and get back to a single one?
PSTree Gave me this (I deleted a couple of lines):
systemd─┬─agetty
├─atd
├─containerd───13*[{containerd}]
├─containerd-shim─┬─s6-svscan─┬─s6-supervise
│ │ ├─9*[s6-supervise───s6-log]
│ │ ├─s6-supervise───dovecot─┬─anvil
│ │ │ ├─config
│ │ │ ├─2*[imap-login]
│ │ │ ├─log
│ │ │ └─stats
│ │ ├─2*[s6-supervise───node───10*[{node}]]
│ │ ├─s6-supervise───rsyslogd───2*[{rsyslogd}]
│ │ ├─s6-supervise───nginx───8*[nginx]
│ │ ├─s6-supervise───clamd───{clamd}
│ │ ├─s6-supervise───redis-server───4*[{redis-server}]
│ │ ├─s6-supervise───cron
│ │ ├─s6-supervise───rspamd───9*[rspamd]
│ │ ├─s6-supervise───php-fpm7.4───3*[php-fpm7.4]
│ │ └─s6-supervise───p0f
│ └─11*[{containerd-shim}]
├─cron
├─dbus-daemon
├─dockerd─┬─2*[docker-proxy───12*[{docker-proxy}]]
│ ├─2*[docker-proxy───5*[{docker-proxy}]]
│ ├─12*[docker-proxy───7*[{docker-proxy}]]
│ ├─4*[docker-proxy───6*[{docker-proxy}]]
│ ├─docker-proxy───8*[{docker-proxy}]
│ ├─docker-proxy───13*[{docker-proxy}]
│ └─35*[{dockerd}]
├─nginx───4*[nginx]
I remember I had to update docker as well. Can this have got me into trouble? I currently try to find out what this S6 supervisor tells me.
1