我的debian系统已经感染了systemd病毒…
当我发出“服务apache2启动”命令来启动apache,它认为它失败了,但Apache运行得很好。 所以“service apache2 stop”什么都不做,因为系统认为apache还没有启动。 要停止apache,我必须发出“killall apache2”
# service apache2 start Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details. # systemctl status apache2.service â apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2) Active: failed (Result: exit-code) since Thu 2016-06-09 15:49:43 CEST; 32s ago Process: 7513 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE) Jun 09 15:49:43 apache2[7513]: Starting web server: apache2 failed! Jun 09 15:49:43 apache2[7513]: The apache2 instance did not start within 20 seconds. Please read the log files to discover problems ... (warning). Jun 09 15:49:43 systemd[1]: apache2.service: control process exited, code=exited status=1 Jun 09 15:49:43 systemd[1]: Failed to start LSB: Apache2 web server. Jun 09 15:49:43 systemd[1]: Unit apache2.service entered failed state.
该系统是Debian 8.5; 通过许多版本升级。
为什么“系统”认为它失败,当Apache启动就好了?
[Thu Jun 09 16:11:40.945575 2016] [mpm_prefork:notice] [pid 13426] AH00163: Apache/2.4.10 (Debian) mod_python/3.3.1 Python/2.7.9 OpenSSL/1.0.1t configured -- resuming normal operations [Thu Jun 09 16:11:40.945846 2016] [core:notice] [pid 13426] AH00094: Command line: '/usr/sbin/apache2'
更新 /etc/init.d/apache2在寻找一个pidfile
/var/run/apache2/apache2.pid
,但文件实际上是在
/var/run/apache2.pid
,即一个subdirless。
pid文件在一个意想不到的地方。 编辑
的/ etc / apache2的/ envvars中
线
导出APACHE_PID_FILE = / var / run / apache2 $ SUFFIX.pid
使“服务apache2启动/停止”工作