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

Unable to start slave - java.lang.NoSuchMethodError: hudson.plugins.sshslaves.SSHLauncher #23

Closed
hcguersoy opened this issue May 20, 2014 · 3 comments

Comments

@hcguersoy
Copy link

Hi,

I'm running into an error while trying to build using docker slaves:

May 20, 2014 9:44:52 AM WARNING hudson.slaves.NodeProvisioner update
Provisioned slave Image of slave:0.4 failed to launch
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: hudson.plugins.sshslaves.SSHLauncher.<init>(Ljava/lang/String;ILcom/cloudbees/plugins/credentials/common/StandardUsernameCredentials;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
    at com.google.common.base.Throwables.propagate(Throwables.java:156)
    at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:148)
    at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:125)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: hudson.plugins.sshslaves.SSHLauncher.<init>(Ljava/lang/String;ILcom/cloudbees/plugins/credentials/common/StandardUsernameCredentials;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:141)
    ... 6 more
Caused by: java.lang.NoSuchMethodError: hudson.plugins.sshslaves.SSHLauncher.<init>(Ljava/lang/String;ILcom/cloudbees/plugins/credentials/common/StandardUsernameCredentials;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V
    at com.nirima.jenkins.plugins.docker.DockerComputerLauncher.getSSHLauncher(DockerComputerLauncher.java:85)
    at com.nirima.jenkins.plugins.docker.DockerComputerLauncher.launch(DockerComputerLauncher.java:50)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:222)
    ... 5 more

My Jenkins is 1.563, all plugins are actual.

I can start the containers manual and configure manual ssh slaves. So I assume there is a API incompatibility.

Bye
Halil

@magnayn
Copy link
Contributor

magnayn commented Jun 7, 2014

Which version of SSH slaves do you have installed?

@hcguersoy
Copy link
Author

It was 1.6

I've tried to reproduce it today but I've already destroyed the vm and there are newer Jenkins releases. Tried it with newer jenkins version but there I get other errors - I'll investigate with and maybe open an issue:

The current error is below - jenkins starts every 10 seconds a new container but could not build.

Jun 07, 2014 5:21:26 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision
Excess workload after pending Spot instances: 1
Jun 07, 2014 5:21:26 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host docker1 URL http://localhost:4243
Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
1 * Sending client request on thread jenkins.util.Timer [#7]
1 > GET http://localhost:4243/images/0058c31c1c7f/json

Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
2 * Client response received on thread jenkins.util.Timer [#7]
2 < 200
2 < Content-Length: 1881
2 < Content-Type: application/json
2 < Date: Sat, 07 Jun 2014 17:21:26 GMT
{"Architecture":"amd64","Author":"hcguersoy","Comment":"","Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":["/bin/sh","-c","/usr/sbin/sshd -D"],"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":null,"Env":["HOME=/","PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","http_proxy=http://10.49.92.33:8080","https_proxy=http://10.49.92.33:8080","no_proxy=localhost,127.0.0.1,*.local,169.254/16,10.20.30.*, 10.49.*"],"ExposedPorts":{"22/tcp":{}},"Hostname":"622fc7921d28","Image":"98c0d9c32ed1cbf7db7ad5f212614f039d6288fefe259272f6ac40dcbc69a2a8","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":[],"OpenStdin":true,"PortSpecs":null,"StdinOnce":true,"Tty":true,"User":"","Volumes":{"/data/jenkins":{}},"WorkingDir":""},"Container":"c7d10b02a9f76fbd711f892e0e4f5ea00b6202c6612e8d683d486133c9540a68","ContainerConfig":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":["/bin/sh","-c","#(nop) CMD [/bin/sh -c /usr/sbin/sshd -D]"],"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":null,"Env":["HOME=/","PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","http_proxy=http://10.49.92.33:8080","https_proxy=http://10.49.92.33:8080","no_proxy=localhost,127.0.0.1,*.local,169.254/16,10.20.30.*, 10.49.*"],"ExposedPorts":{"22/tcp":{}},"Hostname":"622fc7921d28","Image":"98c0d9c32ed1cbf7db7ad5f212614f039d6288fefe259272f6ac40dcbc69a2a8","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":[],"OpenStdin":true,"PortSpecs":null,"StdinOnce":true,"Tty":true,"User":"","Volumes":{"/data/jenkins":{}},"WorkingDir":""},"Created":"2014-05-20T13:30:15.620669095Z","DockerVersion":"0.11.1","Id":"0058c31c1c7f516b2bd07d379e4fd2d5d3691da81ca48dfce7ee97c041bd8192","Os":"linux","Parent":"98c0d9c32ed1cbf7db7ad5f212614f039d6288fefe259272f6ac40dcbc69a2a8","Size":0}


Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
3 * Sending client request on thread jenkins.util.Timer [#7]
3 > GET http://localhost:4243/containers/json?all=false&limit=-1&since=&before=&size=false

Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
4 * Client response received on thread jenkins.util.Timer [#7]
4 < 200
4 < Content-Length: 2
4 < Content-Type: application/json
4 < Date: Sat, 07 Jun 2014 17:21:26 GMT
[]

Jun 07, 2014 5:21:26 PM INFO hudson.slaves.NodeProvisioner update
Started provisioning Image of 0058c31c1c7f from docker1 with 1 executors. Remaining excess workload:0.0
Jun 07, 2014 5:21:26 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host docker1 URL http://localhost:4243
Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
5 * Sending client request on thread Computer.threadPoolForRemoting [#4]
5 > POST http://localhost:4243/containers/create
5 > Content-Type: application/json
{"Hostname":"","PortSpecs":["22/tcp"],"User":"","Tty":false,"OpenStdin":false,"StdinOnce":false,"Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Env":null,"Cmd":["/usr/sbin/sshd","-D"],"Dns":[""],"Image":"0058c31c1c7f","Volumes":null,"VolumesFrom":"","Entrypoint":[],"NetworkDisabled":false,"Privileged":false,"WorkingDir":"","Domainname":"","ExposedPorts":null,"OnBuild":null}

Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
6 * Client response received on thread Computer.threadPoolForRemoting [#4]
6 < 201
6 < Content-Length: 90
6 < Content-Type: application/json
6 < Date: Sat, 07 Jun 2014 17:21:26 GMT
{"Id":"a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a","Warnings":null}


Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
7 * Sending client request on thread Computer.threadPoolForRemoting [#4]
7 > POST http://localhost:4243/containers/a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a/start
7 > Content-Type: application/json
{"PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0"}]},"Privileged":false,"Dns":[""]}

Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
8 * Client response received on thread Computer.threadPoolForRemoting [#4]
8 < 204
8 < Content-Length: 0
8 < Content-Type: text/plain; charset=utf-8
8 < Date: Sat, 07 Jun 2014 17:21:26 GMT

Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
9 * Sending client request on thread Computer.threadPoolForRemoting [#4]
9 > GET http://localhost:4243/containers/a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a/json

Jun 07, 2014 5:21:26 PM INFO org.glassfish.jersey.filter.LoggingFilter log
10 * Client response received on thread Computer.threadPoolForRemoting [#4]
10 < 200
10 < Content-Type: application/json
10 < Date: Sat, 07 Jun 2014 17:21:26 GMT
10 < Transfer-Encoding: chunked
{"Args":["-D"],"Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":["/usr/sbin/sshd","-D"],"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":null,"Env":["HOME=/","PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","http_proxy=http://10.49.92.33:8080","https_proxy=http://10.49.92.33:8080","no_proxy=localhost,127.0.0.1,*.local,169.254/16,10.20.30.*, 10.49.*"],"ExposedPorts":{"22/tcp":{}},"Hostname":"a5f8401371e0","Image":"0058c31c1c7f","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":{"/data/jenkins":{}},"WorkingDir":""},"Created":"2014-06-07T17:21:26.40599198Z","Driver":"aufs","ExecDriver":"native-0.2","HostConfig":{"Binds":null,"ContainerIDFile":"","Dns":[""],"DnsSearch":null,"Links":null,"LxcConf":null,"NetworkMode":"","PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":"49153"}]},"Privileged":false,"PublishAllPorts":false,"VolumesFrom":null},"HostnamePath":"/var/lib/docker/containers/a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a/hostname","HostsPath":"/var/lib/docker/containers/a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a/hosts","Id":"a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a","Image":"0058c31c1c7f516b2bd07d379e4fd2d5d3691da81ca48dfce7ee97c041bd8192","MountLabel":"","Name":"/thirsty_fermat","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","IPAddress":"172.17.0.16","IPPrefixLen":16,"PortMapping":null,"Ports":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":"49153"}]}},"Path":"/usr/sbin/sshd","ProcessLabel":"","ResolvConfPath":"/var/lib/docker/containers/a5f8401371e0cb919e8090693cc0fa0fd1a0c84334b69457508445adaaef391a/resolv.conf","State":{"ExitCode":0,"FinishedAt":"0001-01-01T00:00:00Z","Paused":false,"Pid":5380,"Running":true,"StartedAt":"2014-06-07T17:21:26.513536354Z"},"Volumes":{"/data/jenkins":"/var/lib/docker/vfs/dir/0611b4dff146f630a51d2d85cf8881e31a08b56e7edb8ff3d05cb14852200f4d"},"VolumesRW":{"/data/jenkins":true}}


Jun 07, 2014 5:21:26 PM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 call
Error in provisioning; slave=null, template=DockerTemplate{image=0058c31c1c7f, parent=DockerCloud{name=docker1, serverUrl=http://localhost:4243}}

Due to this I close this issue.

@hcguersoy
Copy link
Author

Just for the records - run a new trial with the latest jenkins & docker plugin (0.5, all other plugin are latest, too). Now it runs fine.

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

2 participants