Running Jenkins in Docker and using docker-plugin for create slaves
See original GitHub issueI’m running Jenkins on Docker, and i’m trying to use docker plugin to create slaves containers at the same host as jenkins master.
Since the docker plugin i can connect to the cloud using unix:///var/run/docker.sock as Docker url, when i hit in “Test connection” button, connects correctly.
The problem is when i try to run a job, the slave is created but jenkins says “All nodes labeled ‘jenkins_slave’ are offline”, this are logs error from the slave:
[10/28/16 10:36:27] [SSH] Opening SSH connection to 0.0.0.0:32936.
Connection refused
SSH Connection failed with IOException: "Connection refused".
java.io.IOException: There was a problem while connecting to 0.0.0.0:32936
at com.trilead.ssh2.Connection.connect(Connection.java:818)
at com.trilead.ssh2.Connection.connect(Connection.java:687)
at com.trilead.ssh2.Connection.connect(Connection.java:587)
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1185)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:711)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:706)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:354)
at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:467)
at com.trilead.ssh2.Connection.connect(Connection.java:758)
... 9 more
[10/28/16 10:36:27] Launch failed - cleaning up connection
[10/28/16 10:36:27] [SSH] Connection closed
My docker version is:
Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 18:29:41 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 18:29:41 2016
OS/Arch: linux/amd64
Thanks in advance for any help, i had spent more than 3 day trying to solve this.
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Using Docker Containers as Jenkins Build Slaves - Medium
Let us implement this! · 1. Head over to Jenkins Dashboard –> Manage Jenkins –> Manage Plugins. · 2. Under the Available tab,...
Read more >How To Setup Docker Containers As Build Agents For Jenkins
In this guide, I will walk you through the steps for configuring docker containers as build agents/slaves for Jenkins using the Jenkins Docker...
Read more >Docker : Jenkins Master and Slave - 2021 - BogoToBogo
We'll define Docker images that Jenkins can use agents (in this post, we'll use the Docker images for master and slaves). In other...
Read more >Running Jenkins Build Slaves in A Docker Container - DZone
First, give a name to the label field; this is the same name that we will use in a job to run the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

any update on this? I’m also facing the same issue. @Modomu did you get a solution?
@jaydp17 @njtman I have the same setup as described here and had the same issue, but setting the ‘Docker Hostname’ value in the Cloud settings (under Advanced) resolved it for me.