Background:
One day, because the machine was in standby mode for a long time (three 16G virtual machines were running services with medium and high load), the machine could not be discharged from standby mode. No response was received from the keyboard screen, so I had to forcibly shut down and restart the machine. But after a reboot, one of them couldn’t even start Docker.
Docker cannot start
docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Copy the code
systemctl status docker:
Found no useful information, no error details
Journalctl -u docker is displayed in system-level logs. The output is the same as the previous one
Try systemctl restart docker
Job for docker.service canceled.
Copy the code
Check journalctl -u docker again
It should be the container problem. Considering the previous online problems, abnormal shutdown of Docker will always lead to some strange and serious problems, so I’d better shut it down in the future…
Centos7 default docker installation path is /var/lib/docker:
mv /var/lib/docker /var/lib/docker-bak mv /var/lib/containerd /var/lib/containerd-bak systemctl restart docker systemctl status dockerCopy the code
K8s is really a good thing because the container is basically broken and there is no way to recover it.