返回

docker.service 的作业失败,因为控制进程以错误代码退出。在安装 docker ubuntu 19.10 期间

发布时间:2022-09-03 15:48:32 413
# 运维

我尝试在Ubuntu 19.10上安装docker,我遵循了以下步骤Docker安装文档

但之后sudo apt-get install docker-ce docker-ce-cli containerd.io我有一些错误:

Hit:1 http://security.ubuntu.com/ubuntu eoan-security InRelease                                                                                                                                            
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                               
Hit:3 http://apt.nolimit.webdooz.com/download.docker.com/linux/ubuntu bionic InRelease                 
Hit:4 http://ir.archive.ubuntu.com/ubuntu eoan InRelease                                         
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                       
Hit:6 http://ir.archive.ubuntu.com/ubuntu eoan-updates InRelease                                 
Hit:7 http://apt.postgresql.org/pub/repos/apt eoan-pgdg InRelease
Hit:8 http://ir.archive.ubuntu.com/ubuntu eoan-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
260 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
containerd.io is already the newest version (1.2.13-1).
The following additional packages will be installed:
  aufs-tools cgroupfs-mount pigz
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount docker-ce docker-ce-cli pigz
0 upgraded, 5 newly installed, 0 to remove and 260 not upgraded.
Need to get 65.4 MB/65.6 MB of archives.
After this operation, 293 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://apt.nolimit.webdooz.com/download.docker.com/linux/ubuntu bionic/stable amd64 
docker-ce-cli amd64 5:19.03.8~3-0~ubuntu-bionic [42.6 MB]
Get:2 http://apt.nolimit.webdooz.com/download.docker.com/linux/ubuntu bionic/stable amd64 
docker-ce amd64 5:19.03.8~3-0~ubuntu-bionic [22.9 MB]                                                            
Fetched 65.4 MB in 1min 52s (582 kB/s)                                                                                                                                                                     
Selecting previously unselected package pigz.
(Reading database ... 153334 files and directories currently installed.)
Preparing to unpack .../archives/pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../aufs-tools_1%3a4.9+20170918-2_amd64.deb ...
Unpacking aufs-tools (1:4.9+20170918-2) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../docker-ce-cli_5%3a19.03.8~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce-cli (5:19.03.8~3-0~ubuntu-bionic) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_5%3a19.03.8~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce (5:19.03.8~3-0~ubuntu-bionic) ...
Setting up aufs-tools (1:4.9+20170918-2) ...
Setting up docker-ce-cli (5:19.03.8~3-0~ubuntu-bionic) ...
Setting up pigz (2.4-1) ...
Setting up cgroupfs-mount (1.4) ...
Setting up docker-ce (5:19.03.8~3-0~ubuntu-bionic) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → 
/lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → 
/lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-04-22 13:45:33 
    +0430; 4ms ago
     Docs: https://docs.docker.com
  Process: 9520 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 9520 (code=exited, status=1/FAILURE)
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (242-7ubuntu3) ...
Processing triggers for man-db (2.8.7-3) ...
Processing triggers for libc-bin (2.30-0ubuntu2) ...
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

Docker应用程序容器引擎似乎无法启动。这是journalctl -xe:

14:05:54 cna-UX430UNR systemd[1]: Starting Network Manager Script Dispatcher Service...
-- Subject: A start job for unit NetworkManager-dispatcher.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit NetworkManager-dispatcher.service has begun execution.
-- 
-- The job identifier is 7764.
آوریل 22 14:05:54 cna-UX430UNR dbus-daemon[906]: [system] Successfully activated service 
'org.freedesktop.nm_dispatcher'
آوریل 22 14:05:54 cna-UX430UNR systemd[1]: Started Network Manager Script Dispatcher 
Service.
-- Subject: A start job for unit NetworkManager-dispatcher.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit NetworkManager-dispatcher.service has finished successfully.
-- 
-- The job identifier is 7764.
آوریل 22 14:05:55 cna-UX430UNR NetworkManager[911]:   [1587548155.3895] manager: 
NetworkManager state is now CONNECTED_GLOBAL
آوریل 22 14:05:55 cna-UX430UNR audit[906]: USER_AVC pid=906 uid=103 auid=4294967295 
ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" 
path="/org/freedesktop/NetworkManager" interface="o
                                             exe="/usr/bin/dbus-daemon" sauid=103 hostname=? 
addr=? terminal=?'
آوریل 22 14:05:55 cna-UX430UNR kernel: audit: type=1107 audit(1587548155.389:168): pid=906 
uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  
bus="system" path="/org/freedeskt
                                         exe="/usr/bin/dbus-daemon" sauid=103 hostname=? 
addr=? terminal=?'
آوریل 22 14:05:55 cna-UX430UNR audit[906]: USER_AVC pid=906 uid=103 auid=4294967295 
ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  bus="system" 
path="/org/freedesktop/NetworkManager" interface="o
                                             exe="/usr/bin/dbus-daemon" sauid=103 hostname=? 
addr=? terminal=?'
آوریل 22 14:05:55 cna-UX430UNR kernel: audit: type=1107 audit(1587548155.393:169): pid=906 
uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_signal"  
bus="system" path="/org/freedeskt
                                         exe="/usr/bin/dbus-daemon" sauid=103 hostname=? 
addr=? terminal=?'
آوریل 22 14:05:55 cna-UX430UNR whoopsie[1348]: [14:05:55] The default IPv4 route is: 
/org/freedesktop/NetworkManager/ActiveConnection/2
آوریل 22 14:05:55 cna-UX430UNR whoopsie[1348]: [14:05:55] Not a paid data plan: 
/org/freedesktop/NetworkManager/ActiveConnection/2
آوریل 22 14:05:55 cna-UX430UNR whoopsie[1348]: [14:05:55] Found usable connection: 
/org/freedesktop/NetworkManager/ActiveConnection/2
آوریل 22 14:05:55 cna-UX430UNR whoopsie[1348]: [14:05:55] online
آوریل 22 14:06:05 cna-UX430UNR systemd[1]: NetworkManager-dispatcher.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state.
آوریل 22 14:06:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:07:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:08:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:09:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:10:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:11:06 cna-UX430UNR gnome-shell[1990]: pushModal: invocation of begin_modal 
failed
آوریل 22 14:11:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:12:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:13:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:14:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:15:01 cna-UX430UNR CRON[13699]: pam_unix(cron:session): session opened for user 
root by (uid=0)
آوریل 22 14:15:01 cna-UX430UNR CRON[13700]: (root) CMD (command -v debian-sa1 > /dev/null && 
debian-sa1 1 1)
آوریل 22 14:15:01 cna-UX430UNR CRON[13699]: pam_unix(cron:session): session closed for user 
root
آوریل 22 14:15:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:16:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:17:01 cna-UX430UNR CRON[13752]: pam_unix(cron:session): session opened for user 
root by (uid=0)
آوریل 22 14:17:01 cna-UX430UNR CRON[13753]: (root) CMD (   cd / && run-parts --report 
/etc/cron.hourly)
آوریل 22 14:17:01 cna-UX430UNR CRON[13752]: pam_unix(cron:session): session closed for user 
root
آوریل 22 14:17:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:18:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:19:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe
آوریل 22 14:20:35 cna-UX430UNR xdg-desktop-por[1926]: Failed to get application states: 
GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: 
GDBus.Error:org.freedesktop.DBus.Error.AccessDe

这是sudo systemctl status docker.service:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-04-22 14:32:59 +0430; 32s ago
     Docs: https://docs.docker.com
  Process: 15143 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 15143 (code=exited, status=1/FAILURE)

آوریل 22 14:32:59 cna-UX430UNR systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
آوریل 22 14:32:59 cna-UX430UNR systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
آوریل 22 14:32:59 cna-UX430UNR systemd[1]: Stopped Docker Application Container Engine.
آوریل 22 14:32:59 cna-UX430UNR systemd[1]: docker.service: Start request repeated too quickly.
آوریل 22 14:32:59 cna-UX430UNR systemd[1]: docker.service: Failed with result 'exit-code'.
آوریل 22 14:32:59 cna-UX430UNR systemd[1]: Failed to start Docker Application Container Engine.

我尝试了很多方法,比如删除docker,然后重新安装,还重新安装了Ubuntu 19.10。但它没有起作用。

也尝试搜索此解决方案,但找不到任何解决方案。任何帮助都将不胜感激。

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(2)
按点赞数排序
用户头像