jenkinsci / jenkinsci/openstack-cloud-plugin

Agents are left offline on Jenkins restart

Open
#217 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
49
Forks
97
Avg merge
13h 23m
Merged PRs (30d)
6

Description

Every time I restart Jenkins (i.e. for update), existing agents are not relaunched. I need to delete them or launch them manually.

Agent log contains following error:

```
[09/04/18 06:22:30] [SSH] Opening SSH connection to 10.64.120.18:22.
Key exchange was not finished, connection is closed.
java.io.IOException: There was a problem while connecting to 10.64.120.18:22
at com.trilead.ssh2.Connection.connect(Connection.java:834)
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1324)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:831)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:820)
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.io.IOException: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:95)
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:237)
at com.trilead.ssh2.Connection.connect(Connection.java:786)
... 7 more
Caused by: java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at com.trilead.ssh2.crypto.cipher.CipherOutputStream.flush(CipherOutputStream.java:75)
at com.trilead.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:193)
at com.trilead.ssh2.transport.TransportConnection.sendMessage(TransportConnection.java:107)
at com.trilead.ssh2.transport.TransportManager.sendKexMessage(TransportManager.java:587)
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:431)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:790)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:502)
... 1 more
[09/04/18 06:27:54] Launch failed - cleaning up connection
[09/04/18 06:27:54] [SSH] Connection closed.
Launcher failed to bring the node online. Retrying ...
Launcher failed to bring the node online within timeout.
```

I've found [a solution](https://support.cloudbees.com/hc/en-us/articles/115000073552-Host-Key-Verification-for-SSH-Agents) to similar problem that applies to manually created agents. I guess, while not directly applicable to dynamically created agents, it gives a notion of what the problem could be.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.