systemctl disable apache2 does nothing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| apache2 (Ubuntu) |
Undecided
|
Unassigned | ||
| systemd (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
I installed apache2 on Ubuntu 16.04, and out of the box it was enabled as a service, meaning it would automatically start at every boot. That is not what I want as this is my personal computer, not a server.
$ systemctl is-enabled apache2.service
enabled
So I ran:
$ sudo systemctl disable apache2
and this was the output:
apache2.service is not a native service, redirecting to systemd-
Executing /lib/systemd/
insserv: warning: current start runlevel(s) (empty) of script `apache2' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache2' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `apache2' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache2' overrides LSB defaults (0 1 6).
Then I rebooted. I expected to find apache2 not running. Instead, it was running.
Surprisingly:
$ systemctl is-enabled apache2.service
apache2.service is not a native service, redirecting to systemd-
Executing /lib/systemd/
disabled
so, it shows up as disabled, yet it is started at startup.
I wonder if this is what those warnings were about. Those messages are unclear as fuck, I have no f***ing clue what they are supposed to mean. I read that the CURRENT runlevel overrides a DEFAULT. I guess that should be fine, unless what systemctl actually changes are the defaults, and those are overwritten by something else, which means that "sysctl disable" will have no effect. If that is the case, then the warning should be more explicit:
- be specific about the fact that "LSB defaults" are what the command is changing
- tell me that as a result, the services will not be disabled
- tell me WHAT is overriding the defaults that I'm attempting to change
- and/or tell me what I am supposed to do to fix the issue
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: systemd 229-4ubuntu21.4
ProcVersionSign
Uname: Linux 4.4.0-133-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Aug 15 16:26:28 2018
InstallationDate: Installed on 2013-10-11 (1768 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MachineType: Acer Aspire V3-571G
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/15/2012
dmi.bios.vendor: Acer
dmi.bios.version: V2.07
dmi.board.
dmi.board.name: VA50_HC_CR
dmi.board.vendor: Acer
dmi.board.version: Type2 - Board Version
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.
dmi.modalias: dmi:bvnAcer:
dmi.product.name: Aspire V3-571G
dmi.product.
dmi.sys.vendor: Acer
teo1978 (teo8976) wrote : | #1 |
Andreas Hasenack (ahasenack) wrote : | #3 |
Thanks for filing this bug in Ubuntu.
I just repeated your steps on a xenial lxd, using apache2 2.4.18-2ubuntu3.10, and after rebooting the container, apache2 was not started. I got the same warnings that you did, however.
Furthermore, status also shows it's inactive after the reboot:
$ systemctl status apache2
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.
Drop-In: /lib/systemd/
Active: inactive (dead)
Docs: man:systemd-
Could you please try the above status command after you reboot, see what it says? Maybe you have something else starting apache, or requiring it perhaps?
Changed in apache2 (Ubuntu): | |
status: | New → Incomplete |
Andreas Hasenack (ahasenack) wrote : | #4 |
You can also check "sudo systemctl cat apache2.service", that will show if any overrides are in place.
Bryce Harrington (bryce) wrote : | #5 |
Closing as expired.
Changed in apache2 (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Invalid |
Status changed to 'Confirmed' because the bug affects multiple users.