【Docker】/usr/bin/docker-current: Cannot connect to the Docker daemon at unix
-------------------------------------------------------------------------------------------------
| 欢迎关注个人公众号 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的更多相关文章
- 【问题】/usr/bin/env: php: 没有那个文件或目录
php不是默认安装的,在使用symfony创建新项目时,出现这个提示. [root@localhost html]# symfony demo /usr/bin/env: php: 没有那个文件或目录 ...
- 【转】“/usr/bin/ld: cannot find -lz”
原文网址:http://stackoverflow.com/questions/3373995/usr-bin-ld-cannot-find-lz I am trying to compile And ...
- 【解决】/usr/bin/ld: cannot find -lc
现象:运行gcc静态编译程序时报错: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit statusmake: *** [gcc_dr ...
- 【centos】/usr/bin与/usr/local/bin的区别
首先注意usr 指 Unix System Resource,而不是User 然后通常: /usr/bin下面的都是系统预装的可执行程序,会随着系统升级而改变. /usr/local/bin目录是给用 ...
- 【Python】#!/usr/bin/python 作用
脚本语言的第一行,目的就是指出,你想要你的这个文件中的代码用什么可执行程序去运行它 #!/usr/bin/python是告诉操作系统执行这个脚本的时候,调用/usr/bin下的python解释器.#! ...
- 启动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 ...
- 【CodeChef】Find a special connected block - CONNECT(斯坦纳树)
[CodeChef]Find a special connected block - CONNECT(斯坦纳树) 题面 Vjudge 题解 还是一样的套路题,把每个数字映射到\([0,K)\)的整数, ...
- 【译】从现有的容器里创建新的Docker镜像
如果你修改了一个容器的内容,你可以使用docker commit命令将现有的容器状态保存为一个镜像. 下面的例子展示了如何修改一个基于oraclelinux:6.6的容器使得其能够运行Apache H ...
- 【linux】【jenkins】jenkins构建、mvn或者npm打包、docker运行、失败自动回滚脚本
小白对jenkins运维的使用有点简单的想法,这里开个记录贴记录下. 由于未找到jenkins构建失败后执行其他脚本的插件,也暂时没有使用其他运维工具.所以想自己写一个shell脚本,一是方便其他人使 ...
随机推荐
- linux下为什么每次修改完配置文件之后都需要重新加载配置文件
目录 一.关于inode 二.inode的作用 二.为什么每次修改完服务器配置文件之后,都需要重新加载一下配置文件? 一.关于inode 1.在linux下一切皆文件,linux文件由三部分组成:文件 ...
- JavaSE03-运算符&分支语句
1.运算符 1.1 算术运算符 1.1.1 运算符和表达式 运算符:对常量或者变量进行操作的符号 表达式:用运算符把常量或者变量连接起来符合java语法的式子就可以称为表达式. 不同运算符连接的表达式 ...
- IntelliJ IDEA(十二) :IDEA常用配置
idea版本 2019.3.4 配置JDK File--> Project Structure... 修改项目 jdk和项目语言等级 修改jdk版本 File--> Ohter Setti ...
- Java 12 新特性
Java 12 已如期于 3 月 19 日正式发布,此次更新是 Java 11 这一长期支持版本发布之后的一次常规更新,截至目前,Java 半年为发布周期,并且不会跳票承诺的发布模式,已经成功运行一年 ...
- 持久层之 MyBatis: 第三篇 :缓存 And 高级查询
MyBatis入门到精通3 缓存机制 Mybatis一级缓存测试 Mybatis二级缓存测试 高级查询 表关系说明 一对一查询 一对多查询 多对多查询 缓存机制 正如大多数持久层框架一样,MyBati ...
- 灯光设置(light)
clc;clear all;close all; %% 台灯的设置figure('color','k')% 底座fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b',... ...
- npm国内淘宝镜像
理由 由于npm的registry地址是国外的,速度很慢,所以推荐使用淘宝镜像:https://registry.npm.taobao.org 配置方法 临时配置 npm --registry htt ...
- [LeetCode]367. Valid Perfect Square判断完全平方数
方法有很多,我觉得比较容易记住的是两个,一个是二分法,在1-num/2中寻找目标数 另一个是数学方法: public boolean isPerfectSquare(int num) { /* 有很多 ...
- 无延时去斗按键实现方法(不好CPU)
这一灵感来源于定时器计数的方法,最后可以实现的效果跟咱们电脑键盘按键的效果一样!我先来介绍下基本原理吧! 采用定时器中断的方法,比如定时器终端我们设置为5ms,我们需要按键按下超过40ms时才算有按键 ...
- sprignAOP那些术语
那些AOP术语 初看这么多术语,一下子都不好接受,慢慢来,很快就会搞懂.通知.增强处理(Advice) 就是你想要的功能,也就是上说的安全.事物.日志等.你给先定义好,然后再想用的地方用一下.包含As ...