Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails to connect to container spawning jenkins slave #4

Closed
grimpy opened this issue Feb 27, 2014 · 7 comments
Closed

Plugin fails to connect to container spawning jenkins slave #4

grimpy opened this issue Feb 27, 2014 · 7 comments

Comments

@grimpy
Copy link

grimpy commented Feb 27, 2014

When trying to connected to the freshly spawned slave (which is perfectly ssh-able) I get the following error message in details of new node

I also noticed the plugin adds a credentials with a random (uuid) username with a copy of the original settings ssh key and as comment 127.0.0.1. Is this normal?

[02/27/14 09:28:15] [SSH] Opening SSH connection to 127.0.0.1:49211.
java.io.IOException: There was a problem while connecting to 127.0.0.1:49211
    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:1132)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:648)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.IOException: Premature connection close
    at com.trilead.ssh2.transport.ClientServerHello.readLineRN(ClientServerHello.java:33)
    at com.trilead.ssh2.transport.ClientServerHello.<init>(ClientServerHello.java:68)
    at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:466)
    at com.trilead.ssh2.Connection.connect(Connection.java:758)
    ... 10 more
[02/27/14 09:28:15] [SSH] Connection closed.
[02/27/14 09:28:15] Launch failed - cleaning up connection
[02/27/14 09:28:20] [SSH] Opening SSH connection to 127.0.0.1:49211.
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
java.lang.NullPointerException
    at hudson.plugins.sshslaves.SSHLauncher.pemKeyEquals(SSHLauncher.java:524)
    at hudson.plugins.sshslaves.SSHLauncher.access$000(SSHLauncher.java:126)
    at hudson.plugins.sshslaves.SSHLauncher$1.matches(SSHLauncher.java:502)
    at com.cloudbees.plugins.credentials.matchers.AllOfMatcher.matches(AllOfMatcher.java:63)
    at com.cloudbees.plugins.credentials.CredentialsMatchers.firstOrDefault(CredentialsMatchers.java:356)
    at com.cloudbees.plugins.credentials.CredentialsMatchers.firstOrNull(CredentialsMatchers.java:374)
    at hudson.plugins.sshslaves.SSHLauncher.retrieveExistingCredentials(SSHLauncher.java:489)
    at hudson.plugins.sshslaves.SSHLauncher.upgrade(SSHLauncher.java:457)
    at hudson.plugins.sshslaves.SSHLauncher.getCredentials(SSHLauncher.java:442)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1133)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:648)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
[02/27/14 09:28:20] [SSH] Connection closed.
[02/27/14 09:28:20] Launch failed - cleaning up connection

[02/27/14 09:28:30] [SSH] Opening SSH connection to 127.0.0.1:49211.
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
java.lang.NullPointerException
    at hudson.plugins.sshslaves.SSHLauncher.pemKeyEquals(SSHLauncher.java:524)
    at hudson.plugins.sshslaves.SSHLauncher.access$000(SSHLauncher.java:126)
    at hudson.plugins.sshslaves.SSHLauncher$1.matches(SSHLauncher.java:502)
    at com.cloudbees.plugins.credentials.matchers.AllOfMatcher.matches(AllOfMatcher.java:63)
    at com.cloudbees.plugins.credentials.CredentialsMatchers.firstOrDefault(CredentialsMatchers.java:356)
    at com.cloudbees.plugins.credentials.CredentialsMatchers.firstOrNull(CredentialsMatchers.java:374)
    at hudson.plugins.sshslaves.SSHLauncher.retrieveExistingCredentials(SSHLauncher.java:489)
    at hudson.plugins.sshslaves.SSHLauncher.upgrade(SSHLauncher.java:457)
    at hudson.plugins.sshslaves.SSHLauncher.getCredentials(SSHLauncher.java:442)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1133)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:648)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
[02/27/14 09:28:30] [SSH] Connection closed.
[02/27/14 09:28:30] Launch failed - cleaning up connection
@grimpy
Copy link
Author

grimpy commented Feb 27, 2014

Downgraden SSH slaves to version 1.6 (instead of 1.6.1) fixed it

@kei-yamazaki
Copy link

I had the same problem.
Downgraded plugin to 1.6, but it's not work.
But, version 1.5 is work.

@mamciek
Copy link
Contributor

mamciek commented Apr 2, 2014

Any chance of fixing this any time soon?

@sfreire
Copy link

sfreire commented Apr 3, 2014

ai have tg same problem with random ssh credentials being created..

@ckulla
Copy link

ckulla commented Apr 5, 2014

Same problem here, downgrading helped. Hope this issue will be fixed soon.

When reading the docs I see that there should also be a "SSH Username with password" credential but I don't see it anywhere, see https://wiki.jenkins-ci.org/display/JENKINS/SSH+Slaves+plugin

@sfreire
Copy link

sfreire commented Apr 6, 2014

@ckulla , you downgraded what to which version exactly?

@magnayn
Copy link
Contributor

magnayn commented Apr 10, 2014

I've bumped the ssh link to the latest version, which ought to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants