jenkinsci / docker-plugin Goto Github PK
View Code? Open in Web Editor NEWJenkins cloud plugin that uses Docker
Home Page: https://plugins.jenkins.io/docker-plugin/
License: MIT License
Jenkins cloud plugin that uses Docker
Home Page: https://plugins.jenkins.io/docker-plugin/
License: MIT License
When I left DNS setting in Configure Jenkins > Cloud > Docker
I get following exception in log and no slave is provisioned:
Feb 02, 2014 10:39:41 PM INFO hudson.slaves.NodeProvisioner update
Started provisioning Image of jenkins-centos-1 from docker-1 with 1 executors. Remaining excess workload:0.0
Feb 02, 2014 10:39:41 PM WARNING com.nirima.jenkins.plugins.docker.DockerCloud$1 call
Error in provisioning
Feb 02, 2014 10:39:51 PM WARNING hudson.slaves.NodeProvisioner update
Provisioned slave Image of jenkins-centos-1 failed to launch
java.lang.NullPointerException
at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNew(DockerTemplate.java:195)
at com.nirima.jenkins.plugins.docker.DockerTemplate.provision(DockerTemplate.java:174)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:118)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:114)
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)
I have fixed this issue by setting DNS up.
Note: I'm no longer able to reproduce this issue by clearing DNS setting.
Still I believe the code might need to be sanitized to prevent NPE.
Hello,
I have a jenkins instance running inside of a docker container.
There I installed and set up the docker plugin.
The plugin is able to communicate with the host and create new containers.
However the ssh connection does not work.
I think it is because the jenkins container tries to connect to the slave container through the forwarded port on the hosts IP.
When I manually nsenter the jenkins container and ssh to the slave through its own ip (172.17.0.X) I can ssh just fine however when I ssh 172.17.42.1 -p XXXXX it fails.
I don't want to install jenkins on the docker host itself but want to keep it inside a container.
Currently all ports are bind on 0.0.0.0
It may be useful (and secured) to be able to fix another IP (for example the IP used to call API ;) )
In my case, Host server have a public address and a internal bridge. I only want to see docker vm accessible by internal bridge :)
More generally, be able to pu our own config in API can be great.
All,
I have got my Docker instance all setup and the docker plugin is spawning a container on my remote machine.
However when it tries to SSH launch I get the following:
[07/11/14 11:16:05] [SSH] Opening SSH connection to REMOTE_HOST_IP:49231.
java.io.IOException: There was a problem while connecting to grass.tandbergtv.lan:49231
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.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:745)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at com.trilead.ssh2.transport.ClientServerHello.readLineRN(ClientServerHello.java:31)
at com.trilead.ssh2.transport.ClientServerHello.(ClientServerHello.java:68)
at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:466)
at com.trilead.ssh2.Connection.connect(Connection.java:758)
... 9 more
[07/11/14 11:16:05] [SSH] Connection closed.
[07/11/14 11:16:05] Launch failed - cleaning up connection
I have checked the docker instance is working.
And after it has been started by Jenkins I am able to manually ssh into the unit.
ssh jenkins@REMOTE_HOST_IP -p 49231
I have also inspected the container whether started manually or via Jenkins and when comparing them there is nothing obviously different and the fact that I can manually SSH into both of them in the same way seems to suggest the issue is not with Docker.
I have double/triple checked the credentials and they are correct.
Is anyone else havig this issue?
I am running:
Jenkins 1.570
with SSH Plugin 1.6 and SSH Credentials 1.6.1
Any help appreciated.
Dan
I've found a bug where if you configure the Docker plugin such as:
Docker Host: 172.17.42.1
Where the Jenkins Master is a Docker Container itself.
When Jenkins spawns new salves in the configuration
it incorrectly tries to perform an SSH connection to
172.17.42.1:49152
for example rather than the
actual IP Address of the newly formed Container.
I am working to migrate some VM's to using docker. I am finding that if both a dumb slave and a docker image match the label conditions for the build, no docker containers are spun up despite there being a backlog of jobs.
See logs bellow. It seems the same problem as the one described in http://stackoverflow.com/questions/22558378/jenkins-build-docker-raise-error-unrecognized-field-execdriver
[Docker] INFO: created container id 22f51f85fa97db41c385e4e6e1bc6661db0e83b1b4b4260e2ab94488a8d72b51 (from image 7d7938c466a5)
FATAL: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "ExecDriver" (Class com.kpelykh.docker.client.model.ContainerInspectResponse), not marked as ignorable
at [Source: com.sun.jersey.client.apache4.ApacheHttpClient4Handler$HttpClientResponseInputStream@1444510c; line: 1, column: 995](through reference chain: com.kpelykh.docker.client.model.ContainerInspectResponse["ExecDriver"])
�[8mha:AAAAWB+LCAAAAAAAAP9b85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=�[0mcom.sun.jersey.api.client.ClientHandlerException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "ExecDriver" (Class com.kpelykh.docker.client.model.ContainerInspectResponse), not marked as ignorable
at [Source: com.sun.jersey.client.apache4.ApacheHttpClient4Handler$HttpClientResponseInputStream@1444510c; line: 1, column: 995](through reference chain: com.kpelykh.docker.client.model.ContainerInspectResponse["ExecDriver"])
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:644)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
at com.kpelykh.docker.client.DockerClient.inspectContainer(DockerClient.java:418)
at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateContainerCommand.execute(CreateContainerCommand.java:68)
at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:57)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:198)
at hudson.model.Build$BuildExecution.doRun(Build.java:159)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:523)
at hudson.model.Run.execute(Run.java:1689)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
All,
Just started to play with this.
I have a Jenkins Master with the plugin installed.
I set it up to point at another machine as a docker host.
I run Test Connection and it reports version 1.0.1.
I setup a cloud with the ID set to:
localhost:5000/jenkins_slave
On the remote machine - This can be seen (docker images)
I setup the access, home dir etc and limit it to 8 instances.
I have a single slave setup, and I was expecting that any subsequent jobs would trigger the creation of a docker container.
However this is not happening.
Under the 'System Configuration->Docker' it shows the image is available with no running containers.
I have enabled debug (System Logs)
com.nirima.jenkins.plugins.docker Set to ALL
But this just confirms connections are made:
Jul 04, 2014 11:32:45 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host Grass URL http://grass.DOMAIN:4243
Jul 04, 2014 11:32:46 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host Grass URL http://grass.DOMAIN:4243
Jul 04, 2014 11:32:46 AM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host Grass URL http://grass.DOMAIN:4243
Any ideas on why nothing much seems to be happening - and why the debug is not very verbose?
Just to inform you that I have created a Docker container and made available publicly to be used as a Jenkins slave build node. Basically, it contains what the Docker plugin's documentation explains, albeit in a bit more polished fashion. You may use the container by pulling it from the central Docker index:
docker pull evarga/jenkins-slave
P.S. The password for the 'jenkins' user is set to 'jenkins'.
Hi,
I got some flood in the compilation list:
(It is just a part of the screen...there is more)
Here is the jenkins logs:
juil. 04, 2014 2:13:02 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host liblogicalaccess-linux-docker-x64 URL http://10.2.3.132:4243
juil. 04, 2014 2:13:02 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host liblogicalaccess-linux-docker-x64 URL http://10.2.3.132:4243
juil. 04, 2014 2:13:02 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
-- a lot more --
....
And after some times this appear on the log:
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
Checking DockerComputer{name=59db36ffcb90@liblogicalaccess-linux-docker-x64, slave=DockerSlave{name=59db36ffcb90@liblogicalaccess-linux-docker-x64, containerId=59db36ffcb90a6d507f037a836ec182e84a6c427a88234588359208a8ce754ea, template=DockerTemplate{image=liryna/liblogicalaccess-x64:build, parent=DockerCloud{name=liblogicalaccess-linux-docker-x64, serverUrl=http://10.2.3.132:4243}}}}
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
currentlyChecking: false
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host liblogicalaccess-linux-docker-x64 URL http://10.2.3.132:4243
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
Checking DockerComputer{name=7264d5e06408@liblogicalaccess-linux-docker-x64, slave=DockerSlave{name=7264d5e06408@liblogicalaccess-linux-docker-x64, containerId=7264d5e0640828923fda547cb2e8aefc33fdb93eb6a380984b484cba598cf7f8, template=DockerTemplate{image=liryna/liblogicalaccess-x64:build, parent=DockerCloud{name=liblogicalaccess-linux-docker-x64, serverUrl=http://10.2.3.132:4243}}}}
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
currentlyChecking: false
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host liblogicalaccess-linux-docker-x64 URL http://10.2.3.132:4243
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
Checking DockerComputer{name=742542d16376@liblogicalaccess-linux-docker-x64, slave=DockerSlave{name=742542d16376@liblogicalaccess-linux-docker-x64, containerId=742542d163761be500d9d0abc0641931b8f5d174631a3e223f8a8fc956ed8e24, template=DockerTemplate{image=liryna/liblogicalaccess-x64:build, parent=DockerCloud{name=liblogicalaccess-linux-docker-x64, serverUrl=http://10.2.3.132:4243}}}}
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
currentlyChecking: false
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud connect
Building connection to docker host liblogicalaccess-linux-docker-x64 URL http://10.2.3.132:4243
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
Checking DockerComputer{name=77f4c7bb539f@liblogicalaccess-linux-docker-x64, slave=DockerSlave{name=77f4c7bb539f@liblogicalaccess-linux-docker-x64, containerId=77f4c7bb539f4e97fc502a2eb8ea36ef4ab6badcbe79a0a18fe191d101b8af93, template=DockerTemplate{image=liryna/liblogicalaccess-x64:build, parent=DockerCloud{name=liblogicalaccess-linux-docker-x64, serverUrl=http://10.2.3.132:4243}}}}
juil. 04, 2014 2:17:06 PM INFO com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
currentlyChecking: false
-- a lot more --
....
If I look on the slaves informations, they are all created by SYSTEM and attached to none project.
The container is only used by one project that launched every 12 hour.
Every slaves are and stay connected:
4f3dc35bc26a liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49193->22/tcp desperate_galileo
ff8fada8b2dd liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49192->22/tcp jovial_babbage
a34dd1ccd0e8 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49190->22/tcp angry_brown
1d474fb1a996 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49188->22/tcp loving_goldstine
b0b9690858ba liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49187->22/tcp ecstatic_turing
09bee119fef4 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49186->22/tcp focused_babbage
084418970dc0 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49185->22/tcp compassionate_euclid
800241ca8fb9 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49184->22/tcp suspicious_lalande
a08d1c776b81 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49183->22/tcp drunk_sammet
396d9807c095 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49182->22/tcp pensive_bartik
bddc4f55c6b6 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49181->22/tcp cocky_kowalevski
1993e3ead112 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49180->22/tcp insane_albattani
8edc8be601ba liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49179->22/tcp dreamy_hopper
c3bebb17f3c9 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49178->22/tcp trusting_heisenberg
2038d85b6677 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49177->22/tcp pensive_heisenberg6
08c2ef098a3d liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49176->22/tcp tender_engelbart
aaff07ccf484 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49175->22/tcp berserk_wright
4c41da41328a liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49174->22/tcp sleepy_hypatia
1e28a361580f liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49173->22/tcp mad_torvalds
f74e2722aa9c liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49172->22/tcp cranky_almeida
81b44c48cbbb liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49171->22/tcp desperate_brown
b1de8691cc0f liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49170->22/tcp sick_pare
1560209d7381 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49169->22/tcp prickly_bardeen
77f4c7bb539f liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49167->22/tcp cranky_fermat
3f7eae37fbc3 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49166->22/tcp pensive_hopper
7264d5e06408 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49165->22/tcp jolly_franklin
521bfad2a5e3 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49164->22/tcp jolly_lovelace
f6a714609d61 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49163->22/tcp tender_hopper
ccf7b6786571 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49162->22/tcp romantic_kowalevski
f119147e663f liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49161->22/tcp loving_kirch
0b79ef5ff0b2 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49160->22/tcp suspicious_jones
f93fe1c5ed76 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49159->22/tcp evil_leakey
496e51bba6c7 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49158->22/tcp clever_curie
59db36ffcb90 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49157->22/tcp prickly_euclid
49a4df1257ec liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49156->22/tcp hopeful_lalande
9916856b367d liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49155->22/tcp hungry_ardinghelli
742542d16376 liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49154->22/tcp insane_nobel
96e80bd6181a liryna/liblogicalaccess-x64:build /usr/sbin/sshd -D About an hour ago Up About an hour 0.0.0.0:49153->22/tcp furious_ardinghelli
I use docker 1.0.0 on debian jessie.
My Jenkins is ver. 1.564 on windows with docker plugin 0.6.2.
I usually restart docker service to make them disappear.
I can not tell when it happen...
Our office is running LTS releases of Jenkins (currently 1.532.2). It seems you're riding the Latest&Greatest releases pretty closely. Would it be possible to make this plugin compatible with LTS, or are there any specific features or fixes you rely on that have been introduced since the last LTS?
Hi,
Since I've upgraded from 0.6.2 to 0.7 my containers doesn't start.
My container ID is configured as "wheezy64:jenkins"
jenkins.log: WARNING: Failed to count the # of live instances on Docker (with a java traceback "HTTP 500 Internal Server Error")
docker.log:
2014/07/28 14:59:45 POST /images/create?fromImage=wheezy64:jenkins&tag=latest
[fef004b9] +job pull(wheezy64:jenkins, latest)
Invalid repository name (wheezy64:jenkins), only [a-z0-9-_.] are allowed
Well, since 0.7 docker-plugin seem to try start "wheezy64:jenkins:latest" wich is not a valid image identifier.
As a workaround I've renamed my image to "wheezy64_jenkins:latest" and configured "wheezy64_jenkins" in jenkins.
There is a new way to configure the image + tag since 0.7 ?
Thanks.
jenkins: 1.574
docker-plugin: 0.7
docker: 1.1.2
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
Upstream issue: kpelykh/docker-java#17
It doesn't store Docker Cloud name
and results into following exception:
FATAL: Cannot list cloud for docker action
java.lang.RuntimeException: Cannot list cloud for docker action
at com.nirima.jenkins.plugins.docker.builder.DockerBuilderControlCloudOption.getCloud(DockerBuilderControlCloudOption.java:35)
at com.nirima.jenkins.plugins.docker.builder.DockerBuilderControlOptionProvisionAndStart.execute(DockerBuilderControlOptionProvisionAndStart.java:25)
at com.nirima.jenkins.plugins.docker.builder.DockerBuilderControl.perform(DockerBuilderControl.java:60)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535)
at hudson.model.Run.execute(Run.java:1732)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
If I change Connection Timeout
or Read Timeout
in the UI, apply then save. The values get reverted to the defaults in the UI. However the new values I set are persisted on disk to the config.xml file. Not sure which values are actually being used.
Hi,
I'm trying to set up a job that will spawn a slave that starts multiple processes via supervisor but the following error occurs
Jun 17, 2014 8:06:22 PM com.nirima.jenkins.plugins.docker.DockerComputerLauncher getSSHLauncher
INFO: Creating slave SSH launcher for ip:port
[06/17/14 20:06:23] SSH Launch of ba41aae18792@boot2docker on ip failed in 1,005 ms
Jun 17, 2014 8:06:23 PM com.nirima.jenkins.plugins.docker.DockerCloud$1 call
SEVERE: Error in provisioning; slave=DockerSlave{name=containerName, containerId=container, template=DockerTemplate{image=imageName, parent=DockerCloud{name=boot2docker, serverUrl=http://ip:port}}}, template=DockerTemplate{image=imageName, parent=DockerCloud{name=boot2docker, serverUrl=http://ip:port}}
java.util.concurrent.ExecutionException: java.io.IOException: Slave failed to connect, even though the launcher didn't report it. See the log output for details.
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:132)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:116)
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.io.IOException: Slave failed to connect, even though the launcher didn't report it. See the log output for details.
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:249)
... 5 more
The following is the slave log
[06/17/14 20:16:52] [SSH] Opening SSH connection to ip:port.
java.io.IOException: There was a problem while connecting to ip:port
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.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.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at com.trilead.ssh2.transport.ClientServerHello.readLineRN(ClientServerHello.java:31)
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)
... 9 more
[06/17/14 20:16:53] [SSH] Connection closed.
[06/17/14 20:16:53] Launch failed - cleaning up connection
which doesn't seem too helpful.
I am able to run the image on its own and can ssh into it and letting the image run with the default usr/sbin/sshd -D
or even putting that in the Docker Command
field works fine. To make it even more confusing, during the ~10 seconds the slave is made but (offline)(suspended)
I am able to go to the node, click Launch Slave Agent
and Try Posting
and it appears to ssh and start the slave correctly
[06/17/14 20:26:07] [SSH] Opening SSH connection to ip:port.
[06/17/14 20:26:07] [SSH] Authentication successful.
[06/17/14 20:26:07] [SSH] The remote users environment is:
<env_vars>
[06/17/14 20:26:07] [SSH] Checking java version of java
[06/17/14 20:26:07] [SSH] java -version returned 1.7.0_55.
[06/17/14 20:26:07] [SSH] Starting sftp client.
[06/17/14 20:26:07] [SSH] Copying latest slave.jar...
[06/17/14 20:26:07] [SSH] Copied 415,272 bytes.
Expanded the channel window size to 4MB
[06/17/14 20:26:07] [SSH] Starting slave process: cd "/jenkins" && java -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 2.42
This is a Unix slave
Slave successfully connected and online
I'm somewhat new to jenkins, so I am unsure of what the actual command being used to ssh into the slave and launch it is, but any help would be appreciated.
It doesn't seem like there's a way to enforce an instance cap at the machine (docker host) level rather than image level. This poses a problem when we have several different images, but only want one or two instances to run on a box at a time (to avoid overloading the box).
I'm unable to add multiple images to a single docker cloud on the Jenkins configure page (/configure). I get a javascript error popup when clicking save/apply, then a stack trace if I click either button a second time.
This is with Jenkins 1.552 and Docker Plugin 0.2
As a workaround, I created multiple Docker "clouds", and added one image each.
I've attached screenshots showing:
1: the current config with one image
2: adding a second config, before clicking save/apply
3/4: the javascript alert I get in Chrome and Safari
Hi,
I am somewhat new to jenkins and Docker and am trying to create a new node with the Docker Plugin, however when I select "Ok" to create a "Dumb Slave" I get the below error. I'm unsure how to proceed to fix this since it appears that a method is just plain missing from the DescriptorImpl.
Am using Jenkins 1.565 and any help would be appreciated, thanks!
May 29, 2014 4:33:24 PM hudson.ExpressionFactory2$JexlExpression evaluate
WARNING: Caught exception evaluating: descriptor.calcFillSettings(field,attrs) in /computer/createItem. Reason: java.lang.IllegalStateException: class com.nirima.jenkins.plugins.docker.DockerComputerLauncher$DescriptorImpl doesn't have the doFillCredentialsIdItems method for filling a drop-down list
java.lang.IllegalStateException: class com.nirima.jenkins.plugins.docker.DockerComputerLauncher$DescriptorImpl doesn't have the doFillCredentialsIdItems method for filling a drop-down list
at hudson.model.Descriptor.calcFillSettings(Descriptor.java:398)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
at org.apache.commons.jelly.parser.EscapingExpression.evaluate(EscapingExpression.java:24)
at org.apache.commons.jelly.impl.ExpressionScript.run(ExpressionScript.java:66)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
at org.kohsuke.stapler.jelly.JellyRequestDispatcher.forward(JellyRequestDispatcher.java:55)
at hudson.slaves.NodeDescriptor.handleNewNodePage(NodeDescriptor.java:91)
at hudson.model.ComputerSet.doCreateItem(ComputerSet.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:210)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
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)
How do you go about adding a Docker Node? I sthis even a supported feature? I keep getting Java exceptions I don't understand :/
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
Are there build instructions anywhere for building this from source?
I have the jdk installed and maven. I run maven clean install
but I keep getting errors. Btw I am not a Java expert.
INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.585s
[INFO] Finished at: Tue Jul 22 00:44:45 UTC 2014
[INFO] Final Memory: 30M/89M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project docker-plugin: Compilation failure: Compilation failure:
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[7,39] error: package com.nirima.docker.client.command does not exist
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[8,39] error: package com.nirima.docker.client.command does not exist
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[7,39] error: package com.nirima.docker.client.command does not exist
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[8,39] error: package com.nirima.docker.client.command does not exist
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[57,67] error: cannot find symbol
[ERROR] symbol: method fromClient(DockerClient)
[ERROR] location: class Builder
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[59,8] error: cannot find symbol
[ERROR] symbol: class BuildCommandResponse
[ERROR] location: class DockerBuilderPublisher
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[59,78] error: cannot find symbol
[ERROR] symbol: class BuildCommandResponse
[ERROR] location: class DockerBuilderPublisher
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[60,19] error: cannot find symbol
[ERROR] symbol: class BuildCommandResponse
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[74,33] error: cannot find symbol
[ERROR] symbol: method createBuildCommand()
[ERROR] location: variable client of type DockerClient
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[106,12] error: cannot find symbol
[ERROR] symbol: class PushCommandResponse
[ERROR] location: class DockerBuilderPublisher
[ERROR] /opt/docker-plugin/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java:[106,53] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I am seeing Jenkins hanging when this plugin is loaded if the docker server has crashed
I see repeated requests such as the following:
4 * Sending client request on thread Handling GET / : RequestHandlerThread[#13]
4 > GET http:// docker1.mydomain:4243/containers/deadbeefdeadbeef/json
This is preventing Jenkins from displaying the Jobs screen, and the manage Jenkins screen. Other interfaces such as /pluginManager/installed continue to work. If you can get other screens to load it shows the container in the suspended state.
Disabling the plugin makes Jenkins work again. Restoring the docker server and then restarting jenkins (required) will also fix the issue, log will show
DELETE http:// docker1.mydomain:4243/containers/deadbeefdeadbeef after startup
Plugin Version: 0.6.1
Jenkins: 1.567
Hi,
as far as I can see there is no possibility to add additional docker parameters while starting a container.
It would be nice if e.g. it is possible to provide the possibility to tell docker to use volumes using the -v option.
Bye
Halil
I am seeing behavior where the plugin is launching the wrong image and then everything is deadlocked because nothing is pending to be built on that image.
Jun 24, 2014 11:54:34 AM com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
INFO: Idle timeout: ca6d257006e1@Docker1
Jun 24, 2014 11:54:34 AM com.nirima.jenkins.plugins.docker.DockerRetentionStrategy check
INFO: Terminating DockerComputer{name=ca6d257006e1@Docker1, slave=DockerSlave{name=ca6d257006e1@Docker1, containerId=ca6d257006e1b12c5d6ad1c04fbdea2d4acba5000bfca100c1583925ad288c23, template=DockerTemplate{image=fedora_jenkins_clang, parent=DockerCloud{name=Docker1, serverUrl=REDACTED}}}
Jun 24, 2014 11:54:34 AM com.nirima.jenkins.plugins.docker.DockerCloud connect
INFO: Building connection to docker host Docker1 URL REDACTED
Jun 24, 2014 11:54:34 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run
SEVERE: I/O error in channel ca6d257006e1@Docker1
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2303)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2772)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:778)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:278)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:40)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
Jun 24, 2014 11:54:38 AM com.nirima.jenkins.plugins.docker.DockerCloud connect
INFO: Building connection to docker host Docker1 URL REDACTED
Jun 24, 2014 11:54:43 AM com.nirima.jenkins.plugins.docker.DockerCloud provision
INFO: Excess workload after pending Spot instances: 1
Jun 24, 2014 11:54:43 AM com.nirima.jenkins.plugins.docker.DockerCloud connect
INFO: Building connection to docker host Docker1 URL REDACTED
Jun 24, 2014 11:54:43 AM com.nirima.jenkins.plugins.docker.DockerCloud connect
INFO: Building connection to docker host Docker1 URL REDACTED
Jun 24, 2014 11:54:43 AM com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave
INFO: Provisioning for AMI rhel6_jenkins:6.5; Estimated number of total slaves: 0; Estimated number of slaves for ami rhel6_jenkins:6.5: 0
Launching rhel6_jenkins:6.5
Jun 24, 2014 11:54:43 AM hudson.slaves.NodeProvisioner update
INFO: Started provisioning Image of rhel6_jenkins:6.5 from Docker1 with 1 executors. Remaining excess workload:7.1525574E-7
Except nothing wants that image, so there is no reason to have launched it.
Further down in the log is also the following which may mean this is related to #41
SEVERE: Failed to remove instance ca6d257006e1b12c5d6ad1c04fbdea2d4acba5000bfca100c1583925ad288c23 for slave ca6d257006e1@Docker1 due to exception
javax.ws.rs.ProcessingException: java.net.SocketTimeoutException: Read timed out
at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:184)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:227)
at org.glassfish.jersey.client.JerseyInvocation$3.call(JerseyInvocation.java:693)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:422)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:689)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:405)
at org.glassfish.jersey.client.proxy.WebResourceFactory.invoke(WebResourceFactory.java:318)
at com.sun.proxy.$Proxy73.removeContainer(Unknown Source)
at com.nirima.docker.client.DockerClient$Container.remove(DockerClient.java:333)
at com.nirima.jenkins.plugins.docker.DockerSlave._terminate(DockerSlave.java:103)
at hudson.slaves.AbstractCloudSlave.terminate(AbstractCloudSlave.java:62)
at com.nirima.jenkins.plugins.docker.DockerSlave.retentionTerminate(DockerSlave.java:213)
at com.nirima.jenkins.plugins.docker.DockerRetentionStrategy.check(DockerRetentionStrategy.java:55)
at com.nirima.jenkins.plugins.docker.DockerRetentionStrategy.check(DockerRetentionStrategy.java:14)
at hudson.slaves.ComputerRetentionWork.doRun(ComputerRetentionWork.java:66)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:698)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:641)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1218)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:276)
at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:182)
... 27 more
docker-plugin rely on jdocker 0.2.5 but only 0.2.4 has been pushed on maven repo
I installed docker-plugin 0.3.5 in Jenkins and tried to configure a new Docker image to use. In /var/lib/jenkins/jenkins.log, the error message shows:
Jun 6, 2014 6:23:54 PM org.glassfish.jersey.filter.LoggingFilter log
INFO: 5 * Sending client request on thread Computer.threadPoolForRemoting [#3]
5 > GET http://testserver:4243/containers/52102dc4d536e31163ff2a6d46b570b73872ffb8106912110eb162e0270c8d7c/json
Jun 6, 2014 6:23:54 PM org.glassfish.jersey.filter.LoggingFilter log
INFO: 6 * Client response received on thread Computer.threadPoolForRemoting [#3]
6 < 200
6 < Content-Length: 1794
6 < Content-Type: application/json
6 < Date: Sat, 07 Jun 2014 01:23:54 GMT
{"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/sb
in:/usr/bin:/sbin:/bin"],"ExposedPorts":{"22/tcp":{}},"Hostname":"52102dc4d536","Image":"jenkins-1","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":
"","Volumes":null,"WorkingDir":""},"Created":"2014-06-07T01:23:53.978109346Z","Driver":"aufs","ExecDriver":"native-0.2","HostConfig":{"Binds":null,"ContainerIDFile":"","Dns":["8.8.8.8"],"DnsSearch":null,"Links":null,"LxcConf":null,"Netwo
rkMode":"","PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":"49153"}]},"Privileged":false,"PublishAllPorts":false,"VolumesFrom":null},"HostnamePath":"/var/lib/docker/containers/52102dc4d536e31163ff2a6d46b570b73872ffb8106912110eb1
62e0270c8d7c/hostname","HostsPath":"/var/lib/docker/containers/52102dc4d536e31163ff2a6d46b570b73872ffb8106912110eb162e0270c8d7c/hosts","Id":"52102dc4d536e31163ff2a6d46b570b73872ffb8106912110eb162e0270c8d7c","Image":"a29595feaaae1aecf5401
71f267407dc423e5eed4a1d71463d2c6e0fa903037f","MountLabel":"","Name":"/pensive_elion","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","IPAddress":"172.17.0.3","IPPrefixLen":16,"PortMapping":null,"Ports":{"22/tcp":[{"HostIp":
"0.0.0.0","HostPort":"49153"}]}},"Path":"/usr/sbin/sshd","ProcessLabel":"","ResolvConfPath":"/var/lib/docker/containers/52102dc4d536e31163ff2a6d46b570b73872ffb8106912110eb162e0270c8d7c/resolv.conf","State":{"ExitCode":0,"FinishedAt":"000
1-01-01T00:00:00Z","Paused":false,"Pid":9548,"Running":true,"StartedAt":"2014-06-07T01:23:54.105957483Z"},"Volumes":{},"VolumesRW":{}}
Jun 6, 2014 6:23:54 PM com.nirima.jenkins.plugins.docker.DockerCloud$1 call
SEVERE: Error in provisioning; slave=null, template=DockerTemplate{image=jenkins-1, parent=DockerCloud{name=docker-1, serverUrl=http://testserver:4243}}
java.lang.NullPointerException
at com.nirima.jenkins.plugins.docker.DockerTemplate.provision(DockerTemplate.java:192)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:130)
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$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:679)
Jun 6, 2014 6:24:03 PM hudson.slaves.NodeProvisioner update
WARNING: Provisioned slave Image of jenkins-1 failed to launch
java.lang.NullPointerException
at com.nirima.jenkins.plugins.docker.DockerTemplate.provision(DockerTemplate.java:192)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.call(DockerCloud.java:130)
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$Sync.innerRun(FutureTask.java:334)
Upon doing more debugging, I found that the containerId was not being parsed properly (https://github.com/jenkinsci/docker-plugin/blob/docker-plugin-0.3.5/src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplate.java#L242) due to an issue with jDocker.
I've submitted a pull request (nirima/jDocker#1) in jDocker and logging this as an issue. I'm not sure how this ever worked, since the Id field has always been case-sensitive.
This plugin doesn't seem to appear in the Jenkins plugins list?
Hi,
I would be nice to update the documentation since many option have been added.
Is that possible to have refresh of it ? (https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin)
https://github.com/jenkinsci/docker-plugin/blob/master/src/main/java/com/nirima/jenkins/plugins/docker/DockerRetentionStrategy.java#L50-L51
configures the idle timeout to be 0 seconds. It would be nice if this was configurable so that the docker containers could stick around for a bit to handle more jobs (or potentially troubleshooting the container).
Would it be possible to be able to use different images for different projects? Or maybe configure different docker host per project
When I do not provide DNS in docker cloud configuration then the default Docker DNS is overriden with empty nameserver (/etc/resolv.conf contains only nameserver keyword, without any IP)
I guess this conditional:
if( dnsHosts.length > 0 )
containerConfig.setDns(dnsHosts);
does not work for some reason
Hi,
My Master is a Windows and slave who host the containers is on debian.
I have try evarga/jenkins-slave container and my own. Each times I have this error:
(I have install git on both and commit)
Cloning repository git@***:***
> git.exe init /home/jenkins
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /home/jenkins
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$4.execute(CliGitAPIImpl.java:476)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:379)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: hudson.plugins.git.GitException: Error performing command: git.exe init /home/jenkins
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1332)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1301)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1297)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1084)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$4.execute(CliGitAPIImpl.java:474)
... 12 more
Caused by: java.io.IOException: Cannot run program "git.exe" (in directory "/home/jenkins"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:775)
at hudson.Launcher$ProcStarter.start(Launcher.java:355)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1321)
... 16 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 21 more
ERROR: null
Otherwise I have no problem if I select directly the slave debian.
Does someones have a idea about it ?
I use version 0.6.2.
Sadly, some of us are still running Java 6 and until Jenkins drops support it will probably stay that way.
Failed to load com.nirima.jenkins.plugins.docker.DockerCloud$DescriptorImpl
java.lang.UnsupportedClassVersionError: com/nirima/docker/client/DockerException : Unsupported major.minor version 51.0
Getting this error when trying to launch a slave with Docker 1.1.0:
Jul 09, 2014 4:02:40 PM WARNING com.nirima.jenkins.plugins.docker.DockerCloud provision
Failed to count the # of live instances on Docker
javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:917)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:822)
at org.glassfish.jersey.client.JerseyInvocation.access$600(JerseyInvocation.java:90)
at org.glassfish.jersey.client.JerseyInvocation$3.call(JerseyInvocation.java:693)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:422)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:689)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:405)
at org.glassfish.jersey.client.proxy.WebResourceFactory.invoke(WebResourceFactory.java:318)
at com.sun.proxy.$Proxy76.inspectImage(Unknown Source)
at com.nirima.docker.client.DockerClient$Image.inspect(DockerClient.java:582)
at com.nirima.jenkins.plugins.docker.DockerCloud.countCurrentDockerSlaves(DockerCloud.java:242)
at com.nirima.jenkins.plugins.docker.DockerCloud.addProvisionedSlave(DockerCloud.java:262)
at com.nirima.jenkins.plugins.docker.DockerCloud.provision(DockerCloud.java:146)
at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:368)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
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)
Docker daemon is configured to listen on tcp://0.0.0.0:2375
and Jenkins has Docker Host configured as http://localhost:2375
.
Test Connection in Jenkins returns successfully.
How does the plugin determine if a slave is online or offline? The jenkins master can communicate with the docker host and create/list/remove containers. It can launch containers, but when I look using docker ps -a
, they all have an exit status of -1 or 1, depending on what image I use.
I've tried using a few different images, including the https://index.docker.io/u/evarga/jenkins-slave/.
Any ideas or directions you can point me in for more info as to what it could be doing wrong?
Docker plugin version 0.3.4
org.jenkins-ci.main:jenkins-war:1.561
Docker version 0.10.0, build dc9c28f
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=d20528414daa, slave=DockerSlave{containerId=d20528414daac1d162d300eb766e363202e1205a78c88951999e5b64fabc2f75}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=d4a9854a0ccd, slave=DockerSlave{containerId=d4a9854a0ccdfd42c01781d658164e8511d91c8ae09679963340e1ae4409e2d6}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=d95e0947708e, slave=DockerSlave{containerId=d95e0947708e76b0eb35d76816b5c1ee6cda216a17113922a7614b0d59182338}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=db36bd416362, slave=DockerSlave{containerId=db36bd41636233f3c6f30eeb2dda33d0858ba65d3157fbc48040784062e0b94b}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=e1a00b5b7080, slave=DockerSlave{containerId=e1a00b5b7080d71d346686751ee9fad8cc255331317aaa9bd3c93f5495bfbd67}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=e8a7244e7eb4, slave=DockerSlave{containerId=e8a7244e7eb43f5d9bad306e55c5d98a61e88cf383931a6d9bde1b3a1b7ffe2d}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=e9795c80f4bb, slave=DockerSlave{containerId=e9795c80f4bba9a245d672e898b670fd9e8f5389c8323d2799acc3f2a9ac40d4}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=f47909830314, slave=DockerSlave{containerId=f479098303144456592f8e37c73c2f97f7eb33f52a0c2770f21a891ce5fbccff}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=f616dc3773d8, slave=DockerSlave{containerId=f616dc3773d8977ca04f2a532b5f2ef168ee5b3f920a8c9dcda07a9ca156a48b}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=fc48313d35ac, slave=DockerSlave{containerId=fc48313d35ac45f3bd8f1042c7fbe965ab2ffafaf67514e4217c410553a4ab10}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=fec55a3efb63, slave=DockerSlave{containerId=fec55a3efb63b894295cd434bf4f524b40184fda7a30de84477a570206157590}} isAcceptingTasks true
May 01, 2014 10:12:00 PM INFO com.nirima.jenkins.plugins.docker.DockerComputer isAcceptingTasks
Computer DockerComputer{name=ffb33460956b, slave=DockerSlave{containerId=ffb33460956b6c8a72e2447b2444930d7600a63c6072f8b1bbd17744ba53144c}} isAcceptingTasks true
when trying to put guilhem/jenkins-slave-deb-build
as docker ID, plugin fail:
1 * Sending client request on thread jenkins.util.Timer [#5]
1 > GET http://192.168.133.1:4243/images/guilhem%2Fjenkins-slave-deb-build/json
mai 13, 2014 4:06:16 PM INFO org.glassfish.jersey.filter.LoggingFilter log
2 * Client response received on thread jenkins.util.Timer [#5]
2 < 404
2 < Connection: close
2 < Content-Length: 47
2 < Content-Type: text/plain; charset=utf-8
2 < Date: Tue, 13 May 2014 16:06:16 GMT
No such image: guilhem/jenkins-slave-deb-build
mai 13, 2014 4:06:16 PM ATTENTION com.nirima.jenkins.plugins.docker.DockerCloud provision
Failed to count the # of live instances on Docker
javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:917)
at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:822)
at org.glassfish.jersey.client.JerseyInvocation.access$600(JerseyInvocation.java:90)
at org.glassfish.jersey.client.JerseyInvocation$3.call(JerseyInvocation.java:693)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:422)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:689)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:405)
at org.glassfish.jersey.client.proxy.WebResourceFactory.invoke(WebResourceFactory.java:318)
at com.sun.proxy.$Proxy70.inspectImage(Unknown Source)
at com.nirima.docker.client.DockerClient$Image.inspect(DockerClient.java:473)
at com.nirima.jenkins.plugins.docker.DockerCloud.addProvisionedSlave(DockerCloud.java:203)
at com.nirima.jenkins.plugins.docker.DockerCloud.provision(DockerCloud.java:120)
at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:281)
at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:368)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
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)
Hi. I am completely new to using Docker (or slaves in general) with Jenkins, and am blindly trying to follow the docs at https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin
I created a docker image as described, but when I tried to add a new node I got the error above. I suspect I am doing something very stupid (for example, I don't know what the address / URL would be so left it blank).
Any help appreciated. Is there somewhere I can go to ask questions? Sorry if I've done something dumb.
Thanks,
Andrew
PS Jenkins 1.549 on CentOS 6.5 with OpenJDK 1.7.0_51; Docker plugin 0.1
PPS I am wondering if I need to enable some kind of cloud plugin; yours is the only plugin I have added to the standard install (all standard plugins are at latest version).
javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"docker node","nodeDescription":"","numExecutors":"1","remoteFS":"/home/jenkins","labelString":"","mode":"NORMAL","":["com.nirima.jenkins.plugins.docker.DockerComputerLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"com.nirima.jenkins.plugins.docker.DockerComputerLauncher","host":"","credentialsId":"","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":""},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"},"type":"hudson.slaves.DumbSlave"}
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:210)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
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.lang.RuntimeException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"docker node","nodeDescription":"","numExecutors":"1","remoteFS":"/home/jenkins","labelString":"","mode":"NORMAL","":["com.nirima.jenkins.plugins.docker.DockerComputerLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"com.nirima.jenkins.plugins.docker.DockerComputerLauncher","host":"","credentialsId":"","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":""},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"},"type":"hudson.slaves.DumbSlave"}
at hudson.model.Descriptor.newInstance(Descriptor.java:576)
at hudson.model.ComputerSet.doDoCreateItem(ComputerSet.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
... 46 more
Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.slaves.DumbSlave from {"name":"docker node","nodeDescription":"","numExecutors":"1","remoteFS":"/home/jenkins","labelString":"","mode":"NORMAL","":["com.nirima.jenkins.plugins.docker.DockerComputerLauncher","hudson.slaves.RetentionStrategy$Always"],"launcher":{"stapler-class":"com.nirima.jenkins.plugins.docker.DockerComputerLauncher","host":"","credentialsId":"","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":""},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true"},"type":"hudson.slaves.DumbSlave"}
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396)
at hudson.model.Descriptor.newInstance(Descriptor.java:567)
... 57 more
Caused by: java.lang.IllegalArgumentException: Failed to convert the launcher parameter of the constructor public hudson.slaves.DumbSlave(java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.model.Node$Mode,java.lang.String,hudson.slaves.ComputerLauncher,hudson.slaves.RetentionStrategy,java.util.List) throws java.io.IOException,hudson.model.Descriptor$FormException
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:686)
at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
... 60 more
Caused by: java.lang.IllegalArgumentException: Failed to instantiate class hudson.slaves.ComputerLauncher from {"stapler-class":"com.nirima.jenkins.plugins.docker.DockerComputerLauncher","host":"","credentialsId":"","port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":""}
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:684)
... 62 more
Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class com.nirima.jenkins.plugins.docker.DockerComputerLauncher
at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:176)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:671)
at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
... 64 more
When launching Docker slave the defult CMD in container is always overriden:
src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplate.java:
containerConfig.setCmd(new String[]{"/usr/sbin/sshd", "-D"});
Please allow to run default CMD as defined in Dockerfile of slave container or at least add config option where it would be possible to provide a command that should be run
There is some confusion in code between this docker notions.
Before 0.7, it was not a problem as we can set image to repo:tag
like guilhem/vagrant-ubuntu:14.04
.
But it's not possible anymore because (in particular) of this line: src/main/java/com/nirima/jenkins/plugins/docker/DockerCloud.java#L255
as it oblige tag latest
(and fail if a :
is given)
What we have to do is to add 2 new params, repository
and tag
.
If an image is given (a SHA) we can use it but can pull it.
If a repo + tag (by default "latest") is given, we can pull it if necessary.
I try coding it... it's over my java skills :(
We are trying to configure a build-chain in which every job is a step towards production.
For example: init_ws -> sanity_check -> build -> unit_test -> coverage -> package
We would like to start the sanity_check with the resulting (tagged) image from the init_ws job, then use the resulting image for build step, and reuse the build result for unit and coverage steps. Then use the clean build step to create a package.
If only we could pass the current jobs image tag to the next job which in turn will run that container as starting point.
Seeing the following issue that gradually builds up over time. Containers get into a startup loop (for transient IO related startup issues it seems, where the agent fails to fully launch), but the prominent issue is they subsequently can't be deleted from Jenkins, the "delete node" option just hangs, and eventually no more containers are able to be created, requiring a Jenkins restart.
The following issue repeats in the slave log (container doesn't exist at this point):
[05/20/14 21:21:02] [SSH] Opening SSH connection to docker-ci-1.us.com:50368.
java.io.IOException: There was a problem while connecting to docker-ci-1.us.com:50368
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.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.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:346)
at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:459)
at com.trilead.ssh2.Connection.connect(Connection.java:758)
... 9 more
[05/20/14 21:21:02] [SSH] Connection closed.
[05/20/14 21:21:02] Launch failed - cleaning up connection
Log from the docker host shows the API returning 404, but the container persists in Jenkins:
[root@docker-ci-1 ~]# tail -f /var/log/docker
No such container: 05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
[7b302e61] -job stop(05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73) = ERR (1)
[error] server.go:1011 Error: No such container: 05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
[error] server.go:90 HTTP Error: statusCode=404 No such container: 05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
2014/05/20 21:35:47 DELETE /containers/05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
[7b302e61] +job container_delete(05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73)
No such container: 05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
[7b302e61] -job container_delete(05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73) = ERR (1)
[error] server.go:1011 Error: No such container: 05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
[error] server.go:90 HTTP Error: statusCode=404 No such container: 05fd5f2e506af30fb8eb5ac4620cd395ace523f7802c623a6f7a38656c8eea73
I am trying to pass -lxc-conf options to a docker instance.
I put this into the docker command but am not convinced it is working.
Should it?
field Volumes
now has to be filled in 0.6.x version, originally it can be empty. (I am new to docker)
Log error like this
Jun 17, 2014 9:04:52 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 7 * Sending client request on thread Computer.threadPoolForRemoting [#3]
7 > POST http://192.168.56.153:4243/containers/bed6bd5bb8199eaec7c05837a6adcbb4bbc3f831c29890126e458ed06938e7fd/start
7 > Content-Type: application/json
{"Binds":[""],"PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0"}]},"Privileged":false,"Dns":[""]}
Jun 17, 2014 9:04:52 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 8 * Client response received on thread Computer.threadPoolForRemoting [#3]
8 < 500
8 < Content-Length: 87
8 < Content-Type: text/plain; charset=utf-8
8 < Date: Tue, 17 Jun 2014 01:04:52 GMT
Could not create local directory '' for bind mount: mkdir : no such file or directory!
After checked with https://docs.docker.com/reference/api/docker_remote_api_v1.12/ , I just hacked to put /tmp:/tmp
to field volumes
though I don't need this for my case.
Can this be set something in template and will be nice to put it in base configuration, so far it is in "Advance" configuration
Would appreciate seeing a new plugin release containing the fix for empty Dns string:
c55fcca
After a fiasco with the docker server crashing, provisioning is messed up, a slave that does not exist is registered with Jenkins but can not be removed and a container was spun up but was not registered with Jenkins as a slave (Appears in Manage Jenkins->Docker).
Recurring error in log:
Timer task hudson.slaves.ComputerRetentionWork@77fb74a failed
java.lang.NullPointerException
at hudson.slaves.RetentionStrategy$Demand.check(RetentionStrategy.java:214)
at hudson.slaves.RetentionStrategy$Demand.check(RetentionStrategy.java:158)
at hudson.slaves.ComputerRetentionWork.doRun(ComputerRetentionWork.java:66)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Attempting to delete slave gives:
Error while serving http://jenkins.domain/computer/f96ef5ceac83@Docker1/doDelete
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:210)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:202)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:180)
at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:90)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at hudson.slaves.AbstractCloudComputer.doDoDelete(AbstractCloudComputer.java:57)
... 83 more
I have noticed that jDocker reports it works against v1.8+ of the REST API for Docker.
However the images part is incorrect:
https://docs.docker.com/reference/api/docker_remote_api/#v17 contained a change to how repo and tags were reported.
I would raise an issue on the jDocker plugin - but that option seems to be missing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.