-------------------------------------------------------------------------------------------------

|  欢迎关注个人公众号  zclinux_note  第一时间获取关于linux使用的技巧。探索Linux的奥秘   |

-------------------------------------------------------------------------------------------------

报错如下:
/usr/bin/docker-current: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See '/usr/bin/docker-current run --help'.

message内容:

Jul 10 01:07:04 docker systemd: docker.service: main process exited, code=exited, status=1/FAILURE

Jul 10 01:07:04 docker systemd: Unit docker.service entered failed state.
Jul 10 01:07:04 docker systemd: Failed to start Docker Application Container Engine.
Jul 10 01:07:04 docker dockerd-current: --label list                            Set key=value labels to the daemon (default [])
Jul 10 01:07:04 docker dockerd-current: --live-restore                          Enable live restore of docker when containers are still running
Jul 10 01:07:04 docker dockerd-current: --log-driver string                     Default driver for container logs (default "json-file")
Jul 10 01:07:04 docker dockerd-current: -l, --log-level string                      Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")

Jul 10 01:14:10 docker journal: g_simple_action_set_enabled: assertion 'G_IS_SIMPLE_ACTION (simple)' failed
Jul 10 01:14:10 docker journal: g_simple_action_set_enabled: assertion 'G_IS_SIMPLE_ACTION (simple)' failed
Jul 10 01:14:39 docker journal: g_simple_action_set_enabled: assertion 'G_IS_SIMPLE_ACTION (simple)' failed
Jul 10 01:15:27 docker journal: g_simple_action_set_enabled: assertion 'G_IS_SIMPLE_ACTION (simple)' failed
Jul 10 01:17:14 docker kube-controller-manager: W0710 01:17:14.365703    9051 reflector.go:319] pkg/controller/garbagecollector/garbagecollector.go:768: watch of <nil> ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [377/32]) [1376]
Jul 10 01:17:39 docker journal: g_simple_action_set_enabled: assertion 'G_IS_SIMPLE_ACTION (simple)' failed

解决办法:

/lib/systemd/system/docker.service文件(确保万无一失,先备份一份)

原文件部分内容:

ExecStart=/usr/bin/dockerd-current \
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
--default-runtime=docker-runc \
--exec-opt native.cgroupdriver=systemd \
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
--init-path=/usr/libexec/docker/docker-init-current \
--seccomp-profile=/etc/docker/seccomp.json \
$OPTIONS \
$DOCKER_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \
$ADD_REGISTRY \
$BLOCK_REGISTRY \
$INSECURE_REGISTRY \
$REGISTRIES

这上述部分全部删掉:

并重新写成如下部分内容:

ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -H tcp://0.0.0.0:7654

其他参数不变,重启docker

systemctl daemon-reload

systemctl restart docker.service

完成后,查看是否启动正常,并且可以看到版本信息

[root@docker system]# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      b2f74b2/1.13.1
 Built:           Wed May  1 14:55:20 2019
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-96.gitb2f74b2.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      b2f74b2/1.13.1
 Built:           Wed May  1 14:55:20 2019
 OS/Arch:         linux/amd64
 Experimental:    false

【Docker】/usr/bin/docker-current: Cannot connect to the Docker daemon at unix的更多相关文章

  1. 【问题】/usr/bin/env: php: 没有那个文件或目录

    php不是默认安装的,在使用symfony创建新项目时,出现这个提示. [root@localhost html]# symfony demo /usr/bin/env: php: 没有那个文件或目录 ...

  2. 【转】“/usr/bin/ld: cannot find -lz”

    原文网址:http://stackoverflow.com/questions/3373995/usr-bin-ld-cannot-find-lz I am trying to compile And ...

  3. 【解决】/usr/bin/ld: cannot find -lc

    现象:运行gcc静态编译程序时报错: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit statusmake: *** [gcc_dr ...

  4. 【centos】/usr/bin与/usr/local/bin的区别

    首先注意usr 指 Unix System Resource,而不是User 然后通常: /usr/bin下面的都是系统预装的可执行程序,会随着系统升级而改变. /usr/local/bin目录是给用 ...

  5. 【Python】#!/usr/bin/python 作用

    脚本语言的第一行,目的就是指出,你想要你的这个文件中的代码用什么可执行程序去运行它 #!/usr/bin/python是告诉操作系统执行这个脚本的时候,调用/usr/bin下的python解释器.#! ...

  6. 启动docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

    启动docker提示: docker: Got permission denied while trying to connect to the Docker daemon socket at uni ...

  7. 【CodeChef】Find a special connected block - CONNECT(斯坦纳树)

    [CodeChef]Find a special connected block - CONNECT(斯坦纳树) 题面 Vjudge 题解 还是一样的套路题,把每个数字映射到\([0,K)\)的整数, ...

  8. 【译】从现有的容器里创建新的Docker镜像

    如果你修改了一个容器的内容,你可以使用docker commit命令将现有的容器状态保存为一个镜像. 下面的例子展示了如何修改一个基于oraclelinux:6.6的容器使得其能够运行Apache H ...

  9. 【linux】【jenkins】jenkins构建、mvn或者npm打包、docker运行、失败自动回滚脚本

    小白对jenkins运维的使用有点简单的想法,这里开个记录贴记录下. 由于未找到jenkins构建失败后执行其他脚本的插件,也暂时没有使用其他运维工具.所以想自己写一个shell脚本,一是方便其他人使 ...

随机推荐

  1. 树莓派RPi.GPIO+Flask构建WebApi实现远程控制

    #!/usr/bin/env python3 # -*- coding: utf-8 -*- import RPi.GPIO as GPIO from flask import Flask, requ ...

  2. 线段树入门详解,洛谷P3372 【模板】线段树 1

    关于线段树: 本随笔参考例题      P3372 [模板]线段树 1 所谓线段树就是把一串数组拆分成一个一个线段形成的一棵树. 比如说像这样的一个数组1,2,3,4,5: 1 ~ 5 /       ...

  3. 多任务-python实现-使用生成器完成多任务(2.1.14)

    @ 目录 1.注意 2. 代码 关于作者 1.注意 先定义函数,函数里面放一个yiled 主函数生成该对象 执行while循环 调用生成器对象的next 因为每次调用next,不会继续执行,从而 完成 ...

  4. [BUUOJ]刮开有奖reverse

    刮开有奖 这是一个赌博程序,快去赚钱吧!!!!!!!!!!!!!!!!!!!!!!!!!!!(在编辑框中的输入值,即为flag,提交即可) 注意:得到的 flag 请包上 flag{} 提交 1.查壳 ...

  5. Elasticsearch 学习二(请求流程).

    一.写入数据 1.ES 的任意节点都可以作为协调(Coordinating)节点接受请求(包括新建.索引或者删除请求),每个节点都知道集群中任一文档位置: 2.协调节点会通过 routing 字段计算 ...

  6. kafka rebalance解决方案 -incremental cooperative协议和static membership功能

    apache kafka的重平衡(rebalance),一直以来都为人诟病.因为重平衡过程会触发stop-the-world(STW),此时对应topic的资源都会处于不可用的状态.小规模的集群还好, ...

  7. 初接触matplotlib

    1,绘制简单的折线图. 1 import matplotlib.pyplot as plt 2 3 square = [1,4,9,16,25] 4 5 plt.plot(square) 6 plt. ...

  8. C# Socket使用以及DotNetty和Supersocket 框架

    1.Socket服务端与客户端通话 1服务端 using System; using System.Collections.Generic; using System.Linq; using Syst ...

  9. [论文分享]Channel Pruning via Automatic Structure Search

    authors: Mingbao Lin, Rongrong Ji, etc. comments: IJCAL2020 cite: [2001.08565v3] Channel Pruning via ...

  10. java中远程调用接口springboot

    package com.kakarote.crm.utils; import cn.hutool.core.util.ObjectUtil; import org.apache.http.client ...