portainer: Log errors in 2.18.1: "unable to inspect container in other Swarm node"

Bug description

After upgrading to 2.18.1 (BE) in a Docker Swarm setup, there are repeated errors in the log file

Expected behavior

I expect no errors to appear in the log

Portainer Logs

Plenty of lines like this, repeated every 5 minutes for lots of containers:

2023/04/18 05:57AM INF github.com/portainer/portainer-ee/api/docker/snapshot.go:180 > unable to inspect container in other Swarm nodes | error="Error: No such container: b8da103009877de2666eaaf8aad2b2e4d4bc44f7808958065fdc49b619237d37" container=b8da103009877de2666eaaf8aad2b2e4d4bc44f7808958065fdc49b619237d37 

Technical details:

  • Portainer version: 2.18.1
  • Docker version (managed by Portainer): Docker version 23.0.4, build f480fb1, Docker Swarm
  • Kubernetes version (managed by Portainer): none
  • Platform (windows/linux): Linux (Ubuntu 20.04.6 LTS)
  • Command used to start Portainer : docker stack deploy --compose-file=traefik-portainer-stack.yml
  • Browser: irrelevant
  • Use Case: Using Portainer in a Commercial setup
  • Have you reviewed our technical documentation and knowledge base? Yes

My traefik-portainer-stack.yml:

agent:
  image: portainer/agent:2.18.1-alpine
  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-ee:2.18.1-alpine
  command: -H tcp://tasks.agent:9001 --tlsskipverify --http-enabled
  ports:
    - "9000:9000"
    - "8000:8000"
  volumes:
    - /volumes/portainer:/data
  networks:
    - traefik-public
    - agent-network
  deploy:
    mode: replicated
    replicas: 1
    placement:
      constraints:
        - node.role == manager
    labels:
      - traefik.enable=true
      - traefik.http.routers.portainer-websecure.rule=Host(`portainer.mydomain.com`)
      - traefik.http.routers.portainer-websecure.tls=true
      - traefik.http.routers.portainer-websecure.tls.certResolver=le
      - traefik.http.routers.portainer-websecure.entryPoints=websecure
      - traefik.http.routers.portainer-websecure.middlewares=secHeaders@file
      - traefik.http.services.portainer-websecure.loadBalancer.server.port=9000

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 11
  • Comments: 24 (2 by maintainers)

Most upvoted comments

Update:

The aforementioned logging will be resolved in the next major release.

Thanks!

Update:

The aforementioned logging will be resolved in the next major release.

Thanks!

@tamarahenson The bug is still present in 2.19. What version is the “next major release”?

After upgrading from CE 2.16.2 to 2.19.4, this issue appears

Same here 2.18.4 (CE)

problem is still with 2.18.3

Problem is still with 2.18.3

I have the same issue.

Portainer-ce v2.19.5. Debian 11 Docker 24.0.6

5 swarm nodes (3 manager + 2 worker) Portainer server running on a manager. Portainer agent running in ‘global’ deploy mode. I have 11 services distributed across the swarm. I have approximately 23 containers running on the swarm at any given time.

Every five minutes, Portainer server spits out (roughly) 20 log items with the error. The log items are identical, except for the container ID. Since this morning, Portainer has logged this error 3515 times.

The container IDs in the logs are not the IDs of my deployed service containers, and they are different in every single log item, meaning that a container ID in this error never shows up more than once. Every time this error occurs, it references a different (and unique) container ID.

“Unfortunately” I have this issue as well. Rather unsure if it affects anything but it is annoying having it spammed in logs for no apparent reason.

Portainer BE 2.19.4 Docker version 24.0.7, build afdd53b Docker Swarm on three machines. Agent on all three +Portainer on one. Fresh setup, no firewalls, same vlan, no custom configurations for Docker nor Portainer, using regular stacks.

Problem is still with 2.18.3

Just migrated to Portainer 2.18.2 today and started seeing those messages as well. Using with Docker Swarm clusters.