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
    

    然后就可以了吧

  • 相关阅读:
    获取地址栏数据
    tag标签添加删除并把值存入到一个input的value内
    美化 input type=file控件
    高效的数组去重(js)
    原生js动态改变dom高度
    html5 postMessage解决跨域、跨窗口消息传递
    移动前端制作篇之javascript篇
    js中的事件委托
    图片轮播(定时播放)
    潭州课堂25班:Ph201805201 django 项目 第四十一课 后台 轮播图管理功能讲解,文档管理功能 实现 (课堂笔记)
  • 原文地址:https://www.cnblogs.com/lwhp/p/7169455.html
Copyright © 2011-2022 走看看