How to make sure docker daemon sucessfully started even through PID file existed #46992
Replies: 2 comments
-
This behavior is intentional, and is to prevent multiple instances from the daemon to be started (running multiple instances of the daemon that interact with the same data-store can cause corruption of data). On a normal shutdown of the docker daemon service, the PID-file should be removed; cat /var/run/docker.pid
101388
systemctl stop docker.service
Warning: Stopping docker.service, but it can still be activated by:
docker.socket
cat /var/run/docker.pid
cat: /var/run/docker.pid: No such file or directory
Did this lead to an unclean shutdown? Is the docker daemon running as a systemd unit in your setup, or is it started through other means? (See above; the PID-file should be removed on a clean shut-down). |
Beta Was this translation helpful? Give feedback.
-
As I don't think there's a bug here, I'll move this to a discussion |
Beta Was this translation helpful? Give feedback.
-
Description
Now docker daemon will start failed with error
process with PID xxx is still running
when/var/run/docker.pid
file existed and process is alive.The associated code is below:
Reproduce
We should do this:
docker daemon failed started occasionally.
Expected behavior
docker daemon started sucessfully even through PID file existed and is same to PID of dockerd
docker version
docker info
Additional Info
No response
Beta Was this translation helpful? Give feedback.
All reactions