docker-run-failed
Phenomenon
overlay2 not such file or directory.
overlay2 not such file or directory.
network not such file or directory.
docker run ****
/usr/bin/docker-current: open /data0/docker-data/tmp/GetImageBlob742939759: no such file or directory.
Job for docker.service failed
[root@localhost file-center-wf-monitor]# systemctl stopstop docker
[root@localhost file-center-wf-monitor]# service docker start
Redirecting to /bin/systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@localhost file-center-wf-monitor]# journalctl -xe
Apr 08 16:46:56 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 08 16:46:56 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Apr 08 16:46:56 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Apr 08 16:46:56 localhost.localdomain systemd[1]: docker.service failed.
Apr 08 16:46:56 localhost.localdomain polkitd[378650]: Unregistered Authentication Agent for unix-process:615774:734710755 (system bus name :1.130780, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
[root@localhost file-center-wf-monitor]# rm -rf /data0/docker_images/*
rm: cannot remove ‘/data0/docker_images/containers’: Device or resource busy
[root@localhost file-center-wf-monitor]# mount | grep /data0/docker_images
/dev/sda7 on /data0/docker_images/containers type ext4 (rw,relatime,data=ordered)
/dev/sda7 on /data0/docker_images/overlay type ext4 (rw,relatime,data=ordered)
[root@localhost file-center-wf-monitor]# umount /data0/docker_images/containers
[root@localhost file-center-wf-monitor]# rm -rf /data0/docker_images
init/merged: invalid argument.
[root@localhost file-center-wf-monitor]# service docker start
Error response from daemon: Cannot kill container file-center-wf-monitor-20200408: No such container: file-center-wf-monitor-20200408
Error response from daemon: No such container: file-center-wf-monitor-20200408
/usr/bin/docker-current: Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/dd9b026441e21f3b74bd00dbb9cba667129b8aba342413fa9fa56f68202b582b-init/merged: invalid argument.
See '/usr/bin/docker-current run --help'.
[root@localhost data0]# systemctl status docker.service
● docker.service - Docker Application Container Engine
{
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-04-08 16:54:09 CST; 6s ago
Docs: http://docs.docker.com
Process: 617751 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 (code=exited, status=1/FAILURE)
Main PID: 617751 (code=exited, status=1/FAILURE)
Apr 08 16:54:08 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Apr 08 16:54:08 localhost.localdomain dockerd-current[617751]: time="2020-04-08T16:54:08.821786068+08:00" level=info msg="libcontainerd: new containerd process, pid: 617763"
Apr 08 16:54:09 localhost.localdomain dockerd-current[617751]: Error starting daemon: error initializing graphdriver: invalid argument
Apr 08 16:54:09 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 08 16:54:09 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Apr 08 16:54:09 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Apr 08 16:54:09 localhost.localdomain systemd[1]: docker.service failed.
solution
- 停止docker
[root@localhost file-center-wf-monitor]# systemctl stopstop docker
- 重装docker
卸载docker及关键依赖
yum list installed | grep docker
yum remove docker-engine.x86_64
yum remove docker-engine-selinux.noarch
yum remove docker-engine.x86_64 docker-client.x86_64 docker-common.x86_64
yum remove container-selinux.noarch
- 删除docker 相关文件
rm -rf /var/lib/docker/
rm -rf /var/lib/docker
rm -rf /data0/docker_images/overlay2/*
rm -rf /data0/docker_images/*
rm -rf /etc/sysconfig/docker*
rm -rf /etc/systemd/system/docker.service.d
- 不卸载会导致安装不上
Package(s) docker available, but not installed.
- 不删除可能导致卸载不完全
安装docker
yum -y install docker
- 调整配置
[root@localhost file-center-wf-monitor]# vim /etc/docker/daemon.json
{
"graph": "/data0/docker_images",
"storage-driver": "overlay"
}
- 重载服务
systemctl daemon-reload
- 重启docker
service [start|restart] docker
- 查看docker状态
systemctl status docker
conclusion
- 本次问题根源是因为机器上某目录不可用,推测是由于历史docker版本残留导致
- 调整docker graph后,问题解决。
- 本文记录为解决当前问题过程中,所遇到的一系列问题和对应的操作。
- yum安装docker,如果机器比较干净,安装会很顺利;如果历史安装过docker,会出现一系列问题。可以分别卸载docker的子package,并手动清除残留信息解决。
- docker 镜像存储路径一定调整到系统数据盘,不然分分钟打满系统盘。
- journalctl -xe 可以看到service信息(docker/mesos)
- docker invalid argument不一定是启动的参数错误,一般不必调整
/etc/systemd/system/docker.service.d/storage.conf
、/etc/sysconfig/docker-storage
、/etc/sysconfig/docker
和/etc/docker/daemon.json
等文件。 /etc/sysconfig/docker
配置可以关闭docker的selinux模式
# OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'
OPTIONS='--log-driver=journald --signature-verification=false'
/etc/sysconfig/docker-storage
配置可以调整docker存储(挂载目录)模式
DOCKER_STORAGE_OPTIONS=
/etc/sysconfig/docker-network
配置可以调整docker网络模式- 通过
/etc/systemd/system/docker.service.d/***.conf
下的对应文件进行配置,同样生效 - docker启动时,本地目录权限、状态、挂载都应确认清楚,避免发生异常。
docker-run-failed的更多相关文章
- docker Failed to get D-Bus connection 报错 docker run -e MYVAR1 --env MYVAR2=foo --env-file ./env.list ubuntu bash
docker Failed to get D-Bus connection 报错 原创憬薇2016-01-15 11:25:26评论(10)40278人阅读 在centos7的容器里面出现了一个B ...
- 【云计算】docker run详解
Docker学习总结之Run命令介绍 时间 2015-01-21 17:06:00 博客园精华区 ...
- docker 报错: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
centos 启动docker服务报错: Job for docker.service failed because the control process exited with error cod ...
- docker run、commit报错
1.docker commit 报错 Error response from daemon: devmapper: Error mounting '/dev/mapper/docker-253:2-1 ...
- DOCKER启动失败Job for docker.service failed because the control process exited with error code. See "syste mctl status docker.service" and "journalctl -xe" for details.
[root@localhost ~]# systemctl start docker Job for docker.service failed because the control process ...
- 【Docker】Failed to get D-Bus connection: Operation not permitted解决
------------------------------------------------------------------------------------------------- | ...
- Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details. To force a start use "systemctl reset-failed
安装docker时,自己添加了国内的hub.docker.com镜像 [root@ce-docker ~]# systemctl restart docker 出现以下报错:Job for docke ...
- docker run elasticsearch
docker run -d --name=esNode1 -p 9200:9200 -p 9300:9300 elasticsearch:2.3 -Des.network.publish_host=& ...
- docker run mysql
sudo docker run --name=mysqlserver -e MYSQL_ROOT_PASS=123456 -v /srv/mysql/data:/data/mysql -d -p : ...
- Docker run命令详解 转
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Usage: doc ...
随机推荐
- B/S结构系统的会话机制(session)
B/S结构系统的会话机制(session) 目录 B/S结构系统的会话机制(session) 每博一文案 1. session 会话机制的概述 2. 什么是 session 的会话 3. sessio ...
- NC23054 华华开始学信息学
题目链接 题目 题目描述 因为上次在月月面前丢人了,所以华华决定开始学信息学.十分钟后,他就开始学树状数组了.这是一道树状数组的入门题: 给定一个长度为 \(N\) 的序列 \(A\) ,所有元素初值 ...
- 分享一下.net core mvc的ModelStateExtend
主要代码: using Cracker.Core.Function; using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Cracker.Co ...
- 2021-08-11:按要求补齐数组。给定一个已排序的正整数数组 nums,和一个正整数 n 。从 [1, n] 区间内选取任意个数字补充到 nums 中,使得 [1, n] 区间内的任何数字都可以用
2021-08-11:按要求补齐数组.给定一个已排序的正整数数组 nums,和一个正整数 n .从 [1, n] 区间内选取任意个数字补充到 nums 中,使得 [1, n] 区间内的任何数字都可以用 ...
- Java中synchronized的优化
本文介绍为了实现高效并发,虚拟机对 synchronized 做的一系列的锁优化措施 高效并发是从 JDK5 升级到 JDK6 后一项重要的改进项,HotSpot 虚拟机开发团队在 JDK6 这个版本 ...
- 【汇编】DOS系统功能调用(INT 21H)
前言 最近又听了听汇编的课程,发现代码里的MOV xxxxx INT 21H,老师都是一句话带过,而不讲讲其中的原因(也可能前面讲了我没有听QAQ). 顺便夸一下老师,老师懒省事录的视频画质已经成功从 ...
- [abc279 G] At Most 2 Colors
G - At Most 2 Colors (atcoder.jp) 重点讲解方法三,因为方法三是蒟蒻都能想出来的方法一和方法二都可以借助方法三的思想推出 方法一 这是最简单的设置状态的方法,\(dp[ ...
- 在 RedHat 使用 gdc-client 下载 TCGA 数据
今天,只聊一下 RedHat/CentOS 下 gdc-client 安装的那些事. gdc-client,官网地址:https://gdc.cancer.gov/access-data/gdc-da ...
- Vue——登录小案例、scoped、ref属性、props其他、混入mixin、插件、Element-ui
解析Vue项目 # 1 为什么浏览器中访问某个地址,会显示某个页面组件 根组件:APP.vue 必须是 <template> <div id="app"> ...
- ChatGPT的原理与前端领域实践
一.ChatGPT 简介 ChatGPT的火爆 ChatGPT作为一个web应用,自22年12月发布,仅仅不到3个月的时间,月活用户就累积到1亿.在此之前,最快记录的保持者也需要9个月才达到月活1亿. ...