Docker在启动时退出并退出代码

一旦我启动docker,它就无法启动并说

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. 

当我尝试运行命令systemctl status docker.service它给了我这个:

  Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. shivansh@localhost:~/Documents/Huawei/pulsar/docker-files/pulsarReporting/memcached$ systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2016-10-25 11:10:12 IST; 13s ago Docs: https://docs.docker.com Process: 20514 ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE) Main PID: 20514 (code=exited, status=1/FAILURE) Oct 25 11:10:11 localhost systemd[1]: Starting Docker Application Container Engine... Oct 25 11:10:11 localhost docker[20514]: time="2016-10-25T11:10:11.789509056+05:30" level=info msg="[graphdriver] using prior storage driver \"aufs\"" Oct 25 11:10:11 localhost docker[20514]: time="2016-10-25T11:10:11.914441951+05:30" level=info msg="Graph migration to content-addressability took 0.00 seconds" Oct 25 11:10:11 localhost docker[20514]: time="2016-10-25T11:10:11.918206945+05:30" level=info msg="Firewalld running: false" Oct 25 11:10:12 localhost docker[20514]: time="2016-10-25T11:10:12.697748195+05:30" level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has acti Oct 25 11:10:12 localhost systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE Oct 25 11:10:12 localhost systemd[1]: Failed to start Docker Application Container Engine. Oct 25 11:10:12 localhost systemd[1]: docker.service: Unit entered failed state. Oct 25 11:10:12 localhost systemd[1]: docker.service: Failed with result 'exit-code'. 

我不知道这里有什么问题。 我在Ubuntu 16.04上使用docker,我对此很新颖。 我尝试重新启动系统,但它没有帮助。

任何希尔感谢!

这个错误来自daemon/daemon_unix.go

 // Clear stale bridge network if n, err := controller.NetworkByName("bridge"); err == nil { if err = n.Delete(); err != nil { return nil, fmt.Errorf("could not delete the default bridge network: %v", err) } } 

在你的情况下, 完整的错误信息是:

 Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints 

例如,请参阅问题18283 , 问题17083中可能的解决方法

 sudo rm -r /var/lib/docker/network 

据推测, PR 21261解决了两个情况,在ungraceful守护进程closuresscheme期间解决了活动端点问题。
它只能用于docker 1.12.2,所以请检查你当前的docker版本。