[Bug 1787225] Re: systemctl disable apache2 does nothing

Andreas Hasenack andreas at canonical.com
Wed Jul 17 19:40:56 UTC 2019


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.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

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

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1787225

Title:
  systemctl disable apache2 does nothing

Status in apache2 package in Ubuntu:
  Incomplete
Status in systemd package in Ubuntu:
  Confirmed

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-sysv-install
     Executing /lib/systemd/systemd-sysv-install disable apache2
     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-sysv-install
  Executing /lib/systemd/systemd-sysv-install is-enabled apache2
  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
  ProcVersionSignature: Ubuntu 4.4.0-133.159-generic 4.4.134
  Uname: Linux 4.4.0-133-generic x86_64
  NonfreeKernelModules: nvidia_uvm nvidia
  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=/boot/vmlinuz-4.4.0-133-generic.efi.signed root=UUID=5830b30e-69e8-4bb4-8a2b-bc2b43c7414a ro quiet splash vt.handoff=7
  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.asset.tag: Type2 - Board Asset Tag
  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.version: V2.07
  dmi.modalias: dmi:bvnAcer:bvrV2.07:bd10/15/2012:svnAcer:pnAspireV3-571G:pvrV2.07:rvnAcer:rnVA50_HC_CR:rvrType2-BoardVersion:cvnAcer:ct10:cvrV2.07:
  dmi.product.name: Aspire V3-571G
  dmi.product.version: V2.07
  dmi.sys.vendor: Acer

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1787225/+subscriptions



More information about the foundations-bugs mailing list