zoukankan      html  css  js  c++  java
  • Failed to start Docker Application Container Engine

    $ sudo service docker restart
    Redirecting to /bin/systemctl restart  docker.service
    Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" f$
    r details.
    
    $ sudo systemctl status docker.service                                                                               
    ● docker.service - Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/docker.service.d
               └─override.conf
       Active: failed (Result: start-limit) since 五 2017-07-14 11:31:35 CST; 11s ago
         Docs: https://docs.docker.com
      Process: 22799 ExecStart=/usr/bin/docker daemon --storage-driver=overlay --graph=/mnt/docker -H fd:// (code=exited, status=1/FAILURE)
     Main PID: 22799 (code=exited, status=1/FAILURE)
    
    # 但是docker.service明明没有什么daemon。。。
    
    [Unit]
    Description=Docker Application Container Engine
    Documentation=https://docs.docker.com
    After=network-online.target firewalld.service
    Wants=network-online.target
    
    [Service]
    Type=notify
    # the default is not to use systemd for cgroups because the delegate issues still
    # exists and systemd currently does not support the cgroup feature set required
    # for containers run by docker
    ExecStart=/usr/bin/dockerd
    ExecReload=/bin/kill -s HUP $MAINPID
    # Having non-zero Limit*s causes performance problems due to accounting overhead
    # in the kernel. We recommend using cgroups to do container-local accounting.
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity
    # Uncomment TasksMax if your systemd version supports it.
    # Only systemd 226 and above support this version.
    #TasksMax=infinity
    TimeoutStartSec=0
    # set delegate yes so that systemd does not reset the cgroups of docker containers
    Delegate=yes
    # kill only the docker process, not all processes in the cgroup
    KillMode=process
    # restart the docker process if it exits prematurely
    Restart=on-failure
    StartLimitBurst=3
    StartLimitInterval=60s
    
    [Install]
    WantedBy=multi-user.target
    
    # 仔细看错误,发现
      Drop-In: /etc/systemd/system/docker.service.d
               └─override.conf
    # 于是打开这个目录和文件,可以在上面找到那个错误命令
    $ cat /etc/systemd/system/docker.service.d/override.conf 
    [Service]
    ExecStart=
    ExecStart=/usr/bin/docker daemon --storage-driver=overlay --graph=/mnt/docker -H fd://
    
    # 再看一下正常的默认的是怎么显示的。在另一台安装docker的机子上看,然后把上面的多余的删掉即可
    $ cat  /etc/systemd/system/docker.service.d/override.conf 
    [Service]
    ExecStart=
    ExecStart=/usr/bin/docker daemon -g /mnt/docker
    
    $ sudo systemctl daemon-reload
    $ sudo systemctl enable kubelet.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
    $ sudo systemctl start kubelet.service
    $ sudo systemctl enable kube-proxy.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/kube-proxy.service to /usr/lib/systemd/system/kube-proxy.service.
    $ sudo systemctl start kube-proxy.service
    

    然后就可以了吧

  • 相关阅读:
    pandas 修改列顺序
    read_csv,to_csv 前n行
    郭盛华:未来黑客攻击的将远不止网络
    微软的 Linux 存储库停机 18 多个小时
    警惕黑客利用 Google Docs进行网络钓鱼
    苹果发布紧急补丁!修复被黑客利用的2个零日漏洞
    谷歌发布新框架以防止软件供应链攻击
    郭盛华:以知识见识锤炼真本领,年轻人要有理想
    通过 GDPR 加强密码政策,是企业网络的第一道防线
    肉类供应商遭黑客攻击,并支付了 1100 万美元的赎金
  • 原文地址:https://www.cnblogs.com/lwhp/p/7169455.html
Copyright © 2011-2022 走看看