Resolving Harness Delegate Connectivity Issues After VM Resume

AshAsh
1 min read

I recently installed five Harness delegates on an Ubuntu desktop VM for testing. Initially, all delegates showed as online in the Harness portal.

When I suspended the VM for later use and resumed it after some time, the delegates didn't come back online in the portal.

I checked the container status using 'docker ps -a' and found all containers were in the "Up" state, but the delegates still remained offline on the Harness portal. The solution involved two steps:

  1. Restart the Docker service:

     sudo systemctl restart docker
    
  2. After Docker service restart, start all containers (which were stopped as a result of the Docker restart):

     docker start $(docker ps -aq)
    

We use '-aq' here to return only the container IDs needed for the start action. If you need to use sudo for Docker commands, the command would be:

sudo docker start $(sudo docker ps -aq)

After restarting the Docker service and starting all containers, the delegates came back online in the Harness portal.

0
Subscribe to my newsletter

Read articles from Ash directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ash
Ash