Failed to start daemon: pid file found
This error message usually occurs when trying to start the Docker daemon and it detects the existence of a pid file. The pid file is used to store the process ID of a running daemon. This error can be resolved by ensuring that Docker is not already running or by deleting the pid file.
Here are the steps to resolve the issue:
- Check if Docker is already running by executing the following command:
sudo service docker status
If it shows that Docker is running, you will need to stop the service before starting it again.
- To stop the Docker service, execute the command:
sudo service docker stop
This will stop the running Docker daemon.
- Delete the pid file by executing the command:
sudo rm /var/run/docker.pid
This will remove the pid file that is causing the error.
- Start the Docker daemon again by executing the command:
sudo service docker start
The Docker daemon should start without any issues now.
Here is an example of executing the mentioned steps in a terminal:
$ sudo service docker status
Docker is running
$ sudo service docker stop
Stopping Docker: [OK]
$ sudo rm /var/run/docker.pid
$ sudo service docker start
Starting Docker: [OK]