Why I can't expose portainer agent port 9001?












0















I'm trying to expose portainer agent port 9001 on a swarm cluster in order to reach it from an external portainer, it is deployed in 'global' mode.



Following docker-compose file works :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Then, when I try to expose port 9001, stack starts but there are log errors and portainer fails to connect these agents :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
ports:
- "9001:9001"
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Event with another port :



ports:
- "19001:9001"


And even with a port that has nothing to do :



ports:
- "12345:54321"


EDIT



Logs from stack :




portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted



When I replace :



ports:
- "9001:9001"


With :



- target: 9001
published: 9001
protocol: tcp
mode: host


It works, why host mode solves this problem ?










share|improve this question

























  • how do you make the connection?

    – Siyu
    Nov 24 '18 at 9:08











  • can you please show the full file after the port addition ? does it give you any error message? how does the docker ps looks like after it?

    – eran meiri
    Nov 24 '18 at 9:31











  • full file added

    – Nelson G.
    Nov 24 '18 at 10:24











  • Hi @NelsonG. What do you mean by "It does not work?" Are you unable to deploy the agent? Are you unable to connect it via Portainer? You can find a stack deployment example at portainer.readthedocs.io/en/stable/…

    – Tony
    Nov 24 '18 at 20:24











  • I updated my post with logs. Solution provided by portainer.readthedocs.io/en/stable/… works (mode: host), however I don't understand why ?

    – Nelson G.
    Nov 26 '18 at 5:31
















0















I'm trying to expose portainer agent port 9001 on a swarm cluster in order to reach it from an external portainer, it is deployed in 'global' mode.



Following docker-compose file works :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Then, when I try to expose port 9001, stack starts but there are log errors and portainer fails to connect these agents :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
ports:
- "9001:9001"
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Event with another port :



ports:
- "19001:9001"


And even with a port that has nothing to do :



ports:
- "12345:54321"


EDIT



Logs from stack :




portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted



When I replace :



ports:
- "9001:9001"


With :



- target: 9001
published: 9001
protocol: tcp
mode: host


It works, why host mode solves this problem ?










share|improve this question

























  • how do you make the connection?

    – Siyu
    Nov 24 '18 at 9:08











  • can you please show the full file after the port addition ? does it give you any error message? how does the docker ps looks like after it?

    – eran meiri
    Nov 24 '18 at 9:31











  • full file added

    – Nelson G.
    Nov 24 '18 at 10:24











  • Hi @NelsonG. What do you mean by "It does not work?" Are you unable to deploy the agent? Are you unable to connect it via Portainer? You can find a stack deployment example at portainer.readthedocs.io/en/stable/…

    – Tony
    Nov 24 '18 at 20:24











  • I updated my post with logs. Solution provided by portainer.readthedocs.io/en/stable/… works (mode: host), however I don't understand why ?

    – Nelson G.
    Nov 26 '18 at 5:31














0












0








0








I'm trying to expose portainer agent port 9001 on a swarm cluster in order to reach it from an external portainer, it is deployed in 'global' mode.



Following docker-compose file works :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Then, when I try to expose port 9001, stack starts but there are log errors and portainer fails to connect these agents :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
ports:
- "9001:9001"
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Event with another port :



ports:
- "19001:9001"


And even with a port that has nothing to do :



ports:
- "12345:54321"


EDIT



Logs from stack :




portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted



When I replace :



ports:
- "9001:9001"


With :



- target: 9001
published: 9001
protocol: tcp
mode: host


It works, why host mode solves this problem ?










share|improve this question
















I'm trying to expose portainer agent port 9001 on a swarm cluster in order to reach it from an external portainer, it is deployed in 'global' mode.



Following docker-compose file works :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Then, when I try to expose port 9001, stack starts but there are log errors and portainer fails to connect these agents :



version: "3.2"
services:
agent:
image: "portainer/agent:1.1.2"
environment:
AGENT_CLUSTER_ADDR: tasks.agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
ports:
- "9001:9001"
networks:
- priv_portainer
deploy:
mode: global

networks:
priv_portainer:
driver: overlay


Event with another port :



ports:
- "19001:9001"


And even with a port that has nothing to do :



ports:
- "12345:54321"


EDIT



Logs from stack :




portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted
portainer_agent_agent.0.13cjb851d9me@ignochtulelk02d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.985h7xcfkux0@ignopotulelk03d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.11:7946: write udp [::]:7946->10.255.0.11:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: c6c277e3f60b 10.255.0.11
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] serf: EventMemberJoin: b6040a1ccc2a 10.255.0.13
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:50 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [INFO] serf: EventMemberJoin: 3e290151a5eb 10.255.0.12
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.13:7946: write udp [::]:7946->10.255.0.13:7946: sendto: operation not permitted
portainer_agent_agent.0.mljirysir6px@ignopotulelk01d | 2018/11/26 05:28:51 [ERR] memberlist: Failed to send gossip to 10.255.0.12:7946: write udp [::]:7946->10.255.0.12:7946: sendto: operation not permitted



When I replace :



ports:
- "9001:9001"


With :



- target: 9001
published: 9001
protocol: tcp
mode: host


It works, why host mode solves this problem ?







docker docker-compose docker-swarm portainer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '18 at 12:09







Nelson G.

















asked Nov 24 '18 at 8:47









Nelson G.Nelson G.

2,6262538




2,6262538













  • how do you make the connection?

    – Siyu
    Nov 24 '18 at 9:08











  • can you please show the full file after the port addition ? does it give you any error message? how does the docker ps looks like after it?

    – eran meiri
    Nov 24 '18 at 9:31











  • full file added

    – Nelson G.
    Nov 24 '18 at 10:24











  • Hi @NelsonG. What do you mean by "It does not work?" Are you unable to deploy the agent? Are you unable to connect it via Portainer? You can find a stack deployment example at portainer.readthedocs.io/en/stable/…

    – Tony
    Nov 24 '18 at 20:24











  • I updated my post with logs. Solution provided by portainer.readthedocs.io/en/stable/… works (mode: host), however I don't understand why ?

    – Nelson G.
    Nov 26 '18 at 5:31



















  • how do you make the connection?

    – Siyu
    Nov 24 '18 at 9:08











  • can you please show the full file after the port addition ? does it give you any error message? how does the docker ps looks like after it?

    – eran meiri
    Nov 24 '18 at 9:31











  • full file added

    – Nelson G.
    Nov 24 '18 at 10:24











  • Hi @NelsonG. What do you mean by "It does not work?" Are you unable to deploy the agent? Are you unable to connect it via Portainer? You can find a stack deployment example at portainer.readthedocs.io/en/stable/…

    – Tony
    Nov 24 '18 at 20:24











  • I updated my post with logs. Solution provided by portainer.readthedocs.io/en/stable/… works (mode: host), however I don't understand why ?

    – Nelson G.
    Nov 26 '18 at 5:31

















how do you make the connection?

– Siyu
Nov 24 '18 at 9:08





how do you make the connection?

– Siyu
Nov 24 '18 at 9:08













can you please show the full file after the port addition ? does it give you any error message? how does the docker ps looks like after it?

– eran meiri
Nov 24 '18 at 9:31





can you please show the full file after the port addition ? does it give you any error message? how does the docker ps looks like after it?

– eran meiri
Nov 24 '18 at 9:31













full file added

– Nelson G.
Nov 24 '18 at 10:24





full file added

– Nelson G.
Nov 24 '18 at 10:24













Hi @NelsonG. What do you mean by "It does not work?" Are you unable to deploy the agent? Are you unable to connect it via Portainer? You can find a stack deployment example at portainer.readthedocs.io/en/stable/…

– Tony
Nov 24 '18 at 20:24





Hi @NelsonG. What do you mean by "It does not work?" Are you unable to deploy the agent? Are you unable to connect it via Portainer? You can find a stack deployment example at portainer.readthedocs.io/en/stable/…

– Tony
Nov 24 '18 at 20:24













I updated my post with logs. Solution provided by portainer.readthedocs.io/en/stable/… works (mode: host), however I don't understand why ?

– Nelson G.
Nov 26 '18 at 5:31





I updated my post with logs. Solution provided by portainer.readthedocs.io/en/stable/… works (mode: host), however I don't understand why ?

– Nelson G.
Nov 26 '18 at 5:31












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53456600%2fwhy-i-cant-expose-portainer-agent-port-9001%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53456600%2fwhy-i-cant-expose-portainer-agent-port-9001%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'