Bug#877715: apache2: apache won't start after reboot when listening on IPv6 address
Package: apache2
Version: 2.4.25-3+deb9u3
Severity: normal
Dear Maintainer,
* What led up to the situation?
I wanted to let apache listen on a specific IPv6 address and this works
when the system is running, but it doesn't work when the system is
(re)booted.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I tried to add a file /etc/systemd/system/apache2.service.d/after.conf
with the following content:
----8<----
[Unit]
Wants=network-online.target
After=network.target remote-fs.target nss-lookup.target
network-online.target
----8<----
But this didn't help to get apache running when the system boots.
* What was the outcome of this action?
There was no change when booting the system, apache still failed with
the following log:
Oct 01 22:41:17 debian9 systemd[1]: Starting The Apache HTTP Server...
Oct 01 22:41:17 debian9 apachectl[384]: (99)Cannot assign requested
address: AH00072: make_sock: could not bind to address
[2001:888:148c::1:1]:443
Oct 01 22:41:17 debian9 apachectl[384]: no listening sockets available,
shutting down
Oct 01 22:41:17 debian9 apachectl[384]: AH00015: Unable to open logs
Oct 01 22:41:17 debian9 apachectl[384]: Action 'start' failed.
Oct 01 22:41:17 debian9 apachectl[384]: The Apache error log may have
more information.
Oct 01 22:41:17 debian9 systemd[1]: apache2.service: Control process
exited, code=exited status=1
Oct 01 22:41:17 debian9 systemd[1]: Failed to start The Apache HTTP
Server.
Oct 01 22:41:17 debian9 systemd[1]: apache2.service: Unit entered failed
state.
Oct 01 22:41:17 debian9 systemd[1]: apache2.service: Failed with result
'exit-code'.
* What outcome did you expect instead?
I would expect apache to start when the system boots.
-- Package-specific info:
-- System Information:
Debian Release: 9.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages apache2 depends on:
ii apache2-bin 2.4.25-3+deb9u3
ii apache2-data 2.4.25-3+deb9u3
ii apache2-utils 2.4.25-3+deb9u3
ii dpkg 1.18.24
ii init-system-helpers 1.48
ii lsb-base 9.20161125
ii mime-support 3.60
ii perl 5.24.1-3+deb9u2
ii procps 2:3.3.12-3
Versions of packages apache2 recommends:
ii ssl-cert 1.0.39
Versions of packages apache2 suggests:
pn apache2-doc <none>
pn apache2-suexec-pristine | apache2-suexec-custom <none>
pn www-browser <none>
Versions of packages apache2-bin depends on:
ii libapr1 1.5.2-5
ii libaprutil1 1.5.4-3
ii libaprutil1-dbd-sqlite3 1.5.4-3
ii libaprutil1-ldap 1.5.4-3
ii libc6 2.24-11+deb9u1
ii libldap-2.4-2 2.4.44+dfsg-5
ii liblua5.2-0 5.2.4-1.1+b2
ii libnghttp2-14 1.18.1-1
ii libpcre3 2:8.39-3
ii libssl1.0.2 1.0.2l-2
ii libxml2 2.9.4+dfsg1-2.2+deb9u1
ii perl 5.24.1-3+deb9u2
ii zlib1g 1:1.2.8.dfsg-5
Versions of packages apache2-bin suggests:
pn apache2-doc <none>
pn apache2-suexec-pristine | apache2-suexec-custom <none>
pn www-browser <none>
Versions of packages apache2 is related to:
ii apache2 2.4.25-3+deb9u3
ii apache2-bin 2.4.25-3+deb9u3
-- Configuration Files:
/etc/apache2/ports.conf changed:
Listen 80
<IfModule ssl_module>
#Listen 443
Listen 127.0.0.1:443
Listen [2001:888:148c::1:1]:443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
part of /etc/network/interfaces:
iface enp0s3 inet6 static
address 2001:888:148c::1:1
netmask 64
gateway fe80::f29f:c2ff:fe10:469e
-- no debconf information
Reply to: