[root@iZwz99xeomvq1omj9cu7tuZ ~]# docker ps -a
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@iZwz99xeomvq1omj9cu7tuZ ~]# docker version
Client:
Version: 20.10.7
API version: 1.41
Go version: go1.13.15
Git commit: f0df350
Built: Wed Jun 2 11:51:04 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@iZwz99xeomvq1omj9cu7tuZ ~]# systemctl restartdocker.service
Unknown operation 'restartdocker.service'.
[root@iZwz99xeomvq1omj9cu7tuZ ~]# systemctl status docker -l
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-06-20 13:22:05 CST; 7s ago
Docs: http://docs.docker.io
Main PID: 15203 (dockerd)
Tasks: 27
Memory: 29.5M
CGroup: /system.slice/docker.service
├─15203 /opt/docker/bin/dockerd
└─15216 containerd --config /data/docker/exec/containerd/containerd.toml --log-level debug
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.191847920+08:00" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.191872082+08:00" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.191889053+08:00" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.191904226+08:00" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.191920419+08:00" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.191992708+08:00" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.192051316+08:00" level=debug msg="loading tasks in namespace" namespace=moby
Jun 20 13:22:05 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:05.293329136+08:00" level=debug msg="garbage collected" d=1.360248ms
Jun 20 13:22:06 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:06.149908821+08:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {unix:///data/docker/exec/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = \"transport: error while dialing: dial unix:///data/docker/exec/containerd/containerd.sock: timeout\". Reconnecting..." module=grpc
Jun 20 13:22:08 iZwz99xeomvq1omj9cu7tuZ dockerd[15203]: time="2022-06-20T13:22:08.998044225+08:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {unix:///data/docker/exec/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = \"transport: error while dialing: dial unix:///data/docker/exec/containerd/containerd.sock: timeout\". Reconnecting..." module=grpc
[root@iZwz99xeomvq1omj9cu7tuZ ~]# docker debug
docker: 'debug' is not a docker command.
See 'docker --help'
[root@iZwz99xeomvq1omj9cu7tuZ ~]# systemctl daemon-reload
You have new mail in /var/spool/mail/root
[root@iZwz99xeomvq1omj9cu7tuZ ~]# systemctl restart docker
[root@iZwz99xeomvq1omj9cu7tuZ ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
解决方案
删除之前运行进程数据/data/docker/exec/containerd/下数据文章来源:https://www.toymoban.com/news/detail-519753.html
执行如下命令即可文章来源地址https://www.toymoban.com/news/detail-519753.html
systemctl daemon-reload;
systemctl restart docker;
systemctl status docker; # 查看状态
到了这里,关于docker重启服务器步骤的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!