CentOS7 启动docker.service失败(code=exited, status=1/FAILURE)

启动报错

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

查看状态

[root@docker-master ~]# 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: exit-code) since Sat 2017-02-04 10:22:05 CST; 9s ago
Docs: https://docs.docker.com
Process: 1303 ExecStart=/usr/bin/dockerd --storage-driver=devicemapper --storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool --storage-opt=dm.use_deferred_removal=true --storage-opt=dm.use_deferred_deletion=true --bridge=bridge0 (code=exited, status=1/FAILURE)
Main PID: 1303 (code=exited, status=1/FAILURE)

Feb 04 10:22:05 docker-master dockerd[1303]: time="2017-02-04T10:22:05.557580671+08:00" level=warning msg="devmapper: Base device already exists and has filesystem xfs on it. User speci... be ignored."
Feb 04 10:22:05 docker-master dockerd[1303]: time="2017-02-04T10:22:05.588961854+08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Feb 04 10:22:05 docker-master dockerd[1303]: time="2017-02-04T10:22:05.589783659+08:00" level=info msg="Loading containers: start."
Feb 04 10:22:05 docker-master dockerd[1303]: ..time="2017-02-04T10:22:05.600874044+08:00" level=info msg="Firewalld running: true"
Feb 04 10:22:05 docker-master dockerd[1303]: time="2017-02-04T10:22:05.712604289+08:00" level=warning msg="could not create bridge network for id 845cd78db010b38a37d75189ca02ea1ea86615e...ted manually"
Feb 04 10:22:05 docker-master dockerd[1303]: time="2017-02-04T10:22:05.744068183+08:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating def...ted manually"
Feb 04 10:22:05 docker-master systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Feb 04 10:22:05 docker-master systemd[1]: Failed to start Docker Application Container Engine.
Feb 04 10:22:05 docker-master systemd[1]: Unit docker.service entered failed state.
Feb 04 10:22:05 docker-master systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

原因

启动文件报错

之前做实验在启动文件/usr/lib/systemd/system/docker.service里加了一个参数--bridge=bridge0

而通过查看网卡信息 发现之前创建的虚拟网卡不在了

[root@docker-master ~]# ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:0f:b0:24 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.137/24 brd 192.168.178.255 scope global dynamic eno16777736
       valid_lft 1514sec preferred_lft 1514sec
    inet6 fe80::20c:29ff:fe0f:b024/64 scope link 
       valid_lft forever preferred_lft forever

解决

1.修改删除启动文件/usr/lib/systemd/system/docker.service里的参数--bridge=bridge0

或者

2.新建网卡bridge0

posted @ 2017-02-04 10:32  rysinal  阅读(48172)  评论(0编辑  收藏  举报