2016-09-21 139 views
1

我無法啓動泊塢窗守護進程。我已經安裝了docker,但是當我嘗試運行# systemctl start docker.service時,它會引發錯誤。 $ systemctl status docker.service給了我這樣的:Docker守護進程無法初始化網絡控制器

● 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 

回答

0

原來我需要啓用該碼頭工人試圖用,即bridge網絡的網絡IP轉發。

這是通過與內容創建文件/etc/systemd/network/bridge.network

[Network] 

IPFoward=kernel 

,然後用# systemctl restart systemd-networkd.service重新啓動systemd-networkd守護進程來完成。在此之後,# systemctl start docker.service工作正常。

P.S.重新啓動網絡守護程序後,我斷開與網絡的連接(正如人們所期望的)並且必須手動連接。如果你有重要事情發生,可能值得考慮。

1

你的錯誤文本被切斷,所以我不能檢查,如果它是完全一樣的錯誤,但我得到這個錯誤:

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設備)

對我來說,解決辦法是手動啓動泊塢窗是這樣的:

/usr/bin/docker daemon --debug --bip=192.168.y.x/24 

其中192.168.yx是主要的機器的IP和/ 24 IP網絡掩碼。 Docker將使用這個網絡範圍來構建橋樑和防火牆。 --debug並不是真的需要,但可能會有所幫助,如果還有其他的失敗

啓動一次後,你可以殺死碼頭,像往常一樣開始。 AFAIK,docker爲這個--bip創建了一個緩存配置,現在應該沒有它。當然,如果你清理docker cache,你可能需要重新執行一次。

相關問題