2017-11-25 4818 views
0

我已經重新安裝了Docker。當我試圖啓動泊塢窗,一切都很好:警告:停止docker.service,但它仍然可以通過啓動:docker.socket

# /etc/init.d/docker start 
[ ok ] Starting docker (via systemctl): docker.service. 

,直到我想停下來泊塢窗的服務和多次重新啓動:

# /etc/init.d/docker stop 

[....] Stopping docker (via systemctl): docker.serviceWarning: Stopping docker.service, but it can still be activated by: 
    docker.socket 
. ok 

最後,我有錯誤:

# /etc/init.d/docker start 
[....] Starting docker (via systemctl): docker.serviceJob for docker.service failed. 
See "systemctl status docker.service" and "journalctl -xe" for details. 
failed! 

# systemctl status docker.service 
● docker.service - Docker Application Container Engine 
    Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) 
    Active: failed (Result: start-limit-hit) since Sat 2017-11-25 20:04:20 CET; 2min 4s ago 
    Docs: https://docs.docker.com 
    Process: 12845 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=0/SUCCESS) 
Main PID: 12845 (code=exited, status=0/SUCCESS) 
     CPU: 326ms 

Nov 25 20:04:18 example.com systemd[1]: Started Docker Application Container Engine. 
Nov 25 20:04:18 example.com dockerd[12845]: time="2017-11-25T20:04:18.191949863+01:00" level=inf 
Nov 25 20:04:19 example.com systemd[1]: Stopping Docker Application Container Engine... 
Nov 25 20:04:19 example.com dockerd[12845]: time="2017-11-25T20:04:19.368990531+01:00" level=inf 
Nov 25 20:04:19 example.com dockerd[12845]: time="2017-11-25T20:04:19.37953454+01:00" level=info 
Nov 25 20:04:20 example.com systemd[1]: Stopped Docker Application Container Engine. 
Nov 25 20:04:21 example.com systemd[1]: docker.service: Start request repeated too quickly. 
Nov 25 20:04:21 example.com systemd[1]: Failed to start Docker Application Container Engine. 
Nov 25 20:04:21 example.com systemd[1]: docker.service: Unit entered failed state. 
Nov 25 20:04:21 example.com systemd[1]: docker.service: Failed with result 'start-limit-hit'. 

我在Debian 9 Stretch上安裝了Docker。

任何人都可以幫助我擺脫這個警告並解決一個錯誤「失敗,結果'開始限制命中'」?

回答

0

這是因爲除了docker.service單元文件,還有一個docker.socket單元文件...這是用於套接字激活。警告意味着,如果您在docker服務未運行時嘗試連接到docker套接字,systemd將自動爲您啓動docker。 您可以通過刪除/lib/systemd/system/docker.socket來擺脫此問題...您可能還需要從docker.service單元文件中刪除-H fd://

相關問題