docker swarm deploy 错误: "Pool overlaps with other one on this address space" :: 通过 traefik 反向代理在 swa



遗憾的是,我无法理解:

  1. "pool"
  2. withwhich "other ">
  3. … …所以,我在执行正确的措施和修改方面确实有一些问题……

背景:docker集群,运行在三个节点上(一个主节点,两个工作节点,本地分布的VPS Ubuntu机器与docker &安装Docker-compose。)→portainer现在应该添加,但挂在这个错误(我已经删除了所有东西,至少我认为是这样的-我离开了蜂群本身),并设置了新的(并尝试了其他图像。

  • traefik_proxy,它的仪表板正在运行-具有良好的功能letsencrypt tls/certbot集成(在主节点上)

root@kube-master:~# docker stack ps portainer
  1. root@kube-master:~#docker stack ps portainer(1.在RUNNING和SHUTDOWN
  2. 之间切换。
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 

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 …"   

错误:"地址空间与其他地址池重叠">


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的错误:

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"
}
}
]

…我不确定,如果我从正确的角度发现它-请给我写信,我真的很感激得到一些帮助& &;思想在这里

这不是如何解决这个错误的答案,而是"我的解决方案";我/其他人在群跑中获得portainer的方式:

部署到你现有的your- trafik -stack:

docker stack deploy -c portainer_traefik-proxy.yml your-traefik-stack

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

下面:portainer_traefik-proxy。yml文件:

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设置的命名!(有时不"网络";但"HTTP"和其他名称的解析器或不同的加密…)
  2. 必须在之前/用群体范围创建这些覆盖网络,如:
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准备的目录…

最新更新