Docker Swarm 代理 - 类型的挂载配置无效

Docker Swarm agent - invalid mount config for type

在我们的一个 docker swarm agent 服务器上 docker ps -a 没有显示任何 运行 容器列表。来自 docker service status 看到以下消息。

$ sudo systemctl status docker.service
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-11-13 17:04:36 IST; 15h ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 4834 (dockerd)
      Tasks: 74
     Memory: 119.0M
     CGroup: /system.slice/docker.service
             └─4834 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Nov 14 08:27:06 svr-3 dockerd[4834]: time="2021-11-14T08:27:06.848315565+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:07 svr-3 dockerd[4834]: time="2021-11-14T08:27:07.253824118+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:11 svr-3 dockerd[4834]: time="2021-11-14T08:27:11.841725172+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:12 svr-3 dockerd[4834]: time="2021-11-14T08:27:12.261848748+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:16 svr-3 dockerd[4834]: time="2021-11-14T08:27:16.842731139+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:17 svr-3 dockerd[4834]: time="2021-11-14T08:27:17.256307583+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:21 svr-3 dockerd[4834]: time="2021-11-14T08:27:21.855252126+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:22 svr-3 dockerd[4834]: time="2021-11-14T08:27:22.256813458+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:26 svr-3 dockerd[4834]: time="2021-11-14T08:27:26.844842718+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>
Nov 14 08:27:27 svr-3 dockerd[4834]: time="2021-11-14T08:27:27.265032144+05:30" level=error msg="fatal task error" error="invalid mount config for type \"b>

On Docker Swarm Manager 主机节点状态显示为 readyactive

$ docker node ls
ID                            HOSTNAME   STATUS    AVAILABILITY   MANAGER STATUS   ENGINE VERSION
mmbxdeerfwperedsbj6l8zr71f *   svr-1     Ready     Active         Leader           20.10.7
kzc7jf7irsereed3kurcwqjb2j     svr-2     Ready     Active                          20.10.7
ew0edluvz39aregd87ld0wnv2e     svr-3     Ready     Active                          18.06.1-ce

svr-3 主机上一切正常。我已尝试使用以下服务来解决 svr-2,很遗憾无法帮助我。

sudo systemctl daemon-reload 
sudo systemctl enable docker 
sudo systemctl start docker

Leader主机挂载部分如下

docker inspect m64

"Mounts": [
                        {
                            "Type": "bind",
                            "Source": "/data/m64/",
                            "Target": "/root/.m64/"
                        },

我是 docker swarm 的新手,如果有人帮助我解决这个问题,我将不胜感激。

问题出在 svr-3 服务器卷 /data/m64/,符号 link 丢失。已创建符号 link 并解决了问题。