docker 安裝後無法啓動,提示 Activation of org.freedesktop.PolicyKit1 timed out (g-dbus-error-quark, 20)

操作系統:centos 7.2 

docker 版本:18.06.1-ce

安裝過程參考:

https://help.aliyun.com/document_detail/60742.html?spm=5176.11065259.1996646101.searchclickresult.4a2d3ab1UgWllw

 

先把報錯貼出來。先聲明,原理沒搞懂,是百度出來的把問題解決了。。。 

Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Activation of org.freedesktop.PolicyKit1 timed out (g-dbus-error-quark, 20)
Failed to restart docker.service: Connection timed out
See system logs and 'systemctl status docker.service' for details.

解決這個問題主要是重裝  polkit,然後重啓

yum reinstall polkit

reboot

重啓後 

systemctl status docker.service

然後提示

Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)
[root@iZ23qd40v95Z microservice]# docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:23:03 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:25:29 2018
  OS/Arch:          linux/amd64
  Experimental:     false

(期間由重裝了docker,但是感覺跟這個沒關係)

然後

# mv -f /var/run /var/run.runmove~
# ln -sfn /run /var/run
# mv -f /var/lock /var/lock.lockmove~
# ln -sfn /run/lock /var/lock

參考https://access.redhat.com/solutions/3522441

又重啓了一下。。。。

reboot

systemctl start docker.service

 

好了。。

 

-----------------------------------------------實錄--------------------------------------------------------------

Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Activation of org.freedesktop.PolicyKit1 timed out (g-dbus-error-quark, 20)
Failed to restart docker.service: Connection timed out
See system logs and 'systemctl status docker.service' for details.

[root@xxxxxxxxxxxxx docker]# 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@xxxxxxxxxxxxx docker]# 


yum reinstall polkit
Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)

reboot


[root@xxxxxxxxxxxxx microservice]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2018-09-30 09:36:38 CST; 27s ago
     Docs: https://docs.docker.com
 Main PID: 3183 (dockerd)
    Tasks: 22
   Memory: 43.3M
   CGroup: /system.slice/docker.service
           ├─3183 /usr/bin/dockerd
           └─3190 docker-containerd --config /var/run/docker/containerd/containerd.toml

Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.666360149+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc4...dule=grpc
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.666595694+08:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc4...dule=grpc
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.666625205+08:00" level=info msg="Loading containers: start."
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.781330769+08:00" level=info msg="Default bridge (docker0) is assigned with an IP a... address"
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.822556492+08:00" level=info msg="Loading containers: done."
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.840399995+08:00" level=info msg="Docker daemon" commit=e68fc7a graphdriver(s)=over...8.06.1-ce
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.840477593+08:00" level=info msg="Daemon has completed initialization"
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.843374677+08:00" level=warning msg="Could not register builder git source: failed ...in $PATH"
Sep 30 09:36:38 xxxxxxxxxxxxx dockerd[3183]: time="2018-09-30T09:36:38.852250928+08:00" level=info msg="API listen on /var/run/docker.sock"
Sep 30 09:36:38 xxxxxxxxxxxxx systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.


[root@xxxxxxxxxxxxx microservice]# systemctl start docker.service

Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)


[root@xxxxxxxxxxxxx microservice]# docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:23:03 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:25:29 2018
  OS/Arch:          linux/amd64
  Experimental:     false

  
  # mv -f /var/run /var/run.runmove~
# ln -sfn /run /var/run
# mv -f /var/lock /var/lock.lockmove~
# ln -sfn /run/lock /var/lock

參考:https://access.redhat.com/solutions/3522441

reboot 
[root@xxxxxxxxxxxxx microservice]# systemctl start docker.service

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章