Portainer server unable to connect with any Portainer agents

319 Views Asked by At

I am running Portainer CE on a server that is supposed to be connecting with agents on other servers. The Portainer server and all agents are running in docker containers.

I was able to manage docker containers and stacks with no problems before, but now suddenly I cannot manage any docker containers through agents.

The agents on the various machines are run using docker-compose. The agent YML file is shown below:

version: "3"

services:
  portainer_agent:
    image: portainer/agent:latest
    container_name: portainer_agent
    restart: unless-stopped
    ports:
      - 9001:9001
    volumes:
        - ./var/lib/docker/volumes:/var/lib/docker/volumes
        - /var/run/docker.sock:/var/run/docker.sock

On the Portainer web app's "Environments" page, all the servers are showing docker as being "down". This is occurring despite the fact that if I ssh into the servers and do a "docker ps", I see the containers that I installed on the server!

I attempt to connect to my servers using the "Live Connect" button, but after several minutes I get Error messages saying that the "Environment is unreachable".

I am running my agents on the default port 9001. The port 90-01 is open. and I aam getting no adverse log entries on the agents. The Portainer server for some reason is simply failing to communicate with the agents.

The server and the agents are running Version 2.19.4.

Has anyone else seen this problem??? Can someone provide some information on why Portainer is failing to connect with agents and (more importantly) how to fix this problem?

0

There are 0 best solutions below