在 CentOS 上安装 iRedMail 后无法启动任何服务

在 CentOS 上安装 iRedMail 后无法启动任何服务

我尝试在一台服务器上安装 iRedMail。重启后,我无法再启动任何服务。

[root@mx ~]# systemctl start httpd

** (pkttyagent:16323): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Error registering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files (g-dbus-error-quark, 2)
[root@mx ~]# systemctl start mysqld

** (pkttyagent:16348): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Error registering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files (g-dbus-error-quark, 2)
Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.
[root@mx ~]#

有人知道该如何解决这个问题吗?

更新 重新安装并启动 polkit 后得到了以下信息:

[root@mx ~]# systemctl start polkit
Error getting authority: Error initializing authority: Exhausted all available authentication mechanisms (tried: EXTERNAL, DBUS_COOKIE_SHA1, ANONYMOUS) (available: EXTERNAL, DBUS_COOKIE_SHA1, ANONYMOUS) (g-io-error-quark, 0)
Job for polkit.service failed because the control process exited with error code. See "systemctl status polkit.service" and "journalctl -xe" for details.
[root@mx ~]# systemctl status polkit.service
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2016-07-21 21:24:45 JST; 20s ago
     Docs: man:polkit(8)
  Process: 2478 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=exited, status=1/FAILURE)
 Main PID: 2478 (code=exited, status=1/FAILURE)

Jul 21 21:24:45 mx.076.wtf systemd[1]: Starting Authorization Manager...
Jul 21 21:24:45 mx.076.wtf systemd[1]: polkit.service: main process exited, code=exited, status=1/FAILURE
Jul 21 21:24:45 mx.076.wtf systemd[1]: Failed to start Authorization Manager.
Jul 21 21:24:45 mx.076.wtf systemd[1]: Unit polkit.service entered failed state.
Jul 21 21:24:45 mx.076.wtf systemd[1]: polkit.service failed.

答案1

这看起来就像是软件包安装过程中删除了一些重要的东西。错误与策略工具包有关。您能确认 polkit 和 dbus 都还安装着吗rpm -qi dbusrpm -qi polkit

日志也可能包含信息,但这里似乎有一个策略由于 dbus 没有响应而阻止这些服务的启动...因为 dbus 未安装或策略套件未通过 dbus 响应。

也可能是 SElinux 的责任...您可以通过编辑来禁用测试: /etc/sysconfig/selinux然后注销并重新登录。

如果您发现 selinux 负责策略,则可以使用以下命令显示: getsebool -a | grep disable.*on 并进行如下设置: setsebool httpd_disable_trans 1

相关内容