【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脚本,一是方便其他人使 ...
随机推荐
- es6删除指定元素
原数组: let arr =[{id:1},{id:2},{id:3},{id:8}] 待删除数据 obj = {id:1} 删除原数组指定元素 arr.splice(arr.findIndex(it ...
- 前置机器学习(四):一文掌握Pandas用法
Pandas提供快速,灵活和富于表现力的数据结构,是强大的数据分析Python库. 本文收录于机器学习前置教程系列. 一.Series和DataFrame Pandas建立在NumPy之上,更多Num ...
- django APIview使用
1.APIview使用 ModelVIewSet 是对 APIView 封装 ModelSerializer 是对 Serializer 1.1 在 user/urls.py 中添加路由 urlpat ...
- el-amap 遮罩(带洞多边形)
el-amap 遮罩(带洞多边形) 遮罩(带洞多边形) 效果图 代码 <template> <div> <el-amap vid="amapDemo" ...
- Android虚拟机Genymotion的安装与使用
1.首先官网下载genymotion-2.12.2-vbox包,首选第一个带有box,点击安装 2.安装完毕选择自己要用的安卓系统,建议选择安卓4.0以上全部 3.启动打开虚拟机 4.安装外部APP, ...
- Proguard结合maven使用
添加插件配置 项目是maven项目,则可以在 pom 的 build 标签下添加插件 <plugin> <groupId>com.github.wvengen</grou ...
- 如何将离线计算业务的成本降低65%——弹性容器服务EKS「竞价实例」上线
在容器化的应用场景中,大数据计算是其中很大并且业务应用在逐渐增加的一个热门领域,包括越来越多的人工智能企业,都在使用容器技术来支持业务中的大量计算任务.降低成本.提升资源利用率也是当前这部分用户非常期 ...
- codeblocks opengl glew freeglut 2020.11.15
https://wenku.baidu.com/view/28cd5ebfaf1ffc4fff47accf.html 一下为测试代码 /* ============================== ...
- CentOS7 实战源码部署apache网站服务器
简介:实战演练apache网站服务器的搭建 Apache简介: Apache软件基金会的一个开源免费的网页服务器,也是目前世界上使用最广泛的一种web server , apache最出名的是它跨平台 ...
- 01. Consul 入门
简介 Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置.与其他分布式服务注册与发现的方案,Consul的方案更"一站式",内置了服务注册 ...