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

Apache not starting with mod_session_crypto

· 52CE 我爱测

When I enable mod_session_crypto by uncommenting it from the config, apache server fails to start. I found the following error from the journalctl: Jan 09 12:27:39 dbserver1 systemd[1]: httpd.service: main process exited, code=ex…

问题原文

原帖链接 · bmakan · CC BY-SA 4.0

When I enable mod_session_crypto by uncommenting it from the config, apache server fails to start. I found the following error from the journalctl:

Jan 09 12:27:39 dbserver1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 09 12:27:39 dbserver1 kill[18321]: kill: cannot find process ""
Jan 09 12:27:39 dbserver1 systemd[1]: httpd.service: control process exited, code=exited status=1
Jan 09 12:27:39 dbserver1 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit httpd.service has failed.
-- 
-- The result is failed.
Jan 09 12:27:39 dbserver1 systemd[1]: Unit httpd.service entered failed state.
Jan 09 12:27:39 dbserver1 systemd[1]: httpd.service failed.
Jan 09 12:27:39 dbserver1 polkitd[1053]: Unregistered Authentication Agent for unix-process:18219:214619083 (system bus name :1

I cannot figure out what's wrong from it.

When I disable the mod_session_crypto, mod_auth_form is not creating cookie - seems like it's refusing to create a cookie with unencrypted username and password when I use AuthProvider ldap. Worked fine with AuthProvider basic.

This setting worked just fine on my other computer I use for development.

Dev PC (works):
CentOS 7.4.1708
Apache 2.4.6-67.el7
mod_session 2.4.6-67.el7

Production PC (doesn't start):
CentOS 7.5.1808
Apache 2.4.6-80.el7
mod_session 2.4.6-80.el7

As you can see there's a slight difference in OS version. Beside that, I cannot find anything different.

已采纳解答

原帖链接 · bmakan · CC BY-SA 4.0

Thanks to the symcbean's tip, I found the following error message logged in the apache error log:

[Wed Jan 09 12:49:53.410386 2019] [session_crypto:error] [pid 30523] (20019)DSO load failed: AH01845: The crypto library 'openssl' could not be loaded: /usr/lib64/apr-util-1/apr_crypto_openssl-1.so: cannot open shared object file: No such file or directory (apr_crypto_openssl-1.so: 0)

According to the bug report here, all that's needed is to install apr-util-openssl package, e.g. with yum install apr-util-openssl.

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

资料来源与适用范围

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

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

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