'failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid

I start docker

sudo service docker start

then I try to run dockerd

sudo dockerd

it shows the following error:

INFO[2021-11-21T19:25:52.804962676+05:30] Starting up
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid



Solution 1:[1]

it works for me:

sudo chmod 666 /var/run/docker.sock

Solution 2:[2]

Delete the PID file. Kill the running docker service and start it again.

ps -ef | grep docker
kill -9 <PIDs>
sudo systemctl start docker.service

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 manu pandu
Solution 2 GP Singh