Reputation: 300
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
Upvotes: 12
Views: 64184
Reputation: 43
I got this problem, and this is my resolve:
sudo systemctl stop docker
sudo dockerd --debug
showing:
INFO[2024-01-06T09:49:56.628001335-05:00] Starting up
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
rm /var/run/docker.pid
it should be fix your problem
Upvotes: 3
Reputation: 19
If you're trying to start docker pid and getting this error:-
INFO[2023-05-03T12:13:55.369754816+05:30] Starting up failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
systemctl stop docker
After that just delete the docker.pid file
rm /var/run/docker.pid
And then just run
sudo dockerd
and you good to go
Upvotes: 0
Reputation: 151
Delete the .pid file using the below Linux command,
rm /var/run/docker.pid
Now the pid file will get deleted and the docker daemon can be launched newly.
Upvotes: 15
Reputation: 73
Had similar issue
`sudo docker ps -a`
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
sudo systemctl status docker
docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: deactivating (stop-sigterm) since Wed 2022-09-07 09:32:11 -05; 5h 55min ago Docs: https://docs.docker.com Main PID: <PID_NO> (dockerd) CGroup: /system.slice/docker.service └─<PID_NO> /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
time="2022-09-07T09:32:26.-05:00" level=info msg="ccResol...=grpc
time="2022-09-07T09:32:26.-05:00" level=info msg="ClientC...=grpc
time="2022-09-07T09:32:26.-05:00" level=info msg="pickfir...=grpc
time="2022-09-07T09:32:26.-05:00" level=info msg="pickfir...=grpc
time="2022-09-07T09:32:26.-05:00" level=info msg="[graphd...lay2"
time="2022-09-07T09:32:26.-05:00" level=warning msg="moun...ound"
time="2022-09-07T09:32:26.-05:00" level=info msg="Loading...art."
systemd[1]: Dependency failed for Docker Application Container Engine.
systemd[1]: Job docker.service/start failed with result 'dependency'.
dockerd[<PID_NO>]: time="2022-09-07T09:39:52.-05:00" level=info msg="Process...ted'"
Hint: Some lines were ellipsized, use -l to show in full.
`sudo systemctl start docker` -- Gives no output
deleted docker.pid file in var/run but It didn't helped either
Upvotes: 1
Reputation: 11
I had the same problem. The following worked for me:
/var/run/docker.pid
Upvotes: 1
Reputation: 716
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
Upvotes: 2