大网数据广告活动
服务器运维问答

Apache2 Fails to start after recent update to 2.4.34, no clue why

· 52CE 我爱测

At 7:57:18PM last night, July 17th Apache2 shut down and quit working. I didn't notice until earlier today (the 18th.) Updates Occurred : /var/log/apt/history.log shows that there were 3 updates performed: Start-Date: 2018-07-17 …

问题原文

原帖链接 · Jon Griffith · CC BY-SA 4.0

At 7:57:18PM last night, July 17th Apache2 shut down and quit working. I didn't notice until earlier today (the 18th.)

Updates Occurred: /var/log/apt/history.log shows that there were 3 updates performed:

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

Upon Entering: /etc/init.d/apache2 start

I get: 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 yields:

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)

journalctl -xe gives me this:

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:

Line 146 of /etc/apache2/apache2.conf reads:

DefaultRuntimeDir ${APACHE_RUN_DIR}

and line 2 of /etc/apache2/mods-enabled/lbmethod_byrequests.load:

LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so

At this point, I'm completely lost. Line 146 just references the .load file which points to a path to a file that exists...so I don't know what the syntax error is on line 2 of lbmethod_byrequests.load.

Anyone else having trouble with Apache after the update to 2.4.34?

已采纳解答

原帖链接 · Jeff Snider · CC BY-SA 4.0

You're missing some of the error. The full error is:

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

It appears to be caused by module load order. lbmethod_byrequests depends on proxy but lbmethod_byrequests is being loaded first, leading to an undefined symbol error that proxy would provide if it were loaded.

If you mv /etc/apache2/mods-enabled/lbmethod_byrequests.load /etc/apache2/mods-enabled/zzlbmethod_byrequests.load, Apache starts normally. Unfortunately I can't say why this happens now and didn't before.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-07-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。