service docker start后docker stop/waiting的解决方法

时间:2022-11-20 05:29:04

在某次强行对机子断电后,再开机后发现docker没启动

运行service docker start显示docker start/running, process xxxx,之后不一会儿就停止了,

再运行service docker status显示docker stop/waiting

这时候使用docker -d或者docker daemon来查看错误

Warning: '-d' is deprecated, it will be removed soon. See usage.
WARN[] please use 'docker daemon' instead.
INFO[] [graphdriver] using prior storage driver "aufs"
INFO[] API listen on /var/run/docker.sock
INFO[] Firewalld running: false
FATA[] Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints

这里关键是Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints

是docker的网络出现问题,解决方法如下:

rm -rf /var/lib/docker/network/files/*
service docker start