Score:0

Double Nginx installation issue

cn flag

It seems i somehow have two installations of Nginx on a server, Nginx Amplify reports two installations (see screenshot), one of them not sending updates of course, and occasionally when restarting Nginx it fails complaining ports 80 and 443 are already in use which i am guessing is the other installation starting to run somehow, at this point the only way i know how to solve it is restarting the server, than the main installation is running again.

enter image description here

The server is running Ubuntu 18.04.6, i don't really know how to confirm the two installations, i've looked inside rc2.d but i only see one Nginx entry:

$ ls -l /etc/rc2.d
total 4
-rw-r--r-- 1 root root 677 Feb  5  2016 README
lrwxrwxrwx 1 root root  23 Jun 30  2020 S01amplify-agent -> ../init.d/amplify-agent
lrwxrwxrwx 1 root root  17 Oct  9  2018 S01mongodb -> ../init.d/mongodb
lrwxrwxrwx 1 root root  17 Oct  8  2018 S01rsyslog -> ../init.d/rsyslog
lrwxrwxrwx 1 root root  29 Jan  2  2019 S01unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root  15 Oct  8  2018 S01uuidd -> ../init.d/uuidd
lrwxrwxrwx 1 root root  13 Oct  8  2018 S02atd -> ../init.d/atd
lrwxrwxrwx 1 root root  14 Nov 25  2020 S02atop -> ../init.d/atop
lrwxrwxrwx 1 root root  18 Jan 17  2020 S02collectd -> ../init.d/collectd
lrwxrwxrwx 1 root root  14 Oct  8  2018 S02cron -> ../init.d/cron
lrwxrwxrwx 1 root root  14 Oct  8  2018 S02dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root  17 Oct  8  2018 S02ipmievd -> ../init.d/ipmievd
lrwxrwxrwx 1 root root  20 Oct  8  2018 S02irqbalance -> ../init.d/irqbalance
lrwxrwxrwx 1 root root  15 Oct  8  2018 S02mdadm -> ../init.d/mdadm
lrwxrwxrwx 1 root root  15 Oct  9  2018 S02nginx -> ../init.d/nginx
lrwxrwxrwx 1 root root  13 Mar  2  2020 S02ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root  18 Oct  8  2018 S02openipmi -> ../init.d/openipmi
lrwxrwxrwx 1 root root  17 Jul  7  2020 S02postfix -> ../init.d/postfix
lrwxrwxrwx 1 root root  22 Sep 28  2020 S02redis-server -> ../init.d/redis-server
lrwxrwxrwx 1 root root  15 Oct  8  2018 S02rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root  13 Oct  8  2018 S02ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root  17 Oct  8  2018 S02sysstat -> ../init.d/sysstat
lrwxrwxrwx 1 root root  16 Jan 17  2020 S02xinetd -> ../init.d/xinetd
lrwxrwxrwx 1 root root  21 Oct  8  2018 S03grub-common -> ../init.d/grub-common
lrwxrwxrwx 1 root root  18 Oct  8  2018 S03ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root  18 Oct  8  2018 S03plymouth -> ../init.d/plymouth
lrwxrwxrwx 1 root root  18 Oct  8  2018 S03rc.local -> ../init.d/rc.local

More info:

$ which nginx
/usr/sbin/nginx

How can i troubleshoot this and remove the second installation without messing up the main one?

Note that this on a production server so i cant just do a full clean up of Nginx packages and re-install it again.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.