Bug#910368: apache2: Apache does not start reliably after reboot

2020-04-06 Thread duck

Quack,

Xavier, I see no such fix in Debian stable (where my problem lies). 
Additionally I had a look at the sources for 2.4.41-1~bpo10+1, 2.4.43-1, 
as well as the git master content, and I see no such thing. Are you sure 
you pushed that work and it got included?


\_o<

--
Marc Dequènes



Bug#910368: apache2: Apache does not start reliably after reboot

2019-08-22 Thread duck

On 2019-08-23 01:20, Xavier wrote:

The "After=network-online.target" may be enough to fix this issue, 
isn't it?


I honestly did not think about such scenario. I think it should be fine 
according to the systemd.unit manpage, but I just cannot reboot my 
server every so often to check it. Nevertheless I could find several 
services using no Wants and this After like apt-daily-upgrade or 
lxc-net, so it should be fine.


--
Marc Dequènes



Bug#910368: apache2: Apache does not start reliably after reboot

2019-08-22 Thread Xavier



Le 22/08/2019 à 17:57, Xavier a écrit :
> Le 22/08/2019 à 17:38, Marc Dequènes (duck) a écrit :
>> Quack,
>>
>> I also hit this problem recently on Buster. I also do have specific
>> Listen directives on this machine but all my IPs (4 and 6) are
>> statically defined in /etc/network/interfaces.
>>
>> I looked at the systemd service file and I believe that
>> After=network.target is not enough.
>> According to upstream documentation:
>>   https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
>> I should be replaced by:
>>   After=network-online.target
>>   Wants=network-online.target
>>
>> Regards.
>> \_o<
> 
> Thanks a lot, this looks like a good explanation to this bug! I updated
> salsa repo

I'm not sure the "Wants" is a good thing here. What will happen if a
user has an Apache on his desktop and wants to use it even if he has no
network (only lo) ?
The "After=network-online.target" may be enough to fix this issue, isn't it?



Bug#910368: apache2: Apache does not start reliably after reboot

2019-08-22 Thread duck

Quack,

I also hit this problem recently on Buster. I also do have specific 
Listen directives on this machine but all my IPs (4 and 6) are 
statically defined in /etc/network/interfaces.


I looked at the systemd service file and I believe that 
After=network.target is not enough.

According to upstream documentation:
  https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
I should be replaced by:
  After=network-online.target
  Wants=network-online.target

Regards.
\_o<

--
Marc Dequènes



Bug#910368: apache2: Apache does not start reliably after reboot

2018-10-05 Thread Ralf Jung
Package: apache2
Version: 2.4.25-3+deb9u5
Severity: important

Dear Maintainer,

when I reboot my server, most of the time, I then have to manually restart 
apache because it seems unable to reliably initialize upon boot.
The problem only occurs since I configured apache to listen on certain 
interfaces only, because I have a different server running on port 80+443 on 
another IP address.
I have this in my ports.conf:

  Listen 109.230.236.95:80
  Listen [2a05:bec0:1:1:10a1:5eff:fe52:509]:80

  Listen 109.230.236.95:443
  Listen [2a05:bec0:1:1:10a1:5eff:fe52:509]:443

It then fails to start, saying

  Okt 05 13:19:02 r-passerv.ralfj.de systemd[1]: Starting The Apache HTTP 
Server...
  Okt 05 13:19:02 r-passerv.ralfj.de apachectl[1003]: (99)Cannot assign 
requested address: AH00072: make_sock: could not bind to address 
[2a05:bec0:1:1:10a1:5eff:fe52:509]:80

Seems like a boot ordering problem to me.  The IPv6 address is assigned via 
local autoconfig, and apache starts too early.
I have tried modifying the systemd unit to fix this, to no avail.  The 
interwebs also say that DAD (duplicate address detection)
could be related, so I set net.ipv6.conf.all.accept_dad=0, again to no avail.

I am now playing with net.ipv6.ip_nonlocal_bind, but ideally the `Listen` 
directive would work out-of-the box.
It currently seems to be rather useless for IPv6 addresses.

Kind regards,
Ralf

-- Package-specific info:

-- System Information:
Debian Release: 9.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (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+deb9u5
ii  apache2-data 2.4.25-3+deb9u5
ii  apache2-utils2.4.25-3+deb9u5
ii  dpkg 1.18.25
ii  init-system-helpers  1.48
ii  lsb-base 9.20161125
ii  mime-support 3.60
ii  perl 5.24.1-3+deb9u4
ii  procps   2:3.3.12-3+deb9u1

Versions of packages apache2 recommends:
ii  ssl-cert  1.0.39

Versions of packages apache2 suggests:
pn  apache2-doc  
pn  apache2-suexec-pristine | apache2-suexec-custom  
pn  www-browser  

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  libc62.24-11+deb9u3
ii  libldap-2.4-22.4.44+dfsg-5+deb9u2
ii  liblua5.2-0  5.2.4-1.1+b2
ii  libnghttp2-141.18.1-1
ii  libpcre3 2:8.39-3
ii  libssl1.0.2  1.0.2l-2+deb9u3
ii  libxml2  2.9.4+dfsg1-2.2+deb9u2
ii  perl 5.24.1-3+deb9u4
ii  zlib1g   1:1.2.8.dfsg-5

Versions of packages apache2-bin suggests:
pn  apache2-doc  
pn  apache2-suexec-pristine | apache2-suexec-custom  
pn  www-browser  

Versions of packages apache2 is related to:
ii  apache2  2.4.25-3+deb9u5
ii  apache2-bin  2.4.25-3+deb9u5

-- Configuration Files:
/etc/apache2/conf-available/other-vhosts-access-log.conf changed:

/etc/apache2/conf-available/security.conf changed:

Require all denied

ServerTokens Minor
ServerSignature Off
TraceEnable Off
Header set X-Content-Type-Options: "nosniff"
Header set X-Frame-Options: "sameorigin"

/etc/apache2/ports.conf changed:
Listen 109.230.236.95:80
Listen [2a05:bec0:1:1:10a1:5eff:fe52:509]:80
Listen 109.230.236.95:443
Listen [2a05:bec0:1:1:10a1:5eff:fe52:509]:443

/etc/apache2/sites-available/000-default.conf changed:

Redirect temp / https://www.ralfj.de/


Use SSL letsencrypt/live
Redirect temp / https://www.ralfj.de/


/etc/logrotate.d/apache2 changed:
/var/log/apache2/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if /etc/init.d/apache2 status > /dev/null ; then \
/etc/init.d/apache2 reload > /dev/null; \
fi;
endscript
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi; \
endscript
}


-- no debconf information