首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >docker群部署错误:“池与此地址空间上的其他节点重叠”:通过traefik反向代理群集上的端口

docker群部署错误:“池与此地址空间上的其他节点重叠”:通过traefik反向代理群集上的端口
EN

Stack Overflow用户
提问于 2021-10-15 20:09:16
回答 1查看 940关注 0票数 0

不幸的是,我不知道:

  1. "which池“重叠
  2. ”与解决space"
  3. ...and:的“其他”的重叠“到底是什么重叠在这里”.因此,在执行正确的措施和modifications...

时,我确实遇到了一些问题

上下文:停靠群,运行在三个节点上(一个主节点,两个工作人员,本地分布的 Ubuntu机器,安装了对接和对接组合。)→移植程序现在将被添加,但是挂起这个错误(我已经删除了所有的东西,至少我认为是这样的--我离开了群集本身)并设置了新的(并且尝试了其他的映像。

  • traefik_proxy &它的仪表板正在运行--具有良好的功能让tls / certbot集成(在master-node)

上)

代码语言:javascript
复制
root@kube-master:~# docker stack ps portainer

  1. root@kube-master:~# 堆栈ps portainer (与portainer的第1部分)在运行和关闭

之间交替进行。

代码语言:javascript
复制
ID             NAME                                            IMAGE                          NODE           DESIRED STATE   CURRENT STATE           ERROR                              PORTS
q6c7jxswns8a   portainer_agent.cr7onfse17oeikdwaj4xbqfkk       portainer/agent:2.9.1          kube-worker2   Running         Running 17 hours ago                                       
fz1bnhcecpom    \_ portainer_agent.cr7onfse17oeikdwaj4xbqfkk   portainer/agent:2.9.1          kube-worker2   Shutdown        Shutdown 17 hours ago                                      
xu8pmcrg9ne4   portainer_agent.t270o40e5h6s2ah60smwt41x4       portainer/agent:2.9.1          kube-master    Running         Running 17 hours ago                                       
x2j7qpefwhtx    \_ portainer_agent.t270o40e5h6s2ah60smwt41x4   portainer/agent:2.9.1          kube-master    Shutdown        Shutdown 17 hours ago                                      
akgfyap2ft7w   portainer_agent.xj7crqbw6873mqteecdergqee       portainer/agent:2.9.1          kube-worker1   Running         Running 17 hours ago                                       
v2ik2btma450    \_ portainer_agent.xj7crqbw6873mqteecdergqee   portainer/agent:2.9.1          kube-worker1   Shutdown        Shutdown 17 hours ago 

代码语言:javascript
复制
2nd part of the root@kube-master:~# **docker stack ps portainer** then shows the "pool overlap error"


ijuafoa5336g   portainer_portainer.1                           portainer/portainer-ce:2.9.1   kube-master    Shutdown        Rejected 4 seconds ago    "Pool overlaps with other one …"   
3q6rrhj4rq5g    \_ portainer_portainer.1                       portainer/portainer-ce:2.9.1   kube-master    Shutdown        Rejected 10 seconds ago   "Pool overlaps with other one …"   
n5jvex2iq5jz    \_ portainer_portainer.1                       portainer/portainer-ce:2.9.1   kube-master    Shutdown        Rejected 13 seconds ago   "Pool overlaps with other one …"   
lwydktonmxvo    \_ portainer_portainer.1                       portainer/portainer-ce:2.9.1   kube-master    Shutdown        Rejected 16 seconds ago   "Pool overlaps with other one …"   

错误:“池与此地址空间上的其他地址重叠”

代码语言:javascript
复制
root@masterNode:~/swarmportainer# docker inspect ijuafoa5336g

[
    {
        "ID": "ijuafoa5336gk6rlvsvdjdohf",
        "Version": {
            "Index": 418878
        },
        "CreatedAt": "2021-10-15T14:22:59.352628943Z",
        "UpdatedAt": "2021-10-15T14:23:04.559430221Z",
        "Labels": {},
        "Spec": {
            "ContainerSpec": {
                "Image": "portainer/portainer-ce:2.9.1@sha256:76ff22486bcd3713631b5f317efcb69e707a122fe96ffcc0589cf2d3e8e6b890",
                "Labels": {
                    "com.docker.stack.namespace": "portainer"
                },
                "Args": [
                    "-H",
                    "tcp://tasks.agent:9001",
                    "--tlsskipverify"
                ],
                "Privileges": {
                    "CredentialSpec": null,
                    "SELinuxContext": null
                },
                "Mounts": [
                    {
                        "Type": "volume",
                        "Source": "portainer_portainer_data",
                        "Target": "/data",
                        "VolumeOptions": {
                            "Labels": {
                                "com.docker.stack.namespace": "portainer"
                            }
                        }
                    }
                ],
                "Isolation": "default"
            },
            "Resources": {},
            "RestartPolicy": {
                "Condition": "on-failure",
                "Delay": 5000000000,
                "MaxAttempts": 3
            },
            "Placement": {
                "Constraints": [
                    "node.role == manager"
                ],
                "Platforms": [
                    {
                        "Architecture": "amd64",
                        "OS": "linux"
                    },
                    {
                        "OS": "linux"
                    },
                    {
                        "Architecture": "arm64",
                        "OS": "linux"
                    },
                    {
                        "Architecture": "ppc64le",
                        "OS": "linux"
                    },
                    {
                        "Architecture": "s390x",
                        "OS": "linux"
                    },
                    {
                        "Architecture": "amd64",
                        "OS": "windows"
                    },
                    {
                        "Architecture": "amd64",
                        "OS": "windows"
                    },
                    {
                        "Architecture": "amd64",
                        "OS": "windows"
                    },
                    {
                        "Architecture": "amd64",
                        "OS": "windows"
                    }
                ]
            },
            "Networks": [
                {
                    "Target": "suyp5ojm8z36pjhfmg2ezgznn",
                    "Aliases": [
                        "portainer"
                    ]
                },
                {
                    "Target": "9tk88azb36vfqfkil7h0khacf",
                    "Aliases": [
                        "portainer"
                    ]
                }
            ],
            "ForceUpdate": 0
        },
        "ServiceID": "5lic71rrdduxamm3lzguds0qk",
        "Slot": 1,
        "NodeID": "t270o40e5h6s2ah60smwt41x4",
        "Status": {
            "Timestamp": "2021-10-15T14:23:00.561467279Z",
            "State": "rejected",
            "Message": "preparing",
            "Err": "Pool overlaps with other one on this address space",
            "ContainerStatus": {
                "ContainerID": "",
                "PID": 0,
                "ExitCode": 0
            },
            "PortStatus": {}
        },
        "DesiredState": "shutdown",
        "NetworksAttachments": [
            {
                "Network": {
                    "ID": "926lp9ngcgvnew4b6zxjvzwvn",
                    "Version": {
                        "Index": 416802
                    },
                    "CreatedAt": "2021-10-10T19:03:53.880298398Z",
                    "UpdatedAt": "2021-10-15T00:48:58.348694345Z",
                    "Spec": {
                        "Name": "ingress",
                        "Labels": {},
                        "DriverConfiguration": {
                            "Name": "overlay",
                            "Options": {
                                "encrypted": ""
                            }
                        },
                        "Ingress": true,
                        "IPAMOptions": {
                            "Driver": {
                                "Name": "default"
                            },
                            "Configs": [
                                {
                                    "Subnet": "172.17.0.1/16",
                                    "Gateway": "172.17.0.1"
                                }
                            ]
                        },
                        "Scope": "swarm"
                    },
                    "DriverState": {
                        "Name": "overlay",
                        "Options": {
                            "com.docker.network.driver.overlay.vxlanid_list": "4100",
                            "encrypted": ""
                        }
                    },
                    "IPAMOptions": {
                        "Driver": {
                            "Name": "default"
                        },
                        "Configs": [
                            {
                                "Subnet": "172.17.0.1/16",
                                "Gateway": "172.17.0.1"
                            }
                        ]
                    }
                },
                "Addresses": [
                    "172.17.1.66/16"
                ]
            },
            {
                "Network": {
                    "ID": "suyp5ojm8z36pjhfmg2ezgznn",
                    "Version": {
                        "Index": 418713
                    },
                    "CreatedAt": "2021-10-15T03:06:27.264974088Z",
                    "UpdatedAt": "2021-10-15T03:06:27.27167032Z",
                    "Spec": {
                        "Name": "portainer_cloud-proxy",
                        "Labels": {
                            "com.docker.stack.namespace": "portainer"
                        },
                        "DriverConfiguration": {
                            "Name": "overlay"
                        },
                        "Attachable": true,
                        "Scope": "swarm"
                    },
                    "DriverState": {
                        "Name": "overlay",
                        "Options": {
                            "com.docker.network.driver.overlay.vxlanid_list": "4103"
                        }
                    },
                    "IPAMOptions": {
                        "Driver": {
                            "Name": "default"
                        },
                        "Configs": [
                            {
                                "Subnet": "10.0.6.0/24",
                                "Gateway": "10.0.6.1"
                            }
                        ]
                    }
                },
                "Addresses": [
                    "10.0.6.20/24"
                ]
            },
            {
                "Network": {
                    "ID": "9tk88azb36vfqfkil7h0khacf",
                    "Version": {
                        "Index": 418837
                    },
                    "CreatedAt": "2021-10-15T12:57:32.860888933Z",
                    "UpdatedAt": "2021-10-15T12:57:32.862926323Z",
                    "Spec": {
                        "Name": "portainer_portainer_agent_network",
                        "Labels": {
                            "com.docker.stack.namespace": "portainer"
                        },
                        "DriverConfiguration": {
                            "Name": "overlay"
                        },
                        "Attachable": true,
                        "Scope": "swarm"
                    },
                    "DriverState": {
                        "Name": "overlay",
                        "Options": {
                            "com.docker.network.driver.overlay.vxlanid_list": "4107"
                        }
                    },
                    "IPAMOptions": {
                        "Driver": {
                            "Name": "default"
                        },
                        "Configs": [
                            {
                                "Subnet": "10.0.10.0/24",
                                "Gateway": "10.0.10.1"
                            }
                        ]
                    }
                },
                "Addresses": [
                    "10.0.10.9/24"
                ]
            }
        ]
    }
]

检查(=检查)带有错误的ServiceID:

代码语言:javascript
复制
root@kube-master:~/swarmportainer# docker inspect 5lic71rrdduxamm3lzguds0qk

[
    {
        "ID": "5lic71rrdduxamm3lzguds0qk",
        "Version": {
            "Index": 418849
        },
        "CreatedAt": "2021-10-15T02:41:06.984914145Z",
        "UpdatedAt": "2021-10-15T14:22:49.339347775Z",
        "Spec": {
            "Name": "portainer_portainer",
            "Labels": {
                "com.docker.stack.image": "portainer/portainer-ce:2.9.1",
                "com.docker.stack.namespace": "portainer",
                "traefik.enable": "true\"",
                "traefik.http.routers.portainer.entrypoints": "websecure",
                "traefik.http.routers.portainer.rule": "Host(`portainer.domain.com`)",
                "traefik.http.routers.portainer.service": "portainer_svc",
                "traefik.http.routers.portainer.tls.certresolver": "letsencrypt",
                "traefik.http.services.portainer_svc.loadbalancer.server.port": "9000"
            },
            "TaskTemplate": {
                "ContainerSpec": {
                    "Image": "portainer/portainer-ce:2.9.1@sha256:76ff22486bcd3713631b5f317efcb69e707a122fe96ffcc0589cf2d3e8e6b890",
                    "Labels": {
                        "com.docker.stack.namespace": "portainer"
                    },
                    "Args": [
                        "-H",
                        "tcp://tasks.agent:9001",
                        "--tlsskipverify"
                    ],
                    "Privileges": {
                        "CredentialSpec": null,
                        "SELinuxContext": null
                    },
                    "Mounts": [
                        {
                            "Type": "volume",
                            "Source": "portainer_portainer_data",
                            "Target": "/data",
                            "VolumeOptions": {
                                "Labels": {
                                    "com.docker.stack.namespace": "portainer"
                                }
                            }
                        }
                    ],
                    "StopGracePeriod": 10000000000,
                    "DNSConfig": {},
                    "Isolation": "default"
                },
                "Resources": {},
                "RestartPolicy": {
                    "Condition": "on-failure",
                    "Delay": 5000000000,
                    "MaxAttempts": 3
                },
                "Placement": {
                    "Constraints": [
                        "node.role == manager"
                    ],
                    "Platforms": [
                        {
                            "Architecture": "amd64",
                            "OS": "linux"
                        },
                        {
                            "OS": "linux"
                        },
                        {
                            "Architecture": "arm64",
                            "OS": "linux"
                        },
                        {
                            "Architecture": "ppc64le",
                            "OS": "linux"
                        },
                        {
                            "Architecture": "s390x",
                            "OS": "linux"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        }
                    ]
                },
                "Networks": [
                    {
                        "Target": "suyp5ojm8z36pjhfmg2ezgznn",
                        "Aliases": [
                            "portainer"
                        ]
                    },
                    {
                        "Target": "9tk88azb36vfqfkil7h0khacf",
                        "Aliases": [
                            "portainer"
                        ]
                    }
                ],
                "ForceUpdate": 0,
                "Runtime": "container"
            },
            "Mode": {
                "Replicated": {
                    "Replicas": 1
                }
            },
            "UpdateConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "RollbackConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "EndpointSpec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 8000,
                        "PublishedPort": 8000,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 9000,
                        "PublishedPort": 9000,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 9443,
                        "PublishedPort": 9443,
                        "PublishMode": "ingress"
                    }
                ]
            }
        },
        "PreviousSpec": {
            "Name": "portainer_portainer",
            "Labels": {
                "com.docker.stack.image": "portainer/portainer-ce:2.9.1",
                "com.docker.stack.namespace": "portainer",
                "traefik.enable": "true\"",
                "traefik.http.routers.portainer.entrypoints": "websecure",
                "traefik.http.routers.portainer.rule": "Host(`portainer.domain.com`)",
                "traefik.http.routers.portainer.tls.certresolver": "letsencrypt",
                "traefik.http.services.portainer.loadbalancer.server.port": "9000"
            },
            "TaskTemplate": {
                "ContainerSpec": {
                    "Image": "portainer/portainer-ce:2.9.1@sha256:76ff22486bcd3713631b5f317efcb69e707a122fe96ffcc0589cf2d3e8e6b890",
                    "Labels": {
                        "com.docker.stack.namespace": "portainer"
                    },
                    "Args": [
                        "-H",
                        "tcp://tasks.agent:9001",
                        "--tlsskipverify"
                    ],
                    "Privileges": {
                        "CredentialSpec": null,
                        "SELinuxContext": null
                    },
                    "Mounts": [
                        {
                            "Type": "volume",
                            "Source": "portainer_portainer_data",
                            "Target": "/data",
                            "VolumeOptions": {
                                "Labels": {
                                    "com.docker.stack.namespace": "portainer"
                                }
                            }
                        }
                    ],
                    "Isolation": "default"
                },
                "Resources": {},
                "RestartPolicy": {
                    "Condition": "on-failure",
                    "Delay": 5000000000,
                    "MaxAttempts": 3
                },
                "Placement": {
                    "Constraints": [
                        "node.role == manager",
                        "node.labels.cloud-public.traefik-certificates == true"
                    ],
                    "Platforms": [
                        {
                            "Architecture": "amd64",
                            "OS": "linux"
                        },
                        {
                            "OS": "linux"
                        },
                        {
                            "Architecture": "arm64",
                            "OS": "linux"
                        },
                        {
                            "Architecture": "ppc64le",
                            "OS": "linux"
                        },
                        {
                            "Architecture": "s390x",
                            "OS": "linux"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        },
                        {
                            "Architecture": "amd64",
                            "OS": "windows"
                        }
                    ]
                },
                "Networks": [
                    {
                        "Target": "mtusklowmyx7z2cd75pobuyub",
                        "Aliases": [
                            "portainer"
                        ]
                    }
                ],
                "ForceUpdate": 0,
                "Runtime": "container"
            },
            "Mode": {
                "Replicated": {
                    "Replicas": 1
                }
            },
            "EndpointSpec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 8000,
                        "PublishedPort": 8000,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 9000,
                        "PublishedPort": 9000,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 9443,
                        "PublishedPort": 9443,
                        "PublishMode": "ingress"
                    }
                ]
            }
        },
        "Endpoint": {
            "Spec": {
                "Mode": "vip",
                "Ports": [
                    {
                        "Protocol": "tcp",
                        "TargetPort": 8000,
                        "PublishedPort": 8000,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 9000,
                        "PublishedPort": 9000,
                        "PublishMode": "ingress"
                    },
                    {
                        "Protocol": "tcp",
                        "TargetPort": 9443,
                        "PublishedPort": 9443,
                        "PublishMode": "ingress"
                    }
                ]
            },
            "Ports": [
                {
                    "Protocol": "tcp",
                    "TargetPort": 8000,
                    "PublishedPort": 8000,
                    "PublishMode": "ingress"
                },
                {
                    "Protocol": "tcp",
                    "TargetPort": 9000,
                    "PublishedPort": 9000,
                    "PublishMode": "ingress"
                },
                {
                    "Protocol": "tcp",
                    "TargetPort": 9443,
                    "PublishedPort": 9443,
                    "PublishMode": "ingress"
                }
            ],
            "VirtualIPs": [
                {
                    "NetworkID": "926lp9ngcgvnew4b6zxjvzwvn",
                    "Addr": "172.17.0.5/16"
                },
                {
                    "NetworkID": "suyp5ojm8z36pjhfmg2ezgznn",
                    "Addr": "10.0.6.16/24"
                },
                {
                    "NetworkID": "9tk88azb36vfqfkil7h0khacf",
                    "Addr": "10.0.10.2/24"
                }
            ]
        },
        "UpdateStatus": {
            "State": "paused",
            "StartedAt": "2021-10-15T14:22:49.079195959Z",
            "Message": "update paused due to failure or early termination of task lwydktonmxvolxqs0h4oi2yzb"
        }
    }
]

..。我不确定,如果我是从正确的角度来看的话--只要给我一句话,我真的很感激在这里得到一些帮助和建议。

EN

回答 1

Stack Overflow用户

发布于 2021-10-18 22:22:51

这不是如何解决这个错误的答案,,而是“我的解决方案”--我/其他人在群运行中获得traefik中的门户程序的方式:

通过以下方式部署到现有的-traefik堆栈:

代码语言:javascript
复制
docker stack deploy -c portainer_traefik-proxy.yml your-traefik-stack

提示: docker堆栈ls→检查可用的群集堆栈

下面是portainer_traefik-proxy.yml文件:

代码语言:javascript
复制
version: "3.8"

services:


  agent:
    image: portainer/agent

    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/docker/volumes:/var/lib/docker/volumes
    networks:
      - cloud-edge
    deploy:
      mode: global
      placement:
        constraints:
          - node.role == manager

  portainer:
    image: portainer/portainer-ce:latest
    command: -H tcp://tasks.agent:9001 --tlsskipverify
    volumes:
      - portainer_data:/data
    networks:
      - cloud-edge
      - cloud-public

    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]
      labels:
      - traefik.enable=true
      - traefik.http.middlewares.portainer-redirect-websecure.redirectscheme.scheme=https

      - traefik.http.routers.portainer-web.middlewares=portainer-redirect-websecure
      - traefik.http.routers.portainer-web.rule=Host(`subdomain.domain.xyz`) # <-- set your subdomain.domain.toplevel
      - traefik.http.routers.portainer-web.entrypoints=web
      - traefik.http.routers.portainer-websecure.rule=Host(`subdomain.domain.xyz`) # <-- set your subdomain.domain.toplevel
 
      - traefik.http.routers.whoami.tls=true             
      - traefik.http.routers.portainer-web.tls.certresolver=letsencrypt
      - traefik.http.routers.portainer-web.tls=true
      - traefik.http.routers.portainer-web.entrypoints=websecure
      - traefik.http.services.portainer-websecure.loadbalancer.server.port=9000


networks:
  cloud-public:
    external: true
  cloud-edge:
    external: true

volumes:
   portainer_data:

一些注意事项:

  1. 确保您的traefik设置的命名!(有时不是"web“,而是"HTTP”和用于解析器或不同加密的其他名称.)
  2. 必须在群集范围之前/使用群集范围创建这些覆盖网络,例如:

代码语言:javascript
复制
docker network create --subnet 10.11.0.0/16 --driver overlay \
  --scope swarm --opt encrypted --attachable cloud-edge    


 docker network create --subnet 10.12.0.0/16 --driver overlay \
  --scope swarm --opt encrypted --attachable cloud-public

  1. 也许,卷应该设置为NFS准备的目录.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69590098

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档