启动docker实例时报错docker container state OCI runtime create failed: container with id exists:unknown

本文解决了因在/etc/rc.local中错误地尝试启动不存在的Docker容器而导致的启动失败问题。通过修改容器ID并重启服务器,成功启动了Oracle、MySQL和MongoDB容器。

docker container state OCI runtime create failed: container with id exists:unknown

原因是在linux中的/etc/rc.local中添加了以下文件

sudo docker start e63854a6b21f //oracle
sudo docker start b37331382099 //mysql
sudo docker start 5e7309daaa45 //mongodb

因为不存在这几个容器,所以报错,重启docker服务没有用,将containerId容器id修改后重启服务器后,再次启动容器正常

查看/var/log/messages

time="2020-01-12T21:38:27.873627837-05:00" level=info msg="Docker daemon" commit=6a30dfc graphdriver(s)=overlay2 version=19.03.2
Jan 12 21:38:27 localhost dockerd: time="2020-01-12T21:38:27.873859142-05:00" level=info msg="Daemon has completed initialization"
Jan 12 21:38:27 localhost dockerd: time="2020-01-12T21:38:27.964932795-05:00" level=info msg="API listen on /var/run/docker.sock"
Jan 12 21:38:27 localhost systemd: Started Docker Application Container Engine.
Jan 12 21:38:28 localhost kernel: docker0: port 1(veth757a9cb) entered blocking state
Jan 12 21:38:28 localhost kernel: docker0: port 1(veth757a9cb) entered disabled state
Jan 12 21:38:28 localhost kernel: device veth757a9cb entered promiscuous mode
Jan 12 21:38:28 localhost kernel: IPv6: ADDRCONF(NETDEV_UP): veth757a9cb: link is not ready

评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值