AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1052415
Accepted
rnoodle
rnoodle
Asked: 2021-02-05 09:20:04 +0800 CST2021-02-05 09:20:04 +0800 CST 2021-02-05 09:20:04 +0800 CST

即使作为 root 用户,也无法在 Centos 7 中启动服务并出现错误“授权不可用”

  • 772

我无法为以下 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.

我不知道对服务器进行的任何更新。我认为这些问题是在计划外重启后开始的,但我无法确定重启的原因。为什么启动授权管理器会超时?有人对进一步调查有什么建议吗?

centos service centos7 docker authorization
  • 2 2 个回答
  • 12384 Views

2 个回答

  • Voted
  1. Best Answer
    rnoodle
    2021-02-05T09:47:03+08:002021-02-05T09:47:03+08:00

    我发了一个

    [root@myserver home]# reboot
    

    命令,它似乎正在工作。之前,当我遇到最初的问题时,我使用过

    [root@myserver home]# shutdown -r now
    

    我很好奇为什么这两个命令的差异导致了我最初的问题......

    • 0
  2. Mohamed Abo Badawy
    2021-08-22T09:55:48+08:002021-08-22T09:55:48+08:00

    只是记录我的情况,这可以帮助一些人

    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-服务错误/

    • 0

相关问题

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 使用 crontab 和 /etc/cron.hourly,daily,weekly 的区别

  • 持续监控许多服务器运行状况的简单方法?

  • Hudson 无法在 tomcat5 中启动

  • CentOS 的依赖挑战

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve