pid file prevents starting the docker snap

Bug #1880022 reported by Stephen Buergler
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
docker (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

docker seems to not be able to start because of a pid file that was left behind.
This only happened on one of my hosts and hasn't happened again after fixing it.
I get these logs over and over again:

2020-04-30T06:47:38Z systemd[1]: Started Service for snap application docker.dockerd.
2020-04-30T06:47:49Z docker.dockerd[1127]: Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/423/run/docker.pid
2020-04-30T06:47:49Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-04-30T06:47:49Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Service RestartSec=100ms expired, scheduling restart.
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 1.
2020-04-30T06:47:50Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-04-30T06:47:50Z systemd[1]: Started Service for snap application docker.dockerd.
2020-04-30T06:47:50Z docker.dockerd[1325]: Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/423/run/docker.pid
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Service RestartSec=100ms expired, scheduling restart.
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 2.
2020-04-30T06:47:50Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-04-30T06:47:50Z systemd[1]: Started Service for snap application docker.dockerd.
2020-04-30T06:47:50Z docker.dockerd[1390]: Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/423/run/docker.pid
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-04-30T06:47:50Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Service RestartSec=100ms expired, scheduling restart.
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 3.
2020-04-30T06:47:51Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-04-30T06:47:51Z systemd[1]: Started Service for snap application docker.dockerd.
2020-04-30T06:47:51Z docker.dockerd[1452]: Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/423/run/docker.pid
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Service RestartSec=100ms expired, scheduling restart.
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 4.
2020-04-30T06:47:51Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-04-30T06:47:51Z systemd[1]: Started Service for snap application docker.dockerd.
2020-04-30T06:47:51Z docker.dockerd[1511]: Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/423/run/docker.pid
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-04-30T06:47:51Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Service RestartSec=100ms expired, scheduling restart.
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 5.
2020-04-30T06:47:52Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-04-30T06:47:52Z systemd[1]: Started Service for snap application docker.dockerd.
2020-04-30T06:47:52Z docker.dockerd[1573]: Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/423/run/docker.pid
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Service RestartSec=100ms expired, scheduling restart.
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 6.
2020-04-30T06:47:52Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Start request repeated too quickly.
2020-04-30T06:47:52Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-04-30T06:47:52Z systemd[1]: Failed to start Service for snap application docker.dockerd.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in docker (Ubuntu):
status: New → Confirmed
Revision history for this message
Guillermo Bisheimer (gbisheimer) wrote :

It happens every time that my machine is turned off improperly (i.e. power failure or system crash). A file named docker.pid is left in folder /var/snap/docker/current/run/ and this prevents the snap package to startup successfully. I have to manually remove the file to be able to start docker engine again.

tested with snap version
docker 19.03.11

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.