docker实际生产中遇到的问题及解决办法

docker服务启动失败

问题描述:机器之前安装过k8s等组件,安装docker后无法启动

"io.containerd.snapshotter.v1.zfs\"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs files

.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1

apshotter devmapper in metadata plugin" error="devmapper not configured"

解决:这里有containerd的目录,需要将/var/lib/docker整个目录删除掉

 admin]# ls /var/lib/docker/
buildkit  containerd  containers  image  network  overlay2  plugins  runtimes  swarm  tmp  trust  volumes
 admin]# rm -rf /var/lib/docker/

问题描述:机器之前安装过k8s等组件,安装docker后无法启动

2018-cm2 dockerd[55750]: time="2024-02-05T14:39:29.366533889+08:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {unix:///run/containerd/containerd.sock 0 }. Err :connection error: desc = \"transport: Error while dialing dial unix /run/containerd/containerd.sock: connect: connection refused\". Reconnecting..." module=grpc

Feb 05 14:39:31 gpu03-ga-llm-010030012018-cm2 dockerd[55750]: failed to start daemon: failed to dial "/run/containerd/containerd.sock": failed to dial "/run/containerd/containerd.sock": context deadline exceeded

解决:删除目录 /run/containerd/containerd.sock  

删除containerd的目录 
rm -rf /run/containerd/containerd.sock  
重启即可恢复

你可能感兴趣的:(docker,容器,运维)