This worked beautifully, thanks Brian! Here's the verification logs for
bionic and focal:
=> bionic
$ lxc launch images:ubuntu/18.04 ab
$ lxc shell ab
root@ab:~# apt install --no-install-recommends -V -y apache2
...
root@ab:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
/run/systemd/system/apache2.service.d
└─zzz-lxc-service.conf
Active: active (running) since Thu 2021-09-30 14:33:02 UTC; 15s ago
Main PID: 1656 (apache2)
Tasks: 54 (limit: 38371)
CGroup: /system.slice/apache2.service
├─1656 /usr/sbin/apache2 -k start
├─1657 /usr/sbin/apache2 -k start
└─1658 /usr/sbin/apache2 -k start
Sep 30 14:33:02 ab systemd[1]: Starting The Apache HTTP Server...
Sep 30 14:33:02 ab apachectl[1645]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:33:02 ab systemd[1]: Started The Apache HTTP Server.
Sep 30 14:33:02 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:02 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:03 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:03 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
root@ab:~# dpkg -l| grep apache2
ii apache2 2.4.29-1ubuntu4.18 amd64
Apache HTTP Server
ii apache2-bin 2.4.29-1ubuntu4.18 amd64
Apache HTTP Server (modules and other binary files)
ii apache2-data 2.4.29-1ubuntu4.18 all
Apache HTTP Server (common files)
ii apache2-utils 2.4.29-1ubuntu4.18 amd64
Apache HTTP Server (utility programs for web servers)
root@ab:~# apache2ctl stop
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
root@ab:~# apache2ctl graceful
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
httpd not running, trying to start
root@ab:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
/run/systemd/system/apache2.service.d
└─zzz-lxc-service.conf
Active: inactive (dead) since Thu 2021-09-30 14:33:51 UTC; 6s ago
Process: 2565 ExecStop=/usr/sbin/apachectl stop (code=exited,
status=0/SUCCESS)
Main PID: 1656 (code=exited, status=0/SUCCESS)
Sep 30 14:33:02 ab systemd[1]: Starting The Apache HTTP Server...
Sep 30 14:33:02 ab apachectl[1645]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:33:02 ab systemd[1]: Started The Apache HTTP Server.
Sep 30 14:33:02 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:02 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:03 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:03 ab systemd[1]: apache2.service: Failed to reset devices.list:
Operation not permitted
Sep 30 14:33:51 ab apachectl[2565]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:33:51 ab apachectl[2565]: httpd (no pid file) not running
root@ab:~# ps aux| grep apache
root 2574 0.0 0.0 74140 3640 ? Ss 14:33 0:00
/usr/sbin/apache2 -k graceful
www-data 2575 0.0 0.0 2071616 3892 ? Sl 14:33 0:00
/usr/sbin/apache2 -k graceful
www-data 2576 0.0 0.0 2071616 3888 ? Sl 14:33 0:00
/usr/sbin/apache2 -k graceful
root 2634 0.0 0.0 14440 804 pts/0 S+ 14:34 0:00 grep
--color=auto apache
root@ab:~# echo "enable -proposed"
root@ab:~# apt install -V apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2-bin (2.4.29-1ubuntu4.19)
apache2-data (2.4.29-1ubuntu4.19)
apache2-utils (2.4.29-1ubuntu4.19)
Suggested packages:
www-browser
apache2-doc (2.4.29-1ubuntu4.19)
apache2-suexec-pristine (2.4.29-1ubuntu4.18)
| apache2-suexec-custom (2.4.29-1ubuntu4.18)
ufw (0.36-0ubuntu0.18.04.1)
Recommended packages:
ssl-cert (1.0.39)
The following packages will be upgraded:
apache2 (2.4.29-1ubuntu4.18 => 2.4.29-1ubuntu4.19)
apache2-bin (2.4.29-1ubuntu4.18 => 2.4.29-1ubuntu4.19)
apache2-data (2.4.29-1ubuntu4.18 => 2.4.29-1ubuntu4.19)
apache2-utils (2.4.29-1ubuntu4.18 => 2.4.29-1ubuntu4.19)
4 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 1,410 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apache2 amd64
2.4.29-1ubuntu4.19 [95.2 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apache2-bin
amd64 2.4.29-1ubuntu4.19 [1,071 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apache2-utils
amd64 2.4.29-1ubuntu4.19 [84.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apache2-data
all 2.4.29-1ubuntu4.19 [160 kB]
...
root@ab:~# ps aux| grep apache
root 4451 0.0 0.0 14440 928 pts/0 S+ 14:35 0:00 grep
--color=auto apache
root@ab:~# systemctl start apache2
root@ab:~# ps aux| grep apache
root 4458 0.0 0.0 74140 3636 ? Ss 14:36 0:00
/usr/sbin/apache2 -k start
www-data 4459 0.0 0.0 2071616 3660 ? Sl 14:36 0:00
/usr/sbin/apache2 -k start
www-data 4460 0.0 0.0 2071616 3740 ? Sl 14:36 0:00
/usr/sbin/apache2 -k start
root 4516 0.0 0.0 14440 876 pts/0 S+ 14:36 0:00 grep
--color=auto apache
root@ab:~# apache2ctl stop
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
root@ab:~# apache2ctl graceful
Invoking 'systemctl restart apache2'.
Use 'systemctl status apache2' for more info.
root@ab:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
/run/systemd/system/apache2.service.d
└─zzz-lxc-service.conf
Active: active (running) since Thu 2021-09-30 14:36:31 UTC; 5s ago
Process: 4520 ExecStop=/usr/sbin/apachectl stop (code=exited,
status=0/SUCCESS)
Process: 4531 ExecStart=/usr/sbin/apachectl start (code=exited,
status=0/SUCCESS)
Main PID: 4535 (apache2)
Tasks: 55 (limit: 38371)
CGroup: /system.slice/apache2.service
├─4535 /usr/sbin/apache2 -k start
├─4536 /usr/sbin/apache2 -k start
└─4537 /usr/sbin/apache2 -k start
Sep 30 14:36:31 ab systemd[1]: Starting The Apache HTTP Server...
Sep 30 14:36:31 ab apachectl[4531]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:36:31 ab systemd[1]: Started The Apache HTTP Server.
root@ab:~# ps aux| grep apache
root 4535 0.0 0.0 74140 3660 ? Ss 14:36 0:00
/usr/sbin/apache2 -k start
www-data 4536 0.0 0.0 2006080 3868 ? Sl 14:36 0:00
/usr/sbin/apache2 -k start
www-data 4537 0.0 0.0 2071616 3868 ? Sl 14:36 0:00
/usr/sbin/apache2 -k start
root 4595 0.0 0.0 14440 836 pts/0 S+ 14:36 0:00 grep
--color=auto apache
=> focal
$ lxc launch images:ubuntu/20.04 af
$ lxc shell af
root@af:~# apt install --no-install-recommends -V -y apache2
...
root@af:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
preset: enabled)
Drop-In: /run/systemd/system/service.d
└─zzz-lxc-service.conf
Active: active (running) since Thu 2021-09-30 14:25:34 UTC; 37s ago
Docs: https://httpd.apache.org/docs/2.4/
Main PID: 1188 (apache2)
Tasks: 54 (limit: 38371)
Memory: 6.7M
CGroup: /system.slice/apache2.service
├─1188 /usr/sbin/apache2 -k start
├─1190 /usr/sbin/apache2 -k start
└─1191 /usr/sbin/apache2 -k start
Sep 30 14:25:34 af systemd[1]: Starting The Apache HTTP Server...
Sep 30 14:25:34 af apachectl[1187]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:25:34 af systemd[1]: Started The Apache HTTP Server.
root@af:~# dpkg -l| grep apache2
ii apache2 2.4.41-4ubuntu3.6 amd64
Apache HTTP Server
ii apache2-bin 2.4.41-4ubuntu3.6 amd64
Apache HTTP Server (modules and other binary files)
ii apache2-data 2.4.41-4ubuntu3.6 all
Apache HTTP Server (common files)
ii apache2-utils 2.4.41-4ubuntu3.6 amd64
Apache HTTP Server (utility programs for web servers)
root@af:~# apache2ctl stop
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
root@af:~# apache2ctl graceful
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
httpd not running, trying to start
root@af:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
preset: enabled)
Drop-In: /run/systemd/system/service.d
└─zzz-lxc-service.conf
Active: inactive (dead) since Thu 2021-09-30 14:26:26 UTC; 9s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1456 ExecStop=/usr/sbin/apachectl stop (code=exited,
status=0/SUCCESS)
Main PID: 1188 (code=exited, status=0/SUCCESS)
Sep 30 14:25:34 af systemd[1]: Starting The Apache HTTP Server...
Sep 30 14:25:34 af apachectl[1187]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:25:34 af systemd[1]: Started The Apache HTTP Server.
Sep 30 14:26:26 af apachectl[1458]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:26:26 af apachectl[1458]: httpd (no pid file) not running
Sep 30 14:26:26 af systemd[1]: apache2.service: Succeeded.
root@af:~# ps aux| grep apache
root 1465 0.0 0.0 6696 3616 ? Ss 14:26 0:00
/usr/sbin/apache2 -k graceful
www-data 1466 0.0 0.0 1998016 3552 ? Sl 14:26 0:00
/usr/sbin/apache2 -k graceful
www-data 1467 0.0 0.0 1998016 3552 ? Sl 14:26 0:00
/usr/sbin/apache2 -k graceful
root 1527 0.0 0.0 9040 596 pts/0 S+ 14:26 0:00 grep
--color=auto apache
root@af:~# echo "enable -proposed"
root@af:~# apt install -V apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2-bin (2.4.41-4ubuntu3.7)
apache2-data (2.4.41-4ubuntu3.7)
apache2-utils (2.4.41-4ubuntu3.7)
Suggested packages:
apache2-doc (2.4.41-4ubuntu3.7)
apache2-suexec-pristine (2.4.41-4ubuntu3.6)
| apache2-suexec-custom (2.4.41-4ubuntu3.6)
www-browser
ufw (0.36-6)
Recommended packages:
ssl-cert (1.0.39)
The following packages will be upgraded:
apache2 (2.4.41-4ubuntu3.6 => 2.4.41-4ubuntu3.7)
apache2-bin (2.4.41-4ubuntu3.6 => 2.4.41-4ubuntu3.7)
apache2-data (2.4.41-4ubuntu3.6 => 2.4.41-4ubuntu3.7)
apache2-utils (2.4.41-4ubuntu3.6 => 2.4.41-4ubuntu3.7)
4 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 1,519 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 apache2 amd64
2.4.41-4ubuntu3.7 [95.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 apache2-bin
amd64 2.4.41-4ubuntu3.7 [1,180 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 apache2-data
all 2.4.41-4ubuntu3.7 [159 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 apache2-utils
amd64 2.4.41-4ubuntu3.7 [84.4 kB]
...
root@af:~# ps aux| grep apache
root 2049 0.0 0.0 9040 580 pts/0 S+ 14:28 0:00 grep
--color=auto apache
root@af:~# systemctl start apache2
root@af:~# ps aux| grep apache
root 2060 0.0 0.0 6696 3680 ? Ss 14:29 0:00
/usr/sbin/apache2 -k start
www-data 2061 0.0 0.0 1932480 3680 ? Sl 14:29 0:00
/usr/sbin/apache2 -k start
www-data 2062 0.0 0.0 1932480 3680 ? Sl 14:29 0:00
/usr/sbin/apache2 -k start
root 2118 0.0 0.0 9040 604 pts/0 S+ 14:29 0:00 grep
--color=auto apache
root@af:~# apache2ctl stop
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
root@af:~# apache2ctl graceful
Invoking 'systemctl restart apache2'.
Use 'systemctl status apache2' for more info.
root@af:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
preset: enabled)
Drop-In: /run/systemd/system/service.d
└─zzz-lxc-service.conf
Active: active (running) since Thu 2021-09-30 14:31:22 UTC; 8s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 2138 ExecStart=/usr/sbin/apachectl start (code=exited,
status=0/SUCCESS)
Main PID: 2142 (apache2)
Tasks: 55 (limit: 38371)
Memory: 4.9M
CGroup: /system.slice/apache2.service
├─2142 /usr/sbin/apache2 -k start
├─2143 /usr/sbin/apache2 -k start
└─2144 /usr/sbin/apache2 -k start
Sep 30 14:31:22 af systemd[1]: Starting The Apache HTTP Server...
Sep 30 14:31:22 af apachectl[2141]: AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using 127.0.1.1. Set the
'ServerName' directive globally to suppress this message
Sep 30 14:31:22 af systemd[1]: Started The Apache HTTP Server.
root@af:~# ps aux| grep apache
root 2142 0.0 0.0 6696 3660 ? Ss 14:31 0:00
/usr/sbin/apache2 -k start
www-data 2143 0.0 0.0 1998016 3632 ? Sl 14:31 0:00
/usr/sbin/apache2 -k start
www-data 2144 0.0 0.0 1998016 3632 ? Sl 14:31 0:00
/usr/sbin/apache2 -k start
root 2202 0.0 0.0 9040 600 pts/0 S+ 14:31 0:00 grep
--color=auto apache
** Tags removed: verification-needed-bionic verification-needed-focal
** Tags added: verification-done-bionic verification-done-focal
** Tags removed: verification-needed-groovy
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1832182
Title:
systemd unable to detect running apache if invoked via "apache2ctl
graceful"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1832182/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs