Debugging docker service failing on Pi 5

My Pi 5 running Ubuntu Server was failing to start a docker service. I had originally installed docker before moving to LXD/LXC. I only spotted the docker failures after checking the logs when I was trying to understand why the Pi was suspending itself overnight.

I began by removing the daemon.json file in /etc/docker by  renaming it to daemon.json.old.

I started to look for failures using journalctl to search for any failures related to docker:

  • journalctl | grep docker

and found a whole bunch of messages indicating that the docker service failed to start.

You can also use systemctl to check for failing services using:

  • systemctl list-units --type service --state running,failed

To remove docker use:

  • sudo apt remove docker-ce

Then restart the  Pi

  • sudo reboot

Finally recheck the logs using journalctl:

  • journalctl | grep "Feb 14" | grep docker 

 

Feb 14 11:06:52 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 14 11:06:52 systemd[1]: Failed to start docker.service - Docker Application Container Engine.
Feb 14 11:06:52 systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
Feb 14 14:08:19 sudo[4140]:     abel : TTY=pts/0 ; PWD=/etc/docker ; USER=root ; COMMAND=/usr/bin/mv daemon.json daemon.json.old
Feb 14 14:08:41 sudo[4143]:     abel : TTY=pts/0 ; PWD=/etc/docker ; USER=root ; COMMAND=/usr/bin/apt search docker
Feb 14 14:09:12 sudo[4148]:     abel : TTY=pts/0 ; PWD=/etc/docker ; USER=root ; COMMAND=/usr/bin/apt remove docker
Feb 14 14:13:04 sudo[4221]:     abel : TTY=pts/0 ; PWD=/etc/docker ; USER=root ; COMMAND=/usr/bin/apt install rpi-update
Feb 14 14:20:34 sudo[4289]:     abel : TTY=pts/0 ; PWD=/etc/docker ; USER=root ; COMMAND=/usr/bin/apt remove docker-ce
Feb 14 14:37:44 sudo[4554]:     abel : TTY=pts/0 ; PWD=/etc/docker ; USER=root ; COMMAND=/usr/sbin/reboot

In the log detail above you can observe the docker failures appeared till around 11:00 and then from about 14:00 there are no failures.

and using:

  • systemctl list-units --type service --state running,failed

demonstrates that there are no docker services and no fail messages are displayed.

That fixed the docker issue!

Next, I needed to establish why the Pi was suspending itself intermittently overnight. That is a work in progress.

Cheers

 

 

Popular posts from this blog

Fixing Zero 2W suspending itself restricting ssh login

Raspberry Pi 5 with NVME Base Duo and 256 SSD

Installing the NVME Base Duo