Docker踩坑记录

问题1

failed to register layer: Error processing tar file(exit status 1): write /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64/jre/lib/amd64/server/libjvm.so: no space left on device

出现上述报错信息,原因是docker存储空间满了,需要清理。

解决方案:

执行以下命令即可:

docker system prune -a

问题2:

[root@localhost ~]# docker pull nacos/nacos-server
Using default tag: latest
Error response from daemon: Get “https://registry-1.docker.io/v2/”: x509: certificate has expired or is not yet valid: current time 2022-03-17T03:46:45+08:00 is before 2022-10-31T00:00:00Z

出现上述报错信息,原因是系统时间不对,更新一下就好了

解决方案:

# 查看时间是否正确
[root@localhost ~]# date
2022年 03月 17日 星期四 03:49:53 CST
# 执行系统时间更新
[root@localhost ~]# ntpdate cn.pool.ntp.org
-bash: ntpdate: 未找到命令
# 安装ntpdate命令
[root@localhost ~]# yum install ntpdate
# 再次执行系统时间更新
[root@localhost ~]# ntpdate cn.pool.ntp.org
28 Dec 00:46:23 ntpdate[2084]: step time server 94.237.64.20 offset 24699327.367398 sec

问题3:

[root@localhost ~]# docker start nacos
Error response from daemon: driver failed programming external connectivity on endpoint nacos (0b28175b9979732360156bbfe23cc4a32130cee32dd42ebe669f9fd8d751b99a): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8848 -j DNAT --to-destination 172.17.0.2:8848 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))

启动nacos服务时,报:iptables: No chain/target/match by that name。。可能是iptables有问题

解决方案

# 把docker服务stop
[root@localhost ~]# systemctl stop docker
# 把docker服务stop
[root@localhost ~]# systemctl stop docker.socket
# 保存iptables的表配置到/etc/sysconfig/iptables
[root@localhost ~]# iptables-save >  /etc/sysconfig/iptables
# 把docker服务start
[root@localhost ~]# systemctl start docker
# docker开机自动启动
[root@localhost ~]# systemctl enable docker

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

雨润泽林

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值