0

I'm not unable to start docker all of a sudden.

Below is the output and journalctl didn't give me any useful information.

[root@h1 ~]# systemctl start docker
Job for docker.service canceled.
[root@h1 ~]# journalctl -u docker
-- Logs begin at 四 2020-03-12 19:47:41 EDT, end at 四 2020-03-12 23:54:19 EDT. --
3月 12 23:48:36 h1 systemd[1]: Starting Docker Application Container Engine...
3月 12 23:49:06 h1 systemd[1]: Stopped Docker Application Container Engine.
3月 12 23:54:14 h1 systemd[1]: Starting Docker Application Container Engine...
3月 12 23:54:14 h1 systemd[1]: Stopped Docker Application Container Engine.

OS Version

cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Docker Version

Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:25:41 2019
 OS/Arch:           linux/amd64
 Experimental:      false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Docker Daemon Log

[root@h1 /]# /var/log/daemon.log | grep docker
-bash: /var/log/daemon.log: No such file or directory

Observed something interesting in cat /var/log/messages | grep dockerd | grep error. I installed minikube in my machine. Not sure if it stopped Docker from starting up.

Mar  8 03:09:06 h1 dockerd: time="2020-03-08T03:09:06.191377227-04:00" level=error msg="90318eed5d8bc390fdbf0212146b0f8ab9b303c8264d4fee7a61917bbcf34896 cleanup: failed to delete container from containerd: no such container"
Mar  8 03:09:06 h1 dockerd: time="2020-03-08T03:09:06.191433011-04:00" level=error msg="Handler for POST /containers/90318eed5d8bc390fdbf0212146b0f8ab9b303c8264d4fee7a61917bbcf34896/start returned error: driver failed programming external connectivity on endpoint k8s_POD_nginx-ingress-controller-6fc5bcc8c9-5vbrr_kube-system_0adc50ec-cf8e-4918-8591-a37ed9df5270_287847 (513025a7e2cc7d265150272e321589ec1e0ebd381296890c60f4754de2e93faa): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use"
  1. Docker had been working well on this hardware and OS for half a year, docker service suddenly crashed and is not able to launch anymore.
  2. I tried to restart the server but it didn't help.
Software Engineer
  • 15,457
  • 7
  • 74
  • 102
Lawrence Ching
  • 423
  • 7
  • 16
  • Could mention the output of /var/log/daemon.log | grep docker – Vahid Mar 13 '20 at 04:16
  • @Vahid Supplemented. Actually, I don't have that file in the system. – Lawrence Ching Mar 13 '20 at 05:56
  • I suggest to use this link to find out the logs of docker daemon, filter it to find the last errors, it has helped me a couple of times. You can add them here too. https://stackoverflow.com/questions/30969435/where-is-the-docker-daemon-log – Vahid Mar 13 '20 at 05:59
  • @Vahid, thank you for your suggestion. I did find some error log in /var/log/message. And I pasted the log in the question. But I don't know what that mean – Lawrence Ching Mar 13 '20 at 06:22
  • The logs suggest that the docker service is trying to use port 80 but that another service has already claimed this port. I don't know why/how you've configured docker to use this port, but this does appear to be your problem. `Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use`. It's probably related to minikube. – Software Engineer Mar 13 '20 at 11:11

1 Answers1

1

You can run $ netstat -tulpn | grep :80 to find the pid of the process listening to port 80

I don't know why the docker daemon needs port 80 at start up. But it's a nice idea to at least kill the process listening to port 80 to see how things go.

Vahid
  • 1,265
  • 10
  • 20