docker ps
hangs forever was the first symptom so I purged docker and tried to reinstall ... the install never finishes
dpkg -l|grep docker
iF docker-ce 5:19.03.8~3-0~ubuntu-bionic amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:19.03.8~3-0~ubuntu-bionic amd64 Docker CLI: the open-source application container engine
notice in above the docker installed failed as per iF
... details see dpkg -l | head -3
on Ubuntu 20.04 docker fails to finish its install
sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aufs-tools cgroupfs-mount containerd.io docker-ce-cli pigz
The following NEW packages will be installed:
aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli pigz
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/85.7 MB of archives.
After this operation, 385 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Selecting previously unselected package pigz.
(Reading database ... 272586 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../1-aufs-tools_1%3a4.14+20190211-1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:4.14+20190211-1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../2-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../3-containerd.io_1.2.13-1_amd64.deb ...
Unpacking containerd.io (1.2.13-1) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../4-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 .../5-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.14+20190211-1ubuntu1) ...
Setting up containerd.io (1.2.13-1) ...
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.
previous install was OK until I noticed docker ps
was hanging forever ... I purged docker including deleting all of
apt-get purge docker-* -y
rm -rf /var/lib/docker
systemctl daemon-reload
here is my apt entry
cd /etc/apt ; grep -r docker
sources.list.d/docker.list:deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
then I ran above install which also just hung forever so in desperation I added below to list of delete cmds ... did not help
rm /var/run/docker.pid
rm -rf /lib/systemd/system/docker.service
rm -rf /etc/docker
rm -rf /run/docker.sock
rm -rf /etc/systemd/system/docker.service.d
docker version
also just hangs even as root
uname -m && uname -r && cat /etc/*release
x86_64
5.4.0-30-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
I am about to reformat my laptop and reinstall Ubuntu 20.04 from scratch ... any advise ?
Evidently the docker-ce purge package logic leaves mysterious remnants of docker wafting about which prevents the subsequent docker install to work correctly
PS ... my remote VPS ubuntu 18.04 all run docker fine so dunno if this is Ubuntu 20.04 related although I have seen docker run OK on other 20.04 boxes
UPDATE
yes when I revert back to kernel 29 from 5.4.0-30-generic docker is working OK and when I go back to kernel 30 again its failing in same way ... here is on kernel 5.4.0-30-generic
sudo journalctl -u docker
May 06 15:42:10 kiev systemd[1]: Starting Docker Application Container Engine...
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.613610505-04:00" level=info msg="Starting up"
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.615578768-04:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.>
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.645651302-04:00" level=info msg="parsed scheme: \"unix\"" module=grpc
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.645870506-04:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.645925462-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>}" module=>
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.645942687-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.648421919-04:00" level=info msg="parsed scheme: \"unix\"" module=grpc
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.648915679-04:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.649020592-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>}" module=>
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.649038754-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.845831131-04:00" level=warning msg="Your kernel does not support swap memory limit"
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.845857901-04:00" level=warning msg="Your kernel does not support cgroup blkio weight"
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.845868145-04:00" level=warning msg="Your kernel does not support cgroup blkio weight_device"
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.846071798-04:00" level=info msg="Loading containers: start."
May 06 15:42:10 kiev dockerd[6798]: time="2020-05-06T15:42:10.955282685-04:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set>
May 06 15:42:11 kiev dockerd[6798]: time="2020-05-06T15:42:11.027647745-04:00" level=info msg="Loading containers: done."
So problem only happens using kernel 5.4.0-30-generic whereas 5.4.0-29-generic is OK
docker-ce 5:19.03.8~3-0~ubuntu-bionic amd64
UPDATE
docker is OK on Ubuntu 20.04 which currently has kernel 5.8.0-32-generic
same for me. The did something wrong in the newest kernel. Reverting back to 5.4.0.28 solves the issue
My workaround fix was a bit different, the solution that worked for me is that I enter the kernel in the recovery mode, and then I manage to fully uninstall the docker because the docker doesn't stuck there. i think from whatever kernel you have you can do the same thing but to be honest i downgrade to the 5.4.0-29 just like the above answer. Nevertheless, the problem with the previous answer was that when i try to boot the kernel 5.4.0-29 the
containerd
stuck at the boot time wherein other versions the stuck happened when you try to execute some docker commands, so let me explain more closely the steps that i madeYou'll need to edit your
sudo nano /etc/default/grub
file remove the "#" symbol at the start of line forGRUB_TIMEOUT=20
to show the menu for 20 secondsGRUB_TIMEOUT_STYLE=menu
to show the boot menuthen save the file and quit the editor. Next run:
[1
After that you are able To completely uninstall Docker run:
The above commands will not remove images, containers, volumes, or user created configuration files on your host. If you wish to delete all images, containers, and volumes run the following commands:
You have removed Docker from the system completely without any docker stuck.
Switching to 5.4.0-29 does the trick
replace GRUB_DEFAULT=0 with GRUB_DEFAULT="$entry1>$entry2"
in
this is the result of the concatenation, with ">" in the middle, of the first submenu entry ($entry1), and the one with .29 kernel version (or any other preferred) (not the recovery one) ($entry2) given by running
grep -A100 submenu /boot/grub/grub.cfg |grep menuentry
Then update grub and reboot
Finally reinstall docker again. All should be good.
source: https://meetrix.io/blog/aws/changing-default-ubuntu-kernel.html
Update 20/5
Ubuntu released 5.4.0-31-generic in the proposed channel which works fine with docker. So whoever used this trick, can switch back to GRUB_DEFAULT=0 and it should be good to go again.
Same problem for me too. Reverting to kernel 5.4.0-29 everything works fine. Before switching back to the older kernel I did some tries starting docekrd from command line or with systemctl. From command line it seems to start but at the end of the process it hangs as waiting for something.
docker is OK on Ubuntu 20.04 with
see https://github.com/docker/for-linux/issues/993