Jon*_*ith 2 server-crashes apache-2.4
昨晚 7 点 57 分 18 分,Apache2 7 月 17 日关闭并停止工作。直到今天(18日)早些时候我才注意到
发生的更新:/var/log/apt/history.log 显示执行了 3 次更新:
Start-Date: 2018-07-17 19:57:18
Commandline: apt-get -y install apache2 Install: libjansson4:amd64
(2.7-3, automatic) Upgrade: apache2-data:amd64 (2.4.33-
3.0+ubuntu16.04.1+deb.sury.org+1, 2.4.34-
1+ubuntu16.04.1+deb.sury.org+5), apache2-bin:amd64 (2.4.33-
3.0+ubuntu16.04.1+deb.sury.org+1, 2.4.34
1+ubuntu16.04.1+deb.sury.org+5), apache2:amd64 (2.4.33
3.0+ubuntu16.04.1+deb.sury.org$ End-Date: 2018-07-17 19:57:23
Start-Date: 2018-07-17 19:57:37
Commandline: apt-get -y install apache2-doc
Upgrade: apache2-doc:amd64 (2.4.33-3.0+ubuntu16.04.1+deb.sury.org+1,
2.4.34-1+ubuntu16.04.1+deb.sury.org+5)
End-Date: 2018-07-17 19:57:39
Start-Date: 2018-07-17 19:57:43
Commandline: apt-get -y install apache2-suexec-custom
Upgrade: apache2-suexec-custom:amd64 (2.4.33-
3.0+ubuntu16.04.1+deb.sury.org+1, 2.4.34-
1+ubuntu16.04.1+deb.sury.org+5)
End-Date: 2018-07-17 19:57:44
Run Code Online (Sandbox Code Playgroud)
进入后:/etc/init.d/apache2 start
我得到: Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
failed!
systemctl status apache2.service产生:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled;
vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-07-18 15:01:46
MST; 3min 50s ago
Process: 8835 ExecStop=/usr/sbin/apachectl stop (code=exited,
status=0/SUCCESS)
Process: 21710 ExecStart=/usr/sbin/apachectl start (code=exited,
status=1/FAILURE)
Main PID: 8832 (code=exited, status=1/FAILURE)
Run Code Online (Sandbox Code Playgroud)
journalctl -xe给了我这个:
Jul 18 15:20:04 ns1.[masked].com apachectl[23823]: apache2: Syntax
error on line 146 of /etc/apache2/apache2.conf: Syntax error on line
2 of /etc/apache2/mods-enabled/lbmethod_byrequests.load:
Run Code Online (Sandbox Code Playgroud)
/etc/apache2/apache2.conf 的第 146 行显示:
DefaultRuntimeDir ${APACHE_RUN_DIR}
和 /etc/apache2/mods-enabled/lbmethod_byrequests.load 的第 2 行:
LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so
在这一点上,我完全迷失了。第 146 行只是引用了 .load 文件,该文件指向存在的文件的路径……所以我不知道 lbmethod_byrequests.load 的第 2 行的语法错误是什么。
更新到 2.4.34 后还有其他人在使用 Apache 时遇到问题吗?
你错过了一些错误。完整的错误是:
apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error
on line 2 of /etc/apache2/mods-enabled/lbmethod_byrequests.load: Cannot load
/usr/lib/apache2/modules/mod_lbmethod_byrequests.so into server:
/usr/lib/apache2/modules/mod_lbmethod_byrequests.so: undefined symbol:
ap_proxy_balancer_get_best_worker
Run Code Online (Sandbox Code Playgroud)
它似乎是由模块加载顺序引起的。lbmethod_byrequests依赖于代理,但首先加载lbmethod_byrequests,这会导致代理在加载时提供的未定义符号错误。
如果你mv /etc/apache2/mods-enabled/lbmethod_byrequests.load /etc/apache2/mods-enabled/zzlbmethod_byrequests.load
,Apache 正常启动。不幸的是,我不能说为什么现在会发生这种情况,而之前没有。
归档时间: |
|
查看次数: |
5709 次 |
最近记录: |