[英]docker swarm deploy ERROR: "Pool overlaps with other one on this address space" :: portainer on swarm via traefik reverse proxy
Context: docker swarm, running on three nodes (one master, two workers, locally distributed VPS Ubuntu machines with docker & docker-compose installed. ) → portainer shall now be added, but hangs with this error (I did already remove everything at least I think so - I left the swarm itself as it was) and did set it up new (and did try out other images.上下文: docker swarm,在三个节点上运行(一个主节点,两个工作节点,安装了 docker 和 docker-compose 的本地分布式 VPS Ubuntu 机器。)→ 现在应该添加 portainer,但是由于这个错误而挂起(我至少已经删除了所有内容我认为是这样 - 我保留了 swarm 本身的原样)并重新设置了它(并尝试了其他图像。
root@kube-master:~# docker stack ps portainer
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"
]
}
]
}
]
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"
}
}
]
... I am not sure, if I am spotting it from the right perspective - just drop me a line, I'd really appreciate receiving some help & ideas here ...我不确定,如果我从正确的角度发现它 - 给我留言,我真的很感激在这里得到一些帮助和想法
This is not the answer for how to solve this error, but "my solution" the way I/ others can get the portainer in traefik on swarm running:这不是如何解决此错误的答案,而是“我的解决方案”,即我/其他人可以在 traefik 中在 swarm 运行时获取 portainer 的方式:
deploy to your existing your-traefik-stack via:通过以下方式部署到您现有的 your-traefik-stack:
docker stack deploy -c portainer_traefik-proxy.yml your-traefik-stack
hint: docker stack ls → check your available Swarm stacks提示:docker stack ls → 检查可用的 Swarm 堆栈
below: portainer_traefik-proxy.yml file:下面: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:
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.