Jenkins Docker Agent Configuration Issue: Connection Refused on Local Ubuntu Install

21 views Asked by At

I'm setting up Jenkins agents as part of my learning process from a YouTube tutorial, where Jenkins itself is run as a Docker image. However, in my setup, Jenkins is installed directly on an Ubuntu machine, not in a Docker container.

When attempting to configure a new Docker-based cloud agent in Jenkins, I'm facing a connection issue. I input http://127.0.0.1:2375 as the Docker Host URI, following the tutorial steps, but I receive the following error:

org.apache.hc.client5.http.HttpHostConnectException: Connect to http://127.0.0.1:2375 [/127.0.0.1] failed: Connection refused as shown in attached image. Host URI Image

This is the link of tutorial where docker agent is set up.

I have tried to add tcp port in /etc/default/docker but that didn't work. Following is the content of /etc/default/docker:

DOCKER_OPTS="-H tcp://127.0.0.1:2375"

Can someone please help me setting up cloud docker agent?

0

There are 0 answers