我无法为以下 Centos 7 服务器启动服务
[root@myserver home]# uname -r
3.10.0-1160.11.1.el7.x86_64
[root@myserver home]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
当我观察到 docker 宕机时,我第一次意识到有问题,所以我以 root 身份运行以下命令
[root@myserver home]# systemctl start docker
Authorization not available. Check if polkit service is running or see debug message for
more information.
Failed to start docker.service: Connection timed out
See system logs and 'systemctl status docker.service' for details.
[root@myserver home]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://docs.docker.com
然后我跑了
[root@myserver home]# systemctl | grep -i fail
● firewalld.service loaded failed failed firewalld - dynamic firewall daemon
● plymouth-start.service loaded failed failed Show Plymouth Boot Screen
● polkit.service loaded failed failed Authorization Manager
● systemd-machined.service loaded failed failed Virtual Machine and Container Registration Service
● tuned.service loaded failed failed Dynamic System Tuning Daemon
还
[root@myserver home]# systemctl status polkit.service
● polkit.service - Authorization Manager
Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: enabled)
Active: failed (Result: timeout) since Thu 2021-02-04 11:14:54 GMT; 5h 45min ago
Docs: man:polkit(8)
Process: 7932 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=killed, signal=TERM)
Main PID: 7932 (code=killed, signal=TERM)
Feb 04 11:13:23 myserver.com systemd[1]: Starting Authorization Manager...
Feb 04 11:13:48 myserver.com polkitd[7932]: Started polkitd version 0.112
Feb 04 11:14:54 myserver.com systemd[1]: polkit.service start operation timed out. Terminating.
Feb 04 11:14:54 myserver.com systemd[1]: Failed to start Authorization Manager.
Feb 04 11:14:54 myserver.com systemd[1]: Unit polkit.service entered failed state.
Feb 04 11:14:54 myserver.com systemd[1]: polkit.service failed.
我不知道对服务器进行的任何更新。我认为这些问题是在计划外重启后开始的,但我无法确定重启的原因。为什么启动授权管理器会超时?有人对进一步调查有什么建议吗?
我发了一个
命令,它似乎正在工作。之前,当我遇到最初的问题时,我使用过
我很好奇为什么这两个命令的差异导致了我最初的问题......
只是记录我的情况,这可以帮助一些人
polkit 是一种策略服务,这意味着其他一些服务在执行操作之前需要它的授权
如果我尝试启动或重新启动任何服务(如网络或 sshd)在 kvm 备份还原来宾 VM 使用 centos 7 后出现问题,系统会在显示此消息几秒钟后重新启动
Authorization not available. Check if polkit service is running or see debug message for more information.
就我而言,polkit 抱怨 dbus 错误,例如
Failed to connect to system bus: Connection refused
journalctl -b -p 错误
我发现 dbus 缺少磁盘原因问题
解决方案很容易从 fstab 中删除丢失的磁盘
我也在这里发现了类似的问题https://www.thegeekdiary.com/authorization-not-available-check-if-polkit-service-is-running-or-see-debug-message-for-more-information-centos- rhel-7-ssh-服务错误/