networking - Docker守护程序无法初始化网络 Controller

标签 networking docker

我在启动Docker守护程序时遇到问题。我已经安装了docker,但是当我尝试运行# systemctl start docker.service时会抛出错误。$ systemctl status docker.service给了我这个:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2016-09-21 14:38:24 CEST; 6s ago
     Docs: https://docs.docker.com
  Process: 5592 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 5592 (code=exited, status=1/FAILURE)

Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.271068176+02:00" level=warning msg="devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem  will be ignored."
Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.327814644+02:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.329895994+02:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.330707721+02:00" level=info msg="Loading containers: start."
Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.335610867+02:00" level=info msg="Firewalld running: false"
Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.461243263+02:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: failed to parse pool request for ad
Sep 21 14:38:24 tp-x230 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Sep 21 14:38:24 tp-x230 systemd[1]: Failed to start Docker Application Container Engine.
Sep 21 14:38:24 tp-x230 systemd[1]: docker.service: Unit entered failed state.
Sep 21 14:38:24 tp-x230 systemd[1]: docker.service: Failed with result 'exit-code'.

相关行是:
Sep 21 14:38:24 tp-x230 dockerd[5592]: time="2016-09-21T14:38:24.461243263+02:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: failed to parse pool request for ad

最佳答案

您的错误文字被剪切,因此我无法检查它是否完全相同,但我收到此错误:

Error starting daemon: Error initializing network controller: Error creating default "bridge" network: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network
这与具有多个网卡的计算机有关(也可能在具有VPN的计算机中发生,您也可以暂时将其停止,启动docker并重新启动vpn或应用以下解决方法)
对我来说,解决方案是像这样手动启动docker:
/usr/bin/docker daemon --debug --bip=192.168.y.x/24
其中192.168.y.x是主计算机IP,而/ 24是ip网络掩码。 Docker将使用此网络范围来构建网桥和防火墙规则。 --debug并不是真正需要的,但是如果其他原因失败了,可能会有所帮助
启动一次后,您可以杀死docker并照常启动。 AFAIK, docker 已经为该--bip创建了一个缓存配置,并且无需它就可以正常工作。当然,如果您清理Docker缓存,则可能需要再次执行此操作。

关于networking - Docker守护程序无法初始化网络 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39617387/

相关文章:

networking - BPF:sock_ops 相当于 UDP 套接字

bash - Dockerfile CMD用于从主机获取bash命令

scala - 在Scala中使用Docker运行测试用例

networking - 仅使用 NAK 的数据传输协议(protocol)如何可靠?

node.js - 查询时间 mongoose 偶尔需要 3-4 秒

ruby-on-rails - 使用 selenium/standalone-chrome 在 dockerized Rails 5 应用程序中进行 RSpec 系统测试的 SSL 错误

docker - "docker pull redis"在 Docker for Windows 上失败

macos - 无法在 M1 芯片组上构建 docker compose

python - Python 有哪些网络库/框架?

c++ - 如何使用 WinPcap 发送/注入(inject)数据包