M. Stefanczuk
M. Stefanczuk

Reputation: 356

Jenkins: connection between docker container with jenkins master and docker container with jenkins slave

I run docker container with Jenkins master. I run docker container with Jenkins slave (slave image) and exposed port 8082:8080.

I created docker network to make containers see each other and it works (ping works).

I installed Docker Plugin on Jenkins master. I checked IP address of the slave container and tried to use it in the master's configuration, but master cannot connect to slave: jenkins error

I think I'm doing something wrong. Any ideas what else should I do?

Upvotes: 1

Views: 1852

Answers (3)

vijay
vijay

Reputation: 791

First check your docker daemon listening on your DockerURL and then try Testconnection

sudo dockerd

check API listening on

or provide your certs path to credential section.

certs path usually will be %userprofile%/.docker

Upvotes: 1

M. Stefanczuk
M. Stefanczuk

Reputation: 356

I solved my problem.

Here is nice tutorial about setting up master in docker container and slaves aslo in docker containers. It doesn't use Docker Plugin.

Upvotes: 0

ANIL
ANIL

Reputation: 2682

It is throwing HttpHostConnectException because you are using tcp in the Docker URL field. Use http. Check the configuration document here.

Upvotes: 1

Related Questions