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

|  欢迎关注个人公众号  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

最新文章

  1. Unix哲学
  2. iOS相关笔记
  3. linux系统的常用命令
  4. php 验证码
  5. Debian7编译VIM7.4
  6. 学习之路三十五:Android和WCF通信 - 大数据压缩后传输
  7. (转载)OC学习篇之---Foundation框架中的NSArray类和NSMutableArray类
  8. 安装Win7和Ubuntu12.04双系统后,意外删除Ubuntu12.04引导文件,出现error:unknown filesystem;grub rescue&gt;错误的解决方案
  9. (转载)APC支持php5.4了
  10. 2013国内IT行业薪资对照表【技术岗】
  11. Hibernate session.saveOrUpdate()方法
  12. ECOS-Ecstore 伪静态规则
  13. USACO 2017 February Platinum
  14. WPF:实现自定义标记扩展
  15. Android布局:宽度适应的横向跟随,防止挤掉重要视图
  16. Gym 101194E / UVALive 7901 - Ice Cream Tower - [数学+long double][2016 EC-Final Problem E]
  17. 基于JMX动态配置Log4J日志级别
  18. Execute Javascript in iOS Applications
  19. 2017-2018-2 『Java程序设计』课程 结对编程练习_四则运算
  20. UIWindow和UIScreen

热门文章

  1. svn提交时提示 Aborting commit: remains in conflict 解决办法,更改svn服务地址
  2. hive with as 语法
  3. windows10 64位下安装oracle 11g和PL/SQL Developer
  4. 2020-2021-1 20209307 《Linux内核原理与分析》第二周作业
  5. git远程仓库Github
  6. Dotnet Core多版本API共存的优雅实现
  7. 蒲公英 &#183; JELLY技术周刊 Vol.35: Flash 四宗罪?
  8. 用Python批量爬取优质ip代理
  9. matlab中fminbnd函数求最小或者组大值
  10. Asp.net webapi 判断请求参数是否为空简易方法 Model Validation 判断请求参数是否为空