Bug#803177: apache2: [PATCH] secondary-init-script fails (status 3) despite starting apache daemon
Package: apache2
Version: 2.4.10-10+deb8u3
Severity: normal
Dear Maintainer,
I set up a second instance of Apache using
`/usr/share/doc/apache2/examples/setup-instance`.
The init script starts apache sucessfully, but returns exit status 3.
It's probably an old bug, but now we have systemd we actually notice it.
Systemd treats this as a failed service which is pretty bad
(systemctl shows "degraded", and systemctl won't stop the daemon
if you ask it to). More evidence below.
Debugging init scripts under systemd is awkward, but I noticed
secondary-init-script does "set -e". Normally the primary script doesn't
run with "set -e" (which treats command errors as immediately fatal).
It seems clear we need to remove "set -e" from secondary-init-script.
I removed it and my problem was resolved. Please apply :).
Thanks
Alan
# systemctl status apache2-syncthing
● apache2-syncthing.service - LSB: Start/stop apache2 web server (config /etc/apache2-syncthing)
Loaded: loaded (/etc/init.d/apache2-syncthing)
Active: failed (Result: exit-code) since Tue 2015-10-27 17:00:10 GMT; 6s ago
Process: 29322 ExecStart=/etc/init.d/apache2-syncthing start (code=exited, status=3)
Oct 27 17:00:10 brick apache2-syncthing[29322]: Starting web server: apache2AH00558: apache2: Could not reliably determine the ser...message
Oct 27 17:00:10 brick systemd[1]: apache2-syncthing.service: control process exited, code=exited status=3
Oct 27 17:00:10 brick systemd[1]: Failed to start LSB: Start/stop apache2 web server (config /etc/apache2-syncthing).
Oct 27 17:00:10 brick systemd[1]: Unit apache2-syncthing.service entered failed state.
# ps -ax|grep apache
ps -ax|grep apache
2949 ? Ss 0:00 /usr/sbin/apache2 -d /etc/apache2-syncthing -k start
2950 ? S 0:00 /usr/sbin/apache2 -d /etc/apache2-syncthing -k start
2951 ? S 0:00 /usr/sbin/apache2 -d /etc/apache2-syncthing -k start
3038 pts/1 S+ 0:00 grep apache
24023 ? Ss 0:00 /usr/sbin/apache2 -k start
24026 ? S 0:00 /usr/sbin/apache2 -k start
24028 ? S 0:13 /usr/sbin/apache2 -k start
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these template lines ***
-- Package-specific info:
-- System Information:
Debian Release: 8.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armel (armv5tel)
Kernel: Linux 3.16.0-4-kirkwood
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.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.10-10+deb8u3
ii apache2-data 2.4.10-10+deb8u3
ii apache2-utils 2.4.10-10+deb8u3
ii dpkg 1.17.25
ii lsb-base 4.1+Debian13+nmu1
ii mime-support 3.58
ii perl 5.20.2-3+deb8u1
ii procps 2:3.3.9-9
Versions of packages apache2 recommends:
ii ssl-cert 1.0.35
Versions of packages apache2 suggests:
ii apache2-doc 2.4.10-10+deb8u3
pn apache2-suexec-pristine | apache2-suexec-custom <none>
ii lynx-cur [www-browser] 2.8.9dev1-2+deb8u1
ii w3m [www-browser] 0.5.3-19
Versions of packages apache2-bin depends on:
ii libapr1 1.5.1-3
ii libaprutil1 1.5.4-1
ii libaprutil1-dbd-sqlite3 1.5.4-1
ii libaprutil1-ldap 1.5.4-1
ii libc6 2.19-18+deb8u1
ii libldap-2.4-2 2.4.40+dfsg-1+deb8u1
ii liblua5.1-0 5.1.5-7.1
ii libpcre3 2:8.35-3.3
ii libssl1.0.0 1.0.1k-3+deb8u1
ii libxml2 2.9.1+dfsg1-5
ii perl 5.20.2-3+deb8u1
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages apache2-bin suggests:
ii apache2-doc 2.4.10-10+deb8u3
pn apache2-suexec-pristine | apache2-suexec-custom <none>
ii lynx-cur [www-browser] 2.8.9dev1-2+deb8u1
ii w3m [www-browser] 0.5.3-19
Versions of packages apache2 is related to:
ii apache2 2.4.10-10+deb8u3
ii apache2-bin 2.4.10-10+deb8u3
-- Configuration Files:
/etc/apache2/mods-available/mpm_prefork.conf changed:
<IfModule mpm_prefork_module>
StartServers 2
MinSpareServers 2
MaxSpareServers 4
MaxRequestWorkers 150
MaxConnectionsPerChild 0
</IfModule>
/etc/apache2/ports.conf changed:
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
-- no debconf information
Reply to: