Re: Docker-plugin - ssh connection refused when connecting to slave

2018-01-18 Thread Alejandro Villarreal
@Martin / @Nicolas, have you ever seen that after failing to connect to a 
sibling container (due to a missing "Docker Hostname"), and stopping that 
container (from the Docker plugin section under Manage Jenkins), a new 
container never gets created to service new build requests from projects? I 
have the master setup to not perform builds so when I request a new build 
from the project, there are no executors that can service it... a new 
container should be spawned for this, no? Am I missing something? Could 
this be a different issues?

On Friday, October 20, 2017 at 4:03:45 AM UTC-5, seol...@gmail.com wrote:
>
> Hi,
> I am getting this error on various versions of Jenkins and the 
> docker-plugin including latest of both.
> My Jenkins master is running in a container. It successfully launches a 
> docker container for the slave (using the evarga/jenkins-slave image) but 
> then fails to connect with the error below.
> I can see my slave running with a docker ps and can even successfully 
> connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral 
> port is) using the same credentials configured in the docker agent template 
> section.
> Any ideas really welcome as I'm now going round in circles trying to get 
> this working.
> Thanks.
>
>
> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
> Connection refused (Connection refused)
> SSH Connection failed with IOException: "Connection refused (Connection 
> refused)".
> java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
>   at com.trilead.ssh2.Connection.connect(Connection.java:834)
>   at com.trilead.ssh2.Connection.connect(Connection.java:703)
>   at com.trilead.ssh2.Connection.connect(Connection.java:617)
>   at 
> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused (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:367)
>   at 
> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>   at com.trilead.ssh2.Connection.connect(Connection.java:774)
>   ... 9 more
> [10/20/17 08:13:45] Launch failed - cleaning up connection
> [10/20/17 08:13:45] [SSH] Connection closed.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c60bb73f-eccd-43f4-8ea2-0058398c6f7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread nicolas de loof
thanks for reporting this. Most probably I've only ran tests for various
launchers only once :P

2017-10-20 17:05 GMT+02:00 Martin Heg :

> Sounds good - if it helps with your analysis I've noticed that first build
> after a restart always seems to work fine with the executor being destroyed
> correctly. Subsequent builds then suffer from the 'offline'/non-terminated
> executor.
> Thanks.
>
> On 20 October 2017 at 15:59, nicolas de loof 
> wrote:
>
>> looks like the build termination isn't successfully caught to terminate
>> this node.
>> I'm trying to stabilize the "launch" mechanism in 1.0.x, then will try to
>> address the more general lifecycle for docker agents, being created as a
>> task enter the queue and destroyed on completion. My experiments on
>> one-shot-executor give me some ideas on how to improve this process without
>> being too much hack-ish :D
>>
>> 2017-10-20 16:16 GMT+02:00 Martin Heg :
>>
>>> Aha - yes I have 'Docker Host URI' set to 'unix:///var/run/docker.sock',
>>> but what I was probably missing was to set the 'Docker Hostname' under the
>>> Advanced section in the Cloud settings... once I set that to the ip address
>>> of the docker host I am having some more success...
>>>
>>> Now slave containers are being spawned and builds are running in them
>>> :), but all is not quite right..
>>>
>>> Even though the container is created and destroyed after the build the
>>> UI is still showing the 'node' as offline. See attached screenshot.
>>>
>>> Looking at the log for any of these shows that the docker host ip
>>> address is now being used for routing instead of 0.0.0.0 but the log still
>>> shows the 'connection refused' error... (I've masked out ip address in the
>>> paste below)..
>>>
>>> Despite this error, the build history for the node shows that it ran the
>>> build successfully..
>>>
>>> *[10/20/17 14:06:44] [SSH] Opening SSH connection to 10.x.x.x:32842.
>>> Connection refused (Connection refused)
>>> SSH Connection failed with IOException: "Connection refused (Connection 
>>> refused)".
>>> java.io.IOException: There was a problem while connecting to 10.x.x.x:32842
>>> at com.trilead.ssh2.Connection.co 
>>> nnect(Connection.java:834)
>>> at com.trilead.ssh2.Connection.co 
>>> nnect(Connection.java:703)
>>> at com.trilead.ssh2.Connection.co 
>>> nnect(Connection.java:617)
>>> at 
>>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>>> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>>> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.net.ConnectException: Connection refused (Connection 
>>> refused)
>>> at java.net.PlainSocketImpl.socketConnect(Native Method)
>>> at java.net 
>>> .AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>>> at java.net 
>>> .AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>>> 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:367)
>>> at 
>>> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>>> at com.trilead.ssh2.Connection.co 
>>> nnect(Connection.java:774)
>>> ... 9 more
>>> [10/20/17 14:06:44] Launch failed - cleaning up connection
>>> [10/20/17 14:06:44] [SSH] Connection closed.*
>>>
>>>
>>>
>>>
>>> Thank you so much for your help Nicolas.
>>>
>>> On 20 October 2017 at 14:11, nicolas de loof 
>>> wrote:
>>>
 issue here is 0.0.0.0 (localhost) from jenkins master is a container,
 not the docker host, so can't connect to ssh slave.
 I assume you have master to access docker.sock to run this sibling
 container ? So master has no way to guess the external IP

 2017-10-20 14:51 GMT+02:00 Martin Heg :

> What I should add once more just to clarify is that the slave
> container does actually get started (and hence why I am able to try
> manually ssh-ing into it) - it stays running for a few minutes and then
> exits.
>
>
> On 20 October 2017 at 13:34, Martin Heg  wrote:
>
>> Frustrating 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread Martin Heg
Sounds good - if it helps with your analysis I've noticed that first build
after a restart always seems to work fine with the executor being destroyed
correctly. Subsequent builds then suffer from the 'offline'/non-terminated
executor.
Thanks.

On 20 October 2017 at 15:59, nicolas de loof 
wrote:

> looks like the build termination isn't successfully caught to terminate
> this node.
> I'm trying to stabilize the "launch" mechanism in 1.0.x, then will try to
> address the more general lifecycle for docker agents, being created as a
> task enter the queue and destroyed on completion. My experiments on
> one-shot-executor give me some ideas on how to improve this process without
> being too much hack-ish :D
>
> 2017-10-20 16:16 GMT+02:00 Martin Heg :
>
>> Aha - yes I have 'Docker Host URI' set to 'unix:///var/run/docker.sock',
>> but what I was probably missing was to set the 'Docker Hostname' under the
>> Advanced section in the Cloud settings... once I set that to the ip address
>> of the docker host I am having some more success...
>>
>> Now slave containers are being spawned and builds are running in them :),
>> but all is not quite right..
>>
>> Even though the container is created and destroyed after the build the UI
>> is still showing the 'node' as offline. See attached screenshot.
>>
>> Looking at the log for any of these shows that the docker host ip address
>> is now being used for routing instead of 0.0.0.0 but the log still shows
>> the 'connection refused' error... (I've masked out ip address in the paste
>> below)..
>>
>> Despite this error, the build history for the node shows that it ran the
>> build successfully..
>>
>> *[10/20/17 14:06:44] [SSH] Opening SSH connection to 10.x.x.x:32842.
>> Connection refused (Connection refused)
>> SSH Connection failed with IOException: "Connection refused (Connection 
>> refused)".
>> java.io.IOException: There was a problem while connecting to 10.x.x.x:32842
>>  at com.trilead.ssh2.Connection.co 
>> nnect(Connection.java:834)
>>  at com.trilead.ssh2.Connection.co 
>> nnect(Connection.java:703)
>>  at com.trilead.ssh2.Connection.co 
>> nnect(Connection.java:617)
>>  at 
>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>  at java.lang.Thread.run(Thread.java:748)
>> Caused by: java.net.ConnectException: Connection refused (Connection refused)
>>  at java.net.PlainSocketImpl.socketConnect(Native Method)
>>  at java.net 
>> .AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>>  at java.net 
>> .AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>>  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:367)
>>  at 
>> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>>  at com.trilead.ssh2.Connection.co 
>> nnect(Connection.java:774)
>>  ... 9 more
>> [10/20/17 14:06:44] Launch failed - cleaning up connection
>> [10/20/17 14:06:44] [SSH] Connection closed.*
>>
>>
>>
>>
>> Thank you so much for your help Nicolas.
>>
>> On 20 October 2017 at 14:11, nicolas de loof 
>> wrote:
>>
>>> issue here is 0.0.0.0 (localhost) from jenkins master is a container,
>>> not the docker host, so can't connect to ssh slave.
>>> I assume you have master to access docker.sock to run this sibling
>>> container ? So master has no way to guess the external IP
>>>
>>> 2017-10-20 14:51 GMT+02:00 Martin Heg :
>>>
 What I should add once more just to clarify is that the slave container
 does actually get started (and hence why I am able to try manually ssh-ing
 into it) - it stays running for a few minutes and then exits.


 On 20 October 2017 at 13:34, Martin Heg  wrote:

> Frustrating thing is that I definitely had this same exact setup
> working previously (jenkins master in docker container spawning slaves in
> sibling containers), albeit in the context of docker toolbox (boot2docker)
> running on windows, whereas I am now 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread nicolas de loof
looks like the build termination isn't successfully caught to terminate
this node.
I'm trying to stabilize the "launch" mechanism in 1.0.x, then will try to
address the more general lifecycle for docker agents, being created as a
task enter the queue and destroyed on completion. My experiments on
one-shot-executor give me some ideas on how to improve this process without
being too much hack-ish :D

2017-10-20 16:16 GMT+02:00 Martin Heg :

> Aha - yes I have 'Docker Host URI' set to 'unix:///var/run/docker.sock',
> but what I was probably missing was to set the 'Docker Hostname' under the
> Advanced section in the Cloud settings... once I set that to the ip address
> of the docker host I am having some more success...
>
> Now slave containers are being spawned and builds are running in them :),
> but all is not quite right..
>
> Even though the container is created and destroyed after the build the UI
> is still showing the 'node' as offline. See attached screenshot.
>
> Looking at the log for any of these shows that the docker host ip address
> is now being used for routing instead of 0.0.0.0 but the log still shows
> the 'connection refused' error... (I've masked out ip address in the paste
> below)..
>
> Despite this error, the build history for the node shows that it ran the
> build successfully..
>
> *[10/20/17 14:06:44] [SSH] Opening SSH connection to 10.x.x.x:32842.
> Connection refused (Connection refused)
> SSH Connection failed with IOException: "Connection refused (Connection 
> refused)".
> java.io.IOException: There was a problem while connecting to 10.x.x.x:32842
>   at com.trilead.ssh2.Connection.connect(Connection.java:834)
>   at com.trilead.ssh2.Connection.connect(Connection.java:703)
>   at com.trilead.ssh2.Connection.connect(Connection.java:617)
>   at 
> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused (Connection refused)
>   at java.net.PlainSocketImpl.socketConnect(Native Method)
>   at java.net 
> .AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>   at java.net 
> .AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>   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:367)
>   at 
> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>   at com.trilead.ssh2.Connection.connect(Connection.java:774)
>   ... 9 more
> [10/20/17 14:06:44] Launch failed - cleaning up connection
> [10/20/17 14:06:44] [SSH] Connection closed.*
>
>
>
>
> Thank you so much for your help Nicolas.
>
> On 20 October 2017 at 14:11, nicolas de loof 
> wrote:
>
>> issue here is 0.0.0.0 (localhost) from jenkins master is a container, not
>> the docker host, so can't connect to ssh slave.
>> I assume you have master to access docker.sock to run this sibling
>> container ? So master has no way to guess the external IP
>>
>> 2017-10-20 14:51 GMT+02:00 Martin Heg :
>>
>>> What I should add once more just to clarify is that the slave container
>>> does actually get started (and hence why I am able to try manually ssh-ing
>>> into it) - it stays running for a few minutes and then exits.
>>>
>>>
>>> On 20 October 2017 at 13:34, Martin Heg  wrote:
>>>
 Frustrating thing is that I definitely had this same exact setup
 working previously (jenkins master in docker container spawning slaves in
 sibling containers), albeit in the context of docker toolbox (boot2docker)
 running on windows, whereas I am now running against standard docker on
 linux.

 On 20 October 2017 at 13:25, Martin Heg  wrote:

> Yes - jenkins master running in container.
> From the docker host I can manually ssh into the slave container with:
> ssh -p *ephmeral_port* jenkins@0.0.0.0
> If I docker exec into the jenkins master I can also ssh into the slave
> container using the docker host ip:
> ssh -p *ephmeral_port* jenkins@*hostip*
>
> h.
>
> On 20 October 2017 at 13:05, nicolas de loof  > 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread Martin Heg
Aha - yes I have 'Docker Host URI' set to 'unix:///var/run/docker.sock',
but what I was probably missing was to set the 'Docker Hostname' under the
Advanced section in the Cloud settings... once I set that to the ip address
of the docker host I am having some more success...

Now slave containers are being spawned and builds are running in them :),
but all is not quite right..

Even though the container is created and destroyed after the build the UI
is still showing the 'node' as offline. See attached screenshot.

Looking at the log for any of these shows that the docker host ip address
is now being used for routing instead of 0.0.0.0 but the log still shows
the 'connection refused' error... (I've masked out ip address in the paste
below)..

Despite this error, the build history for the node shows that it ran the
build successfully..

*[10/20/17 14:06:44] [SSH] Opening SSH connection to 10.x.x.x:32842.
Connection refused (Connection refused)
SSH Connection failed with IOException: "Connection refused
(Connection refused)".
java.io.IOException: There was a problem while connecting to 10.x.x.x:32842
at com.trilead.ssh2.Connection.connect(Connection.java:834)
at com.trilead.ssh2.Connection.connect(Connection.java:703)
at com.trilead.ssh2.Connection.connect(Connection.java:617)
at 
hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
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:367)
at 
com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
at com.trilead.ssh2.Connection.connect(Connection.java:774)
... 9 more
[10/20/17 14:06:44] Launch failed - cleaning up connection
[10/20/17 14:06:44] [SSH] Connection closed.*




Thank you so much for your help Nicolas.

On 20 October 2017 at 14:11, nicolas de loof 
wrote:

> issue here is 0.0.0.0 (localhost) from jenkins master is a container, not
> the docker host, so can't connect to ssh slave.
> I assume you have master to access docker.sock to run this sibling
> container ? So master has no way to guess the external IP
>
> 2017-10-20 14:51 GMT+02:00 Martin Heg :
>
>> What I should add once more just to clarify is that the slave container
>> does actually get started (and hence why I am able to try manually ssh-ing
>> into it) - it stays running for a few minutes and then exits.
>>
>>
>> On 20 October 2017 at 13:34, Martin Heg  wrote:
>>
>>> Frustrating thing is that I definitely had this same exact setup working
>>> previously (jenkins master in docker container spawning slaves in sibling
>>> containers), albeit in the context of docker toolbox (boot2docker) running
>>> on windows, whereas I am now running against standard docker on linux.
>>>
>>> On 20 October 2017 at 13:25, Martin Heg  wrote:
>>>
 Yes - jenkins master running in container.
 From the docker host I can manually ssh into the slave container with:
 ssh -p *ephmeral_port* jenkins@0.0.0.0
 If I docker exec into the jenkins master I can also ssh into the slave
 container using the docker host ip:
 ssh -p *ephmeral_port* jenkins@*hostip*

 h.

 On 20 October 2017 at 13:05, nicolas de loof 
 wrote:

> Is your jenkins master running in a docker container as well ?
>
> stacktrace seems to demonstrate failure to establish a route to
> 0.0.0.0:32791, even before any SSH authentication attempt
>
> 2017-10-20 12:16 GMT+02:00 Martin Heg :
>
>> Thanks for your reply Nicolas. Yes I saw that suggestion in one of
>> your other posts and have already tried it but still seeing the same 
>> issue
>> unfortunately.
>>
>> On 20 October 2017 at 11:11, nicolas de loof <
>> nicolas.del...@gmail.com> wrote:
>>
>>> to use your own SSH credentials you 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread nicolas de loof
issue here is 0.0.0.0 (localhost) from jenkins master is a container, not
the docker host, so can't connect to ssh slave.
I assume you have master to access docker.sock to run this sibling
container ? So master has no way to guess the external IP

2017-10-20 14:51 GMT+02:00 Martin Heg :

> What I should add once more just to clarify is that the slave container
> does actually get started (and hence why I am able to try manually ssh-ing
> into it) - it stays running for a few minutes and then exits.
>
>
> On 20 October 2017 at 13:34, Martin Heg  wrote:
>
>> Frustrating thing is that I definitely had this same exact setup working
>> previously (jenkins master in docker container spawning slaves in sibling
>> containers), albeit in the context of docker toolbox (boot2docker) running
>> on windows, whereas I am now running against standard docker on linux.
>>
>> On 20 October 2017 at 13:25, Martin Heg  wrote:
>>
>>> Yes - jenkins master running in container.
>>> From the docker host I can manually ssh into the slave container with:
>>> ssh -p *ephmeral_port* jenkins@0.0.0.0
>>> If I docker exec into the jenkins master I can also ssh into the slave
>>> container using the docker host ip:
>>> ssh -p *ephmeral_port* jenkins@*hostip*
>>>
>>> h.
>>>
>>> On 20 October 2017 at 13:05, nicolas de loof 
>>> wrote:
>>>
 Is your jenkins master running in a docker container as well ?

 stacktrace seems to demonstrate failure to establish a route to
 0.0.0.0:32791, even before any SSH authentication attempt

 2017-10-20 12:16 GMT+02:00 Martin Heg :

> Thanks for your reply Nicolas. Yes I saw that suggestion in one of
> your other posts and have already tried it but still seeing the same issue
> unfortunately.
>
> On 20 October 2017 at 11:11, nicolas de loof  > wrote:
>
>> to use your own SSH credentials you need to disable the "SSH key
>> management" option (title is unclear)
>> with this option set the container is configured to rely on jenkins
>> master Identity ssh key
>>
>> I'm working on a UI refactoring to avoid such confusing options
>>
>> 2017-10-20 11:38 GMT+02:00 :
>>
>>> Just to add that the Docker plugin also recognises the slave
>>> container as running as shown in this attachment.
>>>
>>>
>>> 
>>>
>>>
>>> On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:

 Hi,
 I am getting this error on various versions of Jenkins and the
 docker-plugin including latest of both.
 My Jenkins master is running in a container. It successfully
 launches a docker container for the slave (using the 
 evarga/jenkins-slave
 image) but then fails to connect with the error below.
 I can see my slave running with a docker ps and can even
 successfully connect to it via ssh on 0.0.0.0:32791 (or whatever
 the given ephmeral port is) using the same credentials configured in 
 the
 docker agent template section.
 Any ideas really welcome as I'm now going round in circles trying
 to get this working.
 Thanks.


 [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
 Connection refused (Connection refused)
 SSH Connection failed with IOException: "Connection refused 
 (Connection refused)".
 java.io.IOException: There was a problem while connecting to 
 0.0.0.0:32791
at com.trilead.ssh2.Connection.connect(Connection.java:834)
at com.trilead.ssh2.Connection.connect(Connection.java:703)
at com.trilead.ssh2.Connection.connect(Connection.java:617)
at 
 hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
at 
 hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
at 
 hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
 Caused by: java.net.ConnectException: Connection refused (Connection 
 refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at 
 java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread Martin Heg
What I should add once more just to clarify is that the slave container
does actually get started (and hence why I am able to try manually ssh-ing
into it) - it stays running for a few minutes and then exits.


On 20 October 2017 at 13:34, Martin Heg  wrote:

> Frustrating thing is that I definitely had this same exact setup working
> previously (jenkins master in docker container spawning slaves in sibling
> containers), albeit in the context of docker toolbox (boot2docker) running
> on windows, whereas I am now running against standard docker on linux.
>
> On 20 October 2017 at 13:25, Martin Heg  wrote:
>
>> Yes - jenkins master running in container.
>> From the docker host I can manually ssh into the slave container with:
>> ssh -p *ephmeral_port* jenkins@0.0.0.0
>> If I docker exec into the jenkins master I can also ssh into the slave
>> container using the docker host ip:
>> ssh -p *ephmeral_port* jenkins@*hostip*
>>
>> h.
>>
>> On 20 October 2017 at 13:05, nicolas de loof 
>> wrote:
>>
>>> Is your jenkins master running in a docker container as well ?
>>>
>>> stacktrace seems to demonstrate failure to establish a route to
>>> 0.0.0.0:32791, even before any SSH authentication attempt
>>>
>>> 2017-10-20 12:16 GMT+02:00 Martin Heg :
>>>
 Thanks for your reply Nicolas. Yes I saw that suggestion in one of your
 other posts and have already tried it but still seeing the same issue
 unfortunately.

 On 20 October 2017 at 11:11, nicolas de loof 
 wrote:

> to use your own SSH credentials you need to disable the "SSH key
> management" option (title is unclear)
> with this option set the container is configured to rely on jenkins
> master Identity ssh key
>
> I'm working on a UI refactoring to avoid such confusing options
>
> 2017-10-20 11:38 GMT+02:00 :
>
>> Just to add that the Docker plugin also recognises the slave
>> container as running as shown in this attachment.
>>
>>
>> 
>>
>>
>> On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:
>>>
>>> Hi,
>>> I am getting this error on various versions of Jenkins and the
>>> docker-plugin including latest of both.
>>> My Jenkins master is running in a container. It successfully
>>> launches a docker container for the slave (using the 
>>> evarga/jenkins-slave
>>> image) but then fails to connect with the error below.
>>> I can see my slave running with a docker ps and can even
>>> successfully connect to it via ssh on 0.0.0.0:32791 (or whatever
>>> the given ephmeral port is) using the same credentials configured in the
>>> docker agent template section.
>>> Any ideas really welcome as I'm now going round in circles trying to
>>> get this working.
>>> Thanks.
>>>
>>>
>>> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
>>> Connection refused (Connection refused)
>>> SSH Connection failed with IOException: "Connection refused (Connection 
>>> refused)".
>>> java.io.IOException: There was a problem while connecting to 
>>> 0.0.0.0:32791
>>> at com.trilead.ssh2.Connection.connect(Connection.java:834)
>>> at com.trilead.ssh2.Connection.connect(Connection.java:703)
>>> at com.trilead.ssh2.Connection.connect(Connection.java:617)
>>> at 
>>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>>> at 
>>> hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>>> at 
>>> hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.net.ConnectException: Connection refused (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 
>>> 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread Martin Heg
Frustrating thing is that I definitely had this same exact setup working
previously (jenkins master in docker container spawning slaves in sibling
containers), albeit in the context of docker toolbox (boot2docker) running
on windows, whereas I am now running against standard docker on linux.

On 20 October 2017 at 13:25, Martin Heg  wrote:

> Yes - jenkins master running in container.
> From the docker host I can manually ssh into the slave container with:
> ssh -p *ephmeral_port* jenkins@0.0.0.0
> If I docker exec into the jenkins master I can also ssh into the slave
> container using the docker host ip:
> ssh -p *ephmeral_port* jenkins@*hostip*
>
> h.
>
> On 20 October 2017 at 13:05, nicolas de loof 
> wrote:
>
>> Is your jenkins master running in a docker container as well ?
>>
>> stacktrace seems to demonstrate failure to establish a route to
>> 0.0.0.0:32791, even before any SSH authentication attempt
>>
>> 2017-10-20 12:16 GMT+02:00 Martin Heg :
>>
>>> Thanks for your reply Nicolas. Yes I saw that suggestion in one of your
>>> other posts and have already tried it but still seeing the same issue
>>> unfortunately.
>>>
>>> On 20 October 2017 at 11:11, nicolas de loof 
>>> wrote:
>>>
 to use your own SSH credentials you need to disable the "SSH key
 management" option (title is unclear)
 with this option set the container is configured to rely on jenkins
 master Identity ssh key

 I'm working on a UI refactoring to avoid such confusing options

 2017-10-20 11:38 GMT+02:00 :

> Just to add that the Docker plugin also recognises the slave container
> as running as shown in this attachment.
>
>
> 
>
>
> On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:
>>
>> Hi,
>> I am getting this error on various versions of Jenkins and the
>> docker-plugin including latest of both.
>> My Jenkins master is running in a container. It successfully launches
>> a docker container for the slave (using the evarga/jenkins-slave image) 
>> but
>> then fails to connect with the error below.
>> I can see my slave running with a docker ps and can even successfully
>> connect to it via ssh on 0.0.0.0:32791 (or whatever the given
>> ephmeral port is) using the same credentials configured in the docker 
>> agent
>> template section.
>> Any ideas really welcome as I'm now going round in circles trying to
>> get this working.
>> Thanks.
>>
>>
>> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
>> Connection refused (Connection refused)
>> SSH Connection failed with IOException: "Connection refused (Connection 
>> refused)".
>> java.io.IOException: There was a problem while connecting to 
>> 0.0.0.0:32791
>>  at com.trilead.ssh2.Connection.connect(Connection.java:834)
>>  at com.trilead.ssh2.Connection.connect(Connection.java:703)
>>  at com.trilead.ssh2.Connection.connect(Connection.java:617)
>>  at 
>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>  at java.lang.Thread.run(Thread.java:748)
>> Caused by: java.net.ConnectException: Connection refused (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:367)
>>  at 
>> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>>  at com.trilead.ssh2.Connection.connect(Connection.java:774)
>>  ... 9 more
>> [10/20/17 08:13:45] Launch failed - cleaning up connection
>> [10/20/17 08:13:45] [SSH] Connection closed.
>>
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread Martin Heg
Yes - jenkins master running in container.
>From the docker host I can manually ssh into the slave container with:
ssh -p *ephmeral_port* jenkins@0.0.0.0
If I docker exec into the jenkins master I can also ssh into the slave
container using the docker host ip:
ssh -p *ephmeral_port* jenkins@*hostip*

h.

On 20 October 2017 at 13:05, nicolas de loof 
wrote:

> Is your jenkins master running in a docker container as well ?
>
> stacktrace seems to demonstrate failure to establish a route to
> 0.0.0.0:32791, even before any SSH authentication attempt
>
> 2017-10-20 12:16 GMT+02:00 Martin Heg :
>
>> Thanks for your reply Nicolas. Yes I saw that suggestion in one of your
>> other posts and have already tried it but still seeing the same issue
>> unfortunately.
>>
>> On 20 October 2017 at 11:11, nicolas de loof 
>> wrote:
>>
>>> to use your own SSH credentials you need to disable the "SSH key
>>> management" option (title is unclear)
>>> with this option set the container is configured to rely on jenkins
>>> master Identity ssh key
>>>
>>> I'm working on a UI refactoring to avoid such confusing options
>>>
>>> 2017-10-20 11:38 GMT+02:00 :
>>>
 Just to add that the Docker plugin also recognises the slave container
 as running as shown in this attachment.


 


 On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:
>
> Hi,
> I am getting this error on various versions of Jenkins and the
> docker-plugin including latest of both.
> My Jenkins master is running in a container. It successfully launches
> a docker container for the slave (using the evarga/jenkins-slave image) 
> but
> then fails to connect with the error below.
> I can see my slave running with a docker ps and can even successfully
> connect to it via ssh on 0.0.0.0:32791 (or whatever the given
> ephmeral port is) using the same credentials configured in the docker 
> agent
> template section.
> Any ideas really welcome as I'm now going round in circles trying to
> get this working.
> Thanks.
>
>
> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
> Connection refused (Connection refused)
> SSH Connection failed with IOException: "Connection refused (Connection 
> refused)".
> java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
>   at com.trilead.ssh2.Connection.connect(Connection.java:834)
>   at com.trilead.ssh2.Connection.connect(Connection.java:703)
>   at com.trilead.ssh2.Connection.connect(Connection.java:617)
>   at 
> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused (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:367)
>   at 
> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>   at com.trilead.ssh2.Connection.connect(Connection.java:774)
>   ... 9 more
> [10/20/17 08:13:45] Launch failed - cleaning up connection
> [10/20/17 08:13:45] [SSH] Connection closed.
>
>
> --
 You received this message because you are subscribed to the Google
 Groups "Jenkins Users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to jenkinsci-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/jenkinsci-users/9359318d-f78f-432a-bd06-4c10768f2cdc%40g
 ooglegroups.com
 
 .

 For more options, visit 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread nicolas de loof
Is your jenkins master running in a docker container as well ?

stacktrace seems to demonstrate failure to establish a route to
0.0.0.0:32791, even before any SSH authentication attempt

2017-10-20 12:16 GMT+02:00 Martin Heg :

> Thanks for your reply Nicolas. Yes I saw that suggestion in one of your
> other posts and have already tried it but still seeing the same issue
> unfortunately.
>
> On 20 October 2017 at 11:11, nicolas de loof 
> wrote:
>
>> to use your own SSH credentials you need to disable the "SSH key
>> management" option (title is unclear)
>> with this option set the container is configured to rely on jenkins
>> master Identity ssh key
>>
>> I'm working on a UI refactoring to avoid such confusing options
>>
>> 2017-10-20 11:38 GMT+02:00 :
>>
>>> Just to add that the Docker plugin also recognises the slave container
>>> as running as shown in this attachment.
>>>
>>>
>>> 
>>>
>>>
>>> On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:

 Hi,
 I am getting this error on various versions of Jenkins and the
 docker-plugin including latest of both.
 My Jenkins master is running in a container. It successfully launches a
 docker container for the slave (using the evarga/jenkins-slave image) but
 then fails to connect with the error below.
 I can see my slave running with a docker ps and can even successfully
 connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral
 port is) using the same credentials configured in the docker agent template
 section.
 Any ideas really welcome as I'm now going round in circles trying to
 get this working.
 Thanks.


 [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
 Connection refused (Connection refused)
 SSH Connection failed with IOException: "Connection refused (Connection 
 refused)".
 java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
at com.trilead.ssh2.Connection.connect(Connection.java:834)
at com.trilead.ssh2.Connection.connect(Connection.java:703)
at com.trilead.ssh2.Connection.connect(Connection.java:617)
at 
 hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
 Caused by: java.net.ConnectException: Connection refused (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:367)
at 
 com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
at com.trilead.ssh2.Connection.connect(Connection.java:774)
... 9 more
 [10/20/17 08:13:45] Launch failed - cleaning up connection
 [10/20/17 08:13:45] [SSH] Connection closed.


 --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/9359318d-f78f-432a-bd06-4c10768f2cdc%40g
>>> ooglegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/jenkinsci-users/cEKuC4GwP5I/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread Martin Heg
Thanks for your reply Nicolas. Yes I saw that suggestion in one of your
other posts and have already tried it but still seeing the same issue
unfortunately.

On 20 October 2017 at 11:11, nicolas de loof 
wrote:

> to use your own SSH credentials you need to disable the "SSH key
> management" option (title is unclear)
> with this option set the container is configured to rely on jenkins master
> Identity ssh key
>
> I'm working on a UI refactoring to avoid such confusing options
>
> 2017-10-20 11:38 GMT+02:00 :
>
>> Just to add that the Docker plugin also recognises the slave container as
>> running as shown in this attachment.
>>
>>
>> 
>>
>>
>> On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:
>>>
>>> Hi,
>>> I am getting this error on various versions of Jenkins and the
>>> docker-plugin including latest of both.
>>> My Jenkins master is running in a container. It successfully launches a
>>> docker container for the slave (using the evarga/jenkins-slave image) but
>>> then fails to connect with the error below.
>>> I can see my slave running with a docker ps and can even successfully
>>> connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral
>>> port is) using the same credentials configured in the docker agent template
>>> section.
>>> Any ideas really welcome as I'm now going round in circles trying to get
>>> this working.
>>> Thanks.
>>>
>>>
>>> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
>>> Connection refused (Connection refused)
>>> SSH Connection failed with IOException: "Connection refused (Connection 
>>> refused)".
>>> java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
>>> at com.trilead.ssh2.Connection.connect(Connection.java:834)
>>> at com.trilead.ssh2.Connection.connect(Connection.java:703)
>>> at com.trilead.ssh2.Connection.connect(Connection.java:617)
>>> at 
>>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>>> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>>> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>> at 
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.net.ConnectException: Connection refused (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:367)
>>> at 
>>> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>>> at com.trilead.ssh2.Connection.connect(Connection.java:774)
>>> ... 9 more
>>> [10/20/17 08:13:45] Launch failed - cleaning up connection
>>> [10/20/17 08:13:45] [SSH] Connection closed.
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jenkinsci-users/9359318d-f78f-432a-bd06-4c10768f2cdc%
>> 40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/cEKuC4GwP5I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/CANMVJzkXMLjco0tzp_rcZpcyQ-
> 4xFMQNi9%3DKAAEK6-Z8r%3DLYMg%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this 

Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread nicolas de loof
to use your own SSH credentials you need to disable the "SSH key
management" option (title is unclear)
with this option set the container is configured to rely on jenkins master
Identity ssh key

I'm working on a UI refactoring to avoid such confusing options

2017-10-20 11:38 GMT+02:00 :

> Just to add that the Docker plugin also recognises the slave container as
> running as shown in this attachment.
>
>
> 
>
>
> On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:
>>
>> Hi,
>> I am getting this error on various versions of Jenkins and the
>> docker-plugin including latest of both.
>> My Jenkins master is running in a container. It successfully launches a
>> docker container for the slave (using the evarga/jenkins-slave image) but
>> then fails to connect with the error below.
>> I can see my slave running with a docker ps and can even successfully
>> connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral
>> port is) using the same credentials configured in the docker agent template
>> section.
>> Any ideas really welcome as I'm now going round in circles trying to get
>> this working.
>> Thanks.
>>
>>
>> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
>> Connection refused (Connection refused)
>> SSH Connection failed with IOException: "Connection refused (Connection 
>> refused)".
>> java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
>>  at com.trilead.ssh2.Connection.connect(Connection.java:834)
>>  at com.trilead.ssh2.Connection.connect(Connection.java:703)
>>  at com.trilead.ssh2.Connection.connect(Connection.java:617)
>>  at 
>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>  at java.lang.Thread.run(Thread.java:748)
>> Caused by: java.net.ConnectException: Connection refused (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:367)
>>  at 
>> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>>  at com.trilead.ssh2.Connection.connect(Connection.java:774)
>>  ... 9 more
>> [10/20/17 08:13:45] Launch failed - cleaning up connection
>> [10/20/17 08:13:45] [SSH] Connection closed.
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/9359318d-f78f-432a-bd06-4c10768f2cdc%40googlegroups.
> com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzkXMLjco0tzp_rcZpcyQ-4xFMQNi9%3DKAAEK6-Z8r%3DLYMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread seoladh1
Just to add that the Docker plugin also recognises the slave container as 
running as shown in this attachment.




On Friday, 20 October 2017 10:03:45 UTC+1, seol...@gmail.com wrote:
>
> Hi,
> I am getting this error on various versions of Jenkins and the 
> docker-plugin including latest of both.
> My Jenkins master is running in a container. It successfully launches a 
> docker container for the slave (using the evarga/jenkins-slave image) but 
> then fails to connect with the error below.
> I can see my slave running with a docker ps and can even successfully 
> connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral 
> port is) using the same credentials configured in the docker agent template 
> section.
> Any ideas really welcome as I'm now going round in circles trying to get 
> this working.
> Thanks.
>
>
> [10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
> Connection refused (Connection refused)
> SSH Connection failed with IOException: "Connection refused (Connection 
> refused)".
> java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
>   at com.trilead.ssh2.Connection.connect(Connection.java:834)
>   at com.trilead.ssh2.Connection.connect(Connection.java:703)
>   at com.trilead.ssh2.Connection.connect(Connection.java:617)
>   at 
> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
>   at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused (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:367)
>   at 
> com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
>   at com.trilead.ssh2.Connection.connect(Connection.java:774)
>   ... 9 more
> [10/20/17 08:13:45] Launch failed - cleaning up connection
> [10/20/17 08:13:45] [SSH] Connection closed.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9359318d-f78f-432a-bd06-4c10768f2cdc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Docker-plugin - ssh connection refused when connecting to slave

2017-10-20 Thread seoladh1
Hi,
I am getting this error on various versions of Jenkins and the 
docker-plugin including latest of both.
My Jenkins master is running in a container. It successfully launches a 
docker container for the slave (using the evarga/jenkins-slave image) but 
then fails to connect with the error below.
I can see my slave running with a docker ps and can even successfully 
connect to it via ssh on 0.0.0.0:32791 (or whatever the given ephmeral port 
is) using the same credentials configured in the docker agent template 
section.
Any ideas really welcome as I'm now going round in circles trying to get 
this working.
Thanks.


[10/20/17 08:13:45] [SSH] Opening SSH connection to 0.0.0.0:32791.
Connection refused (Connection refused)
SSH Connection failed with IOException: "Connection refused (Connection 
refused)".
java.io.IOException: There was a problem while connecting to 0.0.0.0:32791
at com.trilead.ssh2.Connection.connect(Connection.java:834)
at com.trilead.ssh2.Connection.connect(Connection.java:703)
at com.trilead.ssh2.Connection.connect(Connection.java:617)
at 
hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused (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:367)
at 
com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
at com.trilead.ssh2.Connection.connect(Connection.java:774)
... 9 more
[10/20/17 08:13:45] Launch failed - cleaning up connection
[10/20/17 08:13:45] [SSH] Connection closed.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e5b94d88-f555-42be-a14b-68bd4d7fef33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.