portainer: Cannot see worker containers

Bug description Containers menu doesn’t show me containers of any worker

Expected behavior See both manager and workers containers

Technical details:

  • Portainer version: 1.19.1
  • Docker version (managed by Portainer): 17.03.2-ce
  • Platform (windows/linux): linux

I used this compose file to start all:

version: '3.1'

services:
  agent:
    image: portainer/agent
    ports:
      - "9001:9001"
    environment:
      # REQUIRED: Should be equal to the service name prefixed by "tasks." when
      # deployed inside an overlay network
      AGENT_CLUSTER_ADDR: tasks.agent
      # AGENT_PORT: 9001
      # LOG_LEVEL: debug
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/docker/volumes:/var/lib/docker/volumes
    networks:
      - agent_network
    deploy:
      mode: global
      placement:
        constraints: [node.platform.os == linux]

  portainer:
    image: portainer/portainer
    command: -H tcp://tasks.agent:9001 --tlsskipverify
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/docker/volumes:/var/lib/docker/volumes
      - portainer_data:/data
    networks:
      - agent_network
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.role == manager]

networks:
  agent_network:
    driver: overlay

volumes:
  portainer_data:

I have a Ec2 machine with the manager node (and portainer) + a arm64 board as worker. I don’t know if it’s right, but the agent log doesn’t have so much content:

2018/08/09 16:50:05 [INFO] serf: EventMemberJoin: b8efe8777891 10.255.0.7
2018/08/09 16:50:05 [INFO] - Starting Portainer agent version 1.1.2 on 0.0.0.0:9001 (cluster mode: true)

I tried also to start a new service on the worker node from portainer, I see it running with tasks inside but no containers in list.

I can confirm that with command docker node ps WORKER_NAME I see all containers running.

EDIT: I re-created all with instructions here: http://portainer.readthedocs.io/en/stable/agent.html#connecting-an-existing-portainer-instance-to-an-agent

Now I see new things like hosts column in containers view and actions in services view but:

  • I still don’t see worker containers
  • actions in services view don’t work for tasks on worker node (there are icons but I cannot press them)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 19 (8 by maintainers)

Most upvoted comments

I got this problem, after opening those ports, everything works fine.

sudo ufw allow 2376/tcp && sudo ufw allow 7946/udp && sudo ufw allow 7946/tcp && sudo ufw allow 2377/tcp && sudo ufw allow 4789/udp

I fixed by install containerd.io

 sudo yum install docker-ce docker-ce-cli containerd.io

here or maybe kernel version docker swarm not support kernel 5+ https://github.com/portainer/portainer/issues/5912#issue-1027938352

Hey @Leen15

Use the following instructions: http://portainer.readthedocs.io/en/stable/deployment.html#inside-a-swarm-cluster

There’s no way to execute any shell inside the agent image as it’s based on scratch, you could use a custom image if needed.