skip to Main Content

I tried to install docker on Ubuntu 19.10
And I followed this Docker Install Document

But after sudo apt-get install docker-ce docker-ce-cli containerd.io I got some errors:

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)

It seems Docker Application Container Engine could not get started.
and this is output of 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]: <info>  [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

and this is output of 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.

I tried many ways like remove docker, and reinstall again, and also reinstall Ubuntu 19.10.
But it didn’t work.

also tried to search solution for this but could not find any.
any help would be appreciated.

2

Answers


  1. The post installation script of Docker includes its service to start.
    Docker service initialization consist of its bridge to be set up. I think the Docker bridge couldn’t run in your situation.

    Possible solutions:

    • If you use any VPN or anything else that may conflict in IP configurations with Docker, turn it off and try sudo apt install -f to fix broken installations.
    • Try restarting Network Manager service using sudo service network-manager restart and then sudo apt install -f.
    Login or Signup to reply.
  2.  sudo rm -rf /var/lib/docker    
    sudo vim /etc/docker/daemon.json
    

    copy and past:
    {
    "live-restore": true,
    "registry-mirrors": [ "https://registry.docker-cn.com"]
    }

    save file and following command:
    sudo systemctl daemon-reload 
    sudo systemctl restart docker.service
    sudo systemctl status docker.service
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search