【问题标题】:Docker Swarm agent - invalid mount config for typeDocker Swarm 代理 - 类型的挂载配置无效
【发布时间】:2021-12-25 19:26:17
【问题描述】:

在我们的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>

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 的新手,如果有人帮助我解决这个问题,我真的很感激。

【问题讨论】:

    标签: docker docker-swarm ubuntu-20.04 docker-swarm-mode


    【解决方案1】:

    问题在于svr-3 服务器卷/data/m64/,缺少符号链接。已创建符号链接并解决了问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-01
      • 2022-06-20
      • 2018-05-20
      • 1970-01-01
      • 2018-05-27
      • 1970-01-01
      相关资源
      最近更新 更多