【发布时间】:2021-09-11 12:18:32
【问题描述】:
我很久以前就将我的 docker 主机添加到 Rancher,几个月来一切都运行良好。突然,几天前,我的 docker 主机在 Rancher 中被标记为“断开连接”。当我检查 rancher-agent 容器的状态时,我可以看到它一直在重新启动:
•100% ➜ sudo docker ps -f name=rancher
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0a12a18ca52c rancher/agent:v1.2.11 "/run.sh run" 21 hours ago Restarting (1) 54 seconds ago rancher-agent
在日志中我看到了这个:
•100% ➜ sudo docker container logs 0a12a18ca52c
time="2021-06-29T09:13:27Z" level=fatal msg="Failed to find container id:\n0::/\n"
time="2021-06-29T09:13:28Z" level=fatal msg="Failed to find container id:\n0::/\n"
time="2021-06-29T09:13:29Z" level=fatal msg="Failed to find container id:\n0::/\n"
time="2021-06-29T09:13:31Z" level=fatal msg="Failed to find container id:\n0::/\n"
time="2021-06-29T09:13:32Z" level=fatal msg="Failed to find container id:\n0::/\n"
time="2021-06-29T09:13:35Z" level=fatal msg="Failed to find container id:\n0::/\n"
time="2021-06-29T09:13:39Z" level=fatal msg="Failed to find container id:\n0::/\n"
我已尝试在网上搜索此内容,但没有发现任何感兴趣的内容。我试过重新创建容器。我尝试删除 /var/lib/rancher 中的所有内容并重新创建容器。我什至尝试在 Rancher 中删除我的环境,停止 docker,删除 docker 主机上的所有 docker 数据(data-root),再次删除与 rancher-agent 相关的文件并重新创建 rancher-agent。每次我重新创建 rancher-agent 时,我都会使用 Rancher GUI 在您想要添加新主机时为您提供的命令。我总是在日志中遇到同样的错误。
我在主机上安装了与主机上次连接到 Rancher 时相同版本的 docker。我在运行 Manjaro 的机器上使用 Rancher 1.6(无法更改)和 docker 20.10.6(也尝试过 20.10.7)。
【问题讨论】:
标签: linux docker rancher manjaro