0

尝试(重新)启动 httpd 服务时,出现以下错误:

** (pkttyagent:2574): WARNING **: 01:33:55.345: Unable to register authentication agent:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject Error registering authentication agent:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0) Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

然后

systemctl status httpd.service

没有说明问题:

httpd.service - Web server Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-07-22 01:33:55 BST; 26min ago
  Process: 2578 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)

Jul 22 01:33:55 server... systemd[1]: Starting Web server Apache...
Jul 22 01:33:55 server... systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 22 01:33:55 server... systemd[1]: Failed to start Web server Apache.
Jul 22 01:33:55 server... systemd[1]: Unit httpd.service entered failed state.
Jul 22 01:33:55 server... systemd[1]: httpd.service failed.

这可能是什么原因造成的?我应该在哪里调试?

4

2 回答 2

2

[Thu Jul 23 05:40:44.885963 2020] [ssl:emerg] [pid 2877:tid 140514669713280] AH02565:证书和私钥不匹配

看起来密钥和证书不匹配。请检查密钥和证书文件的 md5。

于 2020-07-23T05:33:03.677 回答
0

这通常在尝试重新启动 systemd 服务时发生。

解决方法如下:

以root身份运行

groupadd -g 23 nohidproc

usermod -a -G nohidproc polkitd

mount -o remount,rw,hidepid=2,gid=nohidproc /proc

systemctl 重启 polkit

于 2022-02-15T15:50:26.967 回答