【问题一】OCI runtime exec failed......executable file not found in $PATH": unknown

[root@localhost home]# docker exec -it container-test bash
OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

【分析】

  由于镜像系统不一,使用错误shell解释器导致,可尝试以下其中一种方案。

【解决】

docker exec -it container-test /bin/bash

docker exec -it container-test /bin/sh

docker exec -it container-test /bin/csh

【问题二】http: server gave HTTP response to HTTPS client

$ docker push xxx.xxx.xxx.xxx:/java-
The push refers to repository [xxx.xxx.xxx.xxx/java-]
Get https://xxx.xxx.xxx.xxx:5000/v2/: http: server gave HTTP response to HTTPS client

【分析】

  Docker自从1.3.X之后docker registry交互默认使用的是HTTPS,但是搭建私有镜像默认使用的是HTTP服务导致。

【解决】

# 修改启动文件第12行
# vim /usr/lib/systemd/system/docker.service
# ExecStart=/usr/bin/dockerd --insecure-registry xxx.xxx.xxx.xxx:5000
# 或者增加deamon.json文件配置
$ vim /etc/docker/daemon.json
{
"insecure-registries":["xxx.xxx.xxx.xxx:5000"]
}
# 最后重启服务
$ systemctl daemon-reload
$ systemctl restart docker

【问题三】getsockopt: connection refused

【分析】

  没有指定镜像要上传的具体地址导致。

【解决】

docker tag <image> <ip:port/image>
docker push ip:port/image

【问题四】Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

【分析】

  异常卸载关闭导致。

【解决】

$ systemctl daemon-reload
$ sudo service docker restart
$ sudo service docker status (should see active (running))

【问题五】Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

【分析】

  修改daemon配置文件/etc/docker/daemon.json来使用加速器导致

【解决】

  1、删除 "registry-mirrors": ["镜像加速地址"]

  2、把daemon.json 改为 daemon.conf

【问题六】image jmdiservice:1206 could not be accessed on a registry to record its digest.

Each node will access jmdiservice:1206 independently, possibly leading to different nodes running different versions of the image.

【分析】

   创建service时未指定registry地址(这样主节点也可以创建成功,这因为主节点本地存在该镜像),但是同样会导致子节点获取的镜像时也使用本地缓存,也就有可能导致使用的镜像不一致,或者获取不到。

【解决】

  指定registry地址即可。

【问题】error pulling image configuration: Get https:// ...... x509: certificate has expired or is not yet valid

进行镜像拉取时报错

【分析】

  很多人会被第一句所蒙蔽,按照网上教程进行修改etc/sysconfig/docker,之后发现还是没有用。

  其实这里重点是最后一句"certificate has expired",这里一般是本地时间不正确导致证书验证过期,同步时间即可。

【解决】

# 首先查看时间与时区
date -R # 时区不正确更新命令
cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # 时间不正确更新命令
ntpdate ntp.api.bz  # 命令安装: yum install ntp
# 手工方式更新
date -s "2019-12-12 20:12:30"

Docker常见报错解决方法记录的更多相关文章

  1. 03:git常见报错解决方法

    1.1 git常见报错解决方法 1.warning: LF will be replaced by CRLF in .idea/workspace.xml. 参考博客:https://www.cnbl ...

  2. Mysql常见报错解决方法

    一:登录报错 ERROR 1045 (28000): Access denied for user 'mysql'@'localhost' (using password: NO) mysql日志文件 ...

  3. React 开发常见报错解决方法

    1. 使用 redux 的异步 action 时浏览器报错: Error: Actions must be plain objects. Use custom middleware for async ...

  4. tomcat常见报错解决方法汇总

    报错一:内存泄漏,字眼This is very likely to create a memory leak. 解决方法:修改tomcat内存. 在tomcat/bin目录下,修改catalina.s ...

  5. js常见报错解决方法

    1.获得类名document.getElementsClassName(常出现一个问题): getClassName("gn","pt")[0].appendC ...

  6. Django 连接 MySQL 数据库及常见报错解决

    目录 Django 连接 MySQL数据库及常见报错解决 终端或者数据库管理工具连接 MySQL ,并新建项目所需数据库 安装访问 MySQL 的 Python 模块 Django 相关配置 可能会遇 ...

  7. SSH 报错解决方法记录汇总

    SSH 密钥签名失败 情景: 使用 SSH 密钥验证身份时 报错: sign_and_send_pubkey: signing failed: agent refused operation 环境: ...

  8. Python编程常见报错解决(一)

    1.报错一: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xca in position 0: invalid cont ...

  9. Play! 1.x Eclipse Debug调试报错解决方法记录

    使用Play eclipsify xxxx[项目路径],可以把play new xxxx[项目路径]创建的工程生成为Eclipse的项目 但是在Debug AS 调试的时候,会报以下错误 Error ...

随机推荐

  1. 利用 SASS 简化 `nth-child` 样式的生成

    考察如下的 HTML 片段,通过 CSS 的 nth-child() 伪选择器实现列表的颜色循环,比如每三个一次循环. <ul> <li>1</li> <li ...

  2. Spring Security 学习记录

    一.核心拦截器详细说明 1.WebAsyncManagerIntegrationFilter 根据请求封装获取WebAsyncManager 从WebAsyncManager获取/注册Security ...

  3. SpringCloud教程二:Ribbon(Finchley版)

    在上一篇文章,讲了服务的注册和发现.在微服务架构中,业务都会被拆分成一个独立的服务,服务与服务的通讯是基于http restful的.Spring cloud有两种服务调用方式,一种是ribbon+r ...

  4. 子网掩码!如何划分子网掩码,计算IP地址

    作者:chli1806 一.子网掩码的含义和根据子网掩码划分子网一个IP地址必然属于某一个网络,或者叫子网.子网掩码就是用来指定某个IP地址的网络地址的,换一句话说,就是用来划分子网的.例如,一个A类 ...

  5. 小白学 Python(2):基础数据类型(上)

    人生苦短,我选Python 引言 前文传送门 小白学 Python(1):开篇 接触一门新的语言,肯定要先了解它的基础数据类型.啥?你问我为啥要先了解基础数据类型? 为了你的生命安全,还是乖乖听我 B ...

  6. Neo4j:图数据库GraphDB(二)高级查找

    接着上一篇,继续介绍图数据库Neo4j: http://www.cnblogs.com/rongyux/p/5537028.html 三 高级查找操作 1过滤   name = "Tom H ...

  7. spring源码系列7:Spring中的InstantiationAwareBeanPostProcessor和BeanPostProcessor的区别

    概念 Bean创建过程中的"实例化"与"初始化"名词 实例化(Instantiation): 要生成对象, 对象还未生成. 初始化(Initialization ...

  8. boost::thread_specific_ptr

    thread_specific_ptr代表了一个全局的变量,而在每个线程中都各自new一个线程本地的对象交给它进行管理. 线程之间就不会因为访问同一全局对象而引起资源竞争导致性能下降. 而线程结束时, ...

  9. 记一次EF Core DBContext在Action委托中GC异常的问题.

    今天在开发过程中发现.在SaveChanges的时候偶尔会抛出异常:Cannot access a disposed object. A common cause of this error is d ...

  10. Python编程系列---使用装饰器传参+字典实现动态路由

    # 实现一个空路由表,利用装饰器将url和功能函数的对应关系自动存到这个字典中 router_dict = {} # 定义一个装饰器 # 再给一层函数定义,用来传入一个参数,这个参数就是访问的页面地址 ...