openrc services are starting twice!
Hello everyone,
I created a VM running alpine edge, to act as a web server running Apache, run "
apk add apache2"
, configure the httpd.conf and finally run "
rc-update add apache2 boot`. So far so good.
A few reboots later, I noticed openrc is trying to start Apache twice (the second time failing obviously because the ports 80/443 are already being used). So I checked to make sure that apache2 isn't listed twice under /etc/runlevels but it was not. Weird.
Here is a screenshot from the VM:
A few weeks later, I create another VM running MongoDB, apk add, rc-update add and so on. A few reboots later, I see the same issue, openrc trying to start the MongoDB process twice and failing because the MongoDB port 27017 is already in use by the previously started process. Also checked the /etc/runlevels just in case but mongodb is only under /etc/runlevels/boot.
Here is a screenshot from the VM:
While I haven't managed to find out what causes this issue, it does seem quite consistent. The above VMs are normal disk installations, the MongoDB VM has no additional images, while the Apache2 VM has PHP 8 installed.
The last thing I tried, was to remove apache2 from the boot procedure rc-update del apache2 boot
, then reboot to verify that nothing loads, then re-add apache2 with rc-update add apache2 boot
and reboot to verify that openrc tries to start apache2 twice. The issue is consistent but I'm not any closer to figuring out why it happens.
Thank you.