[root@master docker]# pwd
/etc/docker
[root@master docker]# ll
总用量 8
-rw-r--r-- 1 root root 222 5月 5 16:05 daemon.conf
-rw-r--r-- 1 root root 223 5月 5 16:09 daemon.json
[root@master docker]# systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@master docker]#
[root@master docker]# systemctl start docker
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
To force a start use "systemctl reset-failed docker.service" followed by "systemctl start docker.service" again.
[root@master docker]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 日 2023-05-07 22:32:50 CST; 10s ago
Docs: https://docs.docker.com
Process: 3535 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 3535 (code=exited, status=1/FAILURE)
5月 07 22:32:48 master systemd[1]: docker.service failed.
5月 07 22:32:50 master systemd[1]: docker.service holdoff time over, scheduling restart.
5月 07 22:32:50 master systemd[1]: Stopped Docker Application Container Engine.
5月 07 22:32:50 master systemd[1]: start request repeated too quickly for docker.service
5月 07 22:32:50 master systemd[1]: Failed to start Docker Application Container Engine.
5月 07 22:32:50 master systemd[1]: Unit docker.service entered failed state.
5月 07 22:32:50 master systemd[1]: docker.service failed.
5月 07 22:32:53 master systemd[1]: start request repeated too quickly for docker.service
5月 07 22:32:53 master systemd[1]: Failed to start Docker Application Container Engine.
5月 07 22:32:53 master systemd[1]: docker.service failed.
[root@master docker]# sudo systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
tail -100f /var/log/messages
May 7 22:45:00 master systemd: docker.service holdoff time over, scheduling restart.
May 7 22:45:00 master systemd: Stopped Docker Application Container Engine.
May 7 22:45:00 master systemd: Starting Docker Application Container Engine...
May 7 22:45:00 master dockerd: time="2023-05-07T22:45:00.181013357+08:00" level=info msg="Starting up"
May 7 22:45:00 master dockerd: time="2023-05-07T22:45:00.182293222+08:00" level=warning msg="failed to rename /var/lib/docker/tmp for background deletion: rename /var/lib/docker/tmp /var/lib/docker/tmp-old: file exists. Deleting synchronously"
May 7 22:45:00 master dockerd: failed to start daemon: failed to dial "/run/containerd/containerd.sock": unknown service containerd.services.namespaces.v1.Namespaces: not implemented
May 7 22:45:00 master systemd: docker.service: main process exited, code=exited, status=1/FAILURE
May 7 22:45:00 master systemd: Failed to start Docker Application Container Engine.
May 7 22:45:00 master systemd: Unit docker.service entered failed state.
May 7 22:45:00 master systemd: docker.service failed.
May 7 22:45:02 master systemd: docker.service holdoff time over, scheduling restart.
May 7 22:45:02 master systemd: Stopped Docker Application Container Engine.
May 7 22:45:02 master systemd: start request repeated too quickly for docker.service
May 7 22:45:02 master systemd: Failed to start Docker Application Container Engine.
May 7 22:45:02 master systemd: Unit docker.service entered failed state.
May 7 22:45:02 master systemd: docker.service failed.
[root@master etc]# sudo systemctl stop containerd
[root@master etc]# sudo systemctl start containerd
[root@master etc]# sudo systemctl start docker
[root@master docker]# tail -100f /var/log/messages
"Failed to run kubelet" err="failed to run Kubelet: failed to get docker version: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
“exec-opts”: [“native.cgroupdriver=systemd”]
[root@master docker]# vi daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"storage-driver": "devicemapper",
"exec-opts": ["native.cgroupdriver=systemd"]
}
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@master ~]# sudo systemctl daemon-reload
[root@master ~]#
[root@master ~]# sudo systemctl restart docker
[root@master ~]#
[root@master ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@master ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9c7a2d5b52b5 08616d26b8e7 "start_runit" About a minute ago Exited (1) About a minute ago k8s_calico-node_calico-node-8vftc_kube-system_f85c6c8f-1165-4ea0-9453-1aec50b6e139_4
c2152ca163af calico/node "calico-node -init -…" 2 minutes ago Exited (0) 2 minutes ago k8s_mount-bpffs_calico-node-8vftc_kube-system_f85c6c8f-1165-4ea0-9453-1aec50b6e139_0
633f3e81eb10 d70a5947d57e "/opt/cni/bin/install" 3 minutes ago Exited (0) 3 minutes ago k8s_install-cni_calico-node-8vftc_kube-system_f85c6c8f-1165-4ea0-9453-1aec50b6e139_0
f1512bdc763a calico/cni "/opt/cni/bin/calico…" 3 minutes ago Exited (0) 3 minutes ago k8s_upgrade-ipam_calico-node-8vftc_kube-system_f85c6c8f-1165-4ea0-9453-1aec50b6e139_0
2ffd1e340f3f registry.aliyuncs.com/google_containers/kube-proxy "/usr/local/bin/kube…" 4 minutes ago Up 4 minutes k8s_kube-proxy_kube-proxy-56ppg_kube-system_c529cb74-bb65-408b-9e7f-de4abe784532_0
006cd0653feb registry.aliyuncs.com/google_containers/pause:3.4.1 "/pause" 4 minutes ago Up 4 minutes k8s_POD_calico-node-8vftc_kube-system_f85c6c8f-1165-4ea0-9453-1aec50b6e139_0
78310b318978 registry.aliyuncs.com/google_containers/pause:3.4.1 "/pause" 4 minutes ago Up 4 minutes k8s_POD_kube-proxy-56ppg_kube-system_c529cb74-bb65-408b-9e7f-de4abe784532_0
868edbbed27b registry.aliyuncs.com/google_containers/kube-controller-manager "kube-controller-man…" 5 minutes ago Up 5 minutes k8s_kube-controller-manager_kube-controller-manager-master_kube-system_8ab43afee75a8