jenkinsci / docker-plugin

Jenkins cloud plugin that uses Docker
https://plugins.jenkins.io/docker-plugin/
MIT License
489 stars 318 forks source link

Trying to add additional tags throws NPE #341

Closed jphelion closed 7 years ago

jphelion commented 9 years ago

Hi, We are having a problem with adding additional tags. We try to commit, add additional tags and then push. Commit works fine but when additional tags are added a NPE is thrown instead.

Oct 12, 2015 5:07:00 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Could not add additional tags

I did a slight modification in DockerSlave.java to this logger:

223     } catch (Exception ex) {
224        LOGGER.log(Level.SEVERE, "Could not add additional tags: ");
225     }

I made the logger to also print the exception:

223     } catch (Exception ex) {
224        LOGGER.log(Level.SEVERE, "Could not add additional tags: " + ex);
225     }

This gave more insight to what was going on:

Oct 19, 2015 3:31:05 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Could not add additional tags: java.lang.NullPointerException: repository was not specified

No other changes were made to the code.


Possible cause:

After going through the code at the point where the error was caught, i found this:

DockerSlave.java:

216     client.tagImageCmd(tag_image, null, tagToken).exec();

Is the null intentional? If so how can we get tagging to work again on our project?
This method call takes the null all the way to docker-javas TagImageCmdImpl.java and to this part of the code:

    public  [More ...] TagImageCmdImpl(TagImageCmd.Exec exec, String imageId, String repository, String tag) {
        super(exec);
        withImageId(imageId);
        withRepository(repository);
        withTag(tag);
    }

and that goes to here in the same file:

    @Override
    public TagImageCmd  [More ...] withRepository(String repository) {
        checkNotNull(repository, "repository was not specified");
        this.repository = repository;
        return this;
    }

Then the checkNotNull method throws a NPE, because null was given as the repository parameter.

This was tested on a localhost jenkins, docker and with evarga/jenkins-slave image.


Full logs

with modified "Could not add additional tags" line:

Oct 19, 2015 4:04:41 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision

Asked to provision 1 slave(s) for: dockertest

Oct 19, 2015 4:04:41 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision

Will provision 'localhost:5000/evarga/jenkins-slave', for label: 'dockertest', in cloud: 'TestiDocker'

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

1 * Sending client request on thread jenkins.util.Timer [#1]
1 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/json?all=0&size=0
1 > Accept: application/json

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

2 * Client response received on thread jenkins.util.Timer [#1]
2 < 200
2 < Content-Length: 342
2 < Content-Type: application/json
2 < Date: Mon, 19 Oct 2015 16:04:42 GMT
2 < Server: Docker/1.8.2-fc22 (linux)
[{"Id":"d209d445c0cd531e327641fdc7bc6f0049e1f62ef1d079fc016e4e25bb84ba73","Names":["/ecstatic_blackwell"],"Image":"docker.io/registry:latest","Command":"docker-registry","Created":1444649743,"Ports":[{"IP":"0.0.0.0","PrivatePort":5000,"PublicPort":5000,"Type":"tcp"}],"Labels":{},"Status":"Up 7 days","HostConfig":{"NetworkMode":"default"}}]

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

3 * Sending client request on thread jenkins.util.Timer [#1]
3 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/json?all=0&size=0
3 > Accept: application/json

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

4 * Client response received on thread jenkins.util.Timer [#1]
4 < 200
4 < Content-Length: 342
4 < Content-Type: application/json
4 < Date: Mon, 19 Oct 2015 16:04:42 GMT
4 < Server: Docker/1.8.2-fc22 (linux)
[{"Id":"d209d445c0cd531e327641fdc7bc6f0049e1f62ef1d079fc016e4e25bb84ba73","Names":["/ecstatic_blackwell"],"Image":"docker.io/registry:latest","Command":"docker-registry","Created":1444649743,"Ports":[{"IP":"0.0.0.0","PrivatePort":5000,"PublicPort":5000,"Type":"tcp"}],"Labels":{},"Status":"Up 7 days","HostConfig":{"NetworkMode":"default"}}]

Oct 19, 2015 4:04:42 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave

Provisioning 'localhost:5000/evarga/jenkins-slave' number '0' on 'TestiDocker'; Total containers: '1'

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

5 * Sending client request on thread Computer.threadPoolForRemoting [#3]
5 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/images/json?all=0
5 > Accept: application/json

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

6 * Client response received on thread Computer.threadPoolForRemoting [#3]
6 < 200
6 < Content-Length: -1
6 < Content-Type: application/json
6 < Date: Mon, 19 Oct 2015 16:04:42 GMT
6 < Server: Docker/1.8.2-fc22 (linux)
6 < Transfer-Encoding: chunked
[{"Id":"2a21886473e8ee383260b328d8c5c485fc9874a84f3640c318e82ccf79997e1e","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testijobi:b66"],"RepoDigests":[],"Created":1445270066,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"12a4197480038ab54e5c7d3e8540131938862fc12b8f744ac874ab7f8d83c7e9","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testijobi:b65"],"RepoDigests":[],"Created":1445268662,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"618d445516563bd67f73e7bb03cd08ff069666d5e9e503ead28521b48f004870","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testijobi:b64","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/library:tag"],"RepoDigests":[],"Created":1445268285,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"837cf0cd78c26471201ba4664d87ee0cadb8ebb56a9b697926504bc6614cc9c9","ParentId":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","RepoTags":["testijobi:b63"],"RepoDigests":[],"Created":1445259530,"Size":15210909,"VirtualSize":671523532,"Labels":null},{"Id":"b675de956de597d681db2b4c8ef8ac31756868e536bc4370e36d69241cc05075","ParentId":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","RepoTags":["testijobi:b62"],"RepoDigests":[],"Created":1445259411,"Size":15210909,"VirtualSize":671523532,"Labels":null},{"Id":"8ad9cebf7d2e3baf9cf5cc2ae97388181797ba3eb36d344da597f070d7056f7e","ParentId":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","RepoTags":["testijobi:b61"],"RepoDigests":[],"Created":1445259261,"Size":15178141,"VirtualSize":671490764,"Labels":null},{"Id":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","ParentId":"bdb08f93b2443e0555ded0395268741bc4624e5f9ce0040b152afeb69f07f692","RepoTags":["localhost:5000/evarga/testijobi:test"],"RepoDigests":[],"Created":1445258137,"Size":15178141,"VirtualSize":656312623,"Labels":null},{"Id":"1f1831d472e400649d231fbb532ff07296933352d25a11e63f5c13beabdd2809","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["\u003cnone\u003e:\u003cnone\u003e"],"RepoDigests":["\u003cnone\u003e@\u003cnone\u003e"],"Created":1445252698,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"55accd04dee065ba4e7bd12f449c7d9e1f03f2ae6dd21fbbbc3f14e6c1eac15a","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b55"],"RepoDigests":[],"Created":1445251263,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"46d6487199cb6a042c9ecb998f82b22abb99659d163fffd69ae6d950aacfdd99","ParentId":"13d816bb48f958c675f45522ff663f8f6818240186491ecd6f611bc4142463b6","RepoTags":["localhost:5000/evarga/testijobi:b53"],"RepoDigests":[],"Created":1444992465,"Size":15210909,"VirtualSize":15210909,"Labels":null},{"Id":"208675b2a8b8539c7886695667f758b815f1f796d5bc961cdcd805783325f4db","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b48"],"RepoDigests":[],"Created":1444990769,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"17e143ab2b89af405142fec89924be87dd30c15431a4570c247fecba36db1db4","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b47"],"RepoDigests":[],"Created":1444987672,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"c8da388057c05bdef6e4519c39697363301f1c9419f68f21d6574dc650dd6b17","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b46"],"RepoDigests":[],"Created":1444760080,"Size":14761270,"VirtualSize":625506702,"Labels":null},{"Id":"f929829f009b4e0c7238a5ba8f55cdfce7af8c6a782e92564da34a40034d2a1b","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b45"],"RepoDigests":[],"Created":1444759373,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"bfc78cd339fd746d3b0341287e0c432f841f7e7ebecd3088f57ac11c6dca8e08","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b43"],"RepoDigests":[],"Created":1444757438,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"192a9cb00182eba42a4f7010d368870dd6c5ceb2c08da18b3a8e5ae5c1ea4539","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/evarga/testijobi:b42","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/evarga/testijobi:test"],"RepoDigests":[],"Created":1444757339,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"0c57cf6f27184702c1628b138f91efee773c5a0bea6cd778ab1338e9a59025a1","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/docker jenkins test:b41","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/docker jenkins test:test"],"RepoDigests":[],"Created":1444756829,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"1132e841320e4dec514f6a1d41a4ddef4698145a2382acbbf070ab57e9e139a0","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/docker jenkins test:b40"],"RepoDigests":[],"Created":1444755907,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"38f770f75d52269940340beb6ae59d037bd38d39e15976cb36a9a0ffdcef1e30","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["docker jenkins test:b38","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/library:test"],"RepoDigests":[],"Created":1444753527,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"1ec6be7c86cb3050fb2d853536285bbe72b918f5e10c3a28eb4e385111d11e46","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testi:test","docker jenkins test:b37"],"RepoDigests":[],"Created":1444673387,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"a29f7e2474238d1707f95401957e184128e20ca771a577d6f10261b614e07d17","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testi:testitagi","docker jenkins test:b34"],"RepoDigests":[],"Created":1444668437,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"1694982b51a1681a50f28d5f890d34d87d16b338570efff6917525a2afb8ddb9","ParentId":"9b2e6b2af83a23e7fdd6b48b523e824fe79e6c62daf337f512a9da5319dd8fc5","RepoTags":["docker.io/registry:latest"],"RepoDigests":[],"Created":1441884738,"Size":0,"VirtualSize":423246396,"Labels":{}},{"Id":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","ParentId":"e3934af35bde4124b273e23c8a5d369f4e73c7df37c1fd1f8f239329be86ced5","RepoTags":["localhost:5000/evarga/jenkins-slave:latest","localhost:5000/evarga/jenkins-slave:testi"],"RepoDigests":[],"Created":1419452556,"Size":0,"VirtualSize":610745432,"Labels":null}]

Oct 19, 2015 4:04:42 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provisionWithWait

Trying to run container for localhost:5000/evarga/jenkins-slave

Oct 19, 2015 4:04:42 PM FINEST com.github.dockerjava.jaxrs.CreateContainerCmdExec execute

POST: JerseyWebTarget { http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/create } 

Oct 19, 2015 4:04:42 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

7 * Sending client request on thread Computer.threadPoolForRemoting [#3]
7 > POST http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/create
7 > Accept: application/json
7 > Content-Type: application/json
{"name":null,"containerIDFile":null,"readonlyRootfs":false,"capAdd":null,"capDrop":null,"ulimits":null,"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"CpuPeriod":null,"Cpuset":null,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":["22/tcp"],"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["bash","-c","/usr/sbin/sshd -D -p 22"],"Entrypoint":null,"Image":"localhost:5000/evarga/jenkins-slave","Volumes":{},"WorkingDir":"","MacAddress":null,"NetworkDisabled":false,"ExposedPorts":{},"HostConfig":{"Binds":null,"Links":null,"LxcConf":null,"LogConfig":null,"PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":""}]},"PublishAllPorts":false,"Privileged":false,"ReadonlyRootfs":false,"Dns":null,"DnsSearch":null,"VolumesFrom":null,"ContainerIDFile":null,"CapAdd":null,"CapDrop":null,"RestartPolicy":null,"NetworkMode":null,"Devices":null,"ExtraHosts":null,"Ulimits":null,"Memory":0,"MemorySwap":0,"CpuShares":0},"Labels":null,"CpusetMems":null,"BlkioWeight":null,"OomKillDisable":null}

Oct 19, 2015 4:04:43 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

8 * Client response received on thread Computer.threadPoolForRemoting [#3]
8 < 201
8 < Content-Length: 90
8 < Content-Type: application/json
8 < Date: Mon, 19 Oct 2015 16:04:43 GMT
8 < Server: Docker/1.8.2-fc22 (linux)
{"Id":"62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1","Warnings":null}

Oct 19, 2015 4:04:43 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

9 * Sending client request on thread Computer.threadPoolForRemoting [#3]
9 > POST http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/start
9 > Accept: application/json
9 > Content-Type: application/json
{}

Oct 19, 2015 4:04:43 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

10 * Client response received on thread Computer.threadPoolForRemoting [#3]
10 < 204
10 < Date: Mon, 19 Oct 2015 16:04:43 GMT
10 < Server: Docker/1.8.2-fc22 (linux)

Oct 19, 2015 4:04:43 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

11 * Sending client request on thread Computer.threadPoolForRemoting [#3]
11 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/json
11 > Accept: application/json

Oct 19, 2015 4:04:43 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

12 * Client response received on thread Computer.threadPoolForRemoting [#3]
12 < 200
12 < Content-Length: -1
12 < Content-Type: application/json
12 < Date: Mon, 19 Oct 2015 16:04:43 GMT
12 < Server: Docker/1.8.2-fc22 (linux)
12 < Transfer-Encoding: chunked
{"Id":"62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1","Created":"2015-10-19T16:04:42.965373623Z","Path":"bash","Args":["-c","/usr/sbin/sshd -D -p 22"],"State":{"Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":2343,"ExitCode":0,"Error":"","StartedAt":"2015-10-19T16:04:43.489121477Z","FinishedAt":"0001-01-01T00:00:00Z"},"Image":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","NetworkSettings":{"Bridge":"","EndpointID":"a7c1310c516c4b7b5635c6eb366e6fc425eada0ea82ebf191e9efcb73282ac21","Gateway":"172.17.42.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"HairpinMode":false,"IPAddress":"172.17.0.59","IPPrefixLen":16,"IPv6Gateway":"","LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:3b","NetworkID":"40ae037108fbd4f2cbb631c594463f5552eebde80bde05c65757e1abb7cace4c","PortMapping":null,"Ports":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":"32823"}]},"SandboxKey":"/var/run/docker/netns/62404e511eaf","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null},"ResolvConfPath":"/ephemeral/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/resolv.conf","HostnamePath":"/ephemeral/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/hostname","HostsPath":"/ephemeral/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/hosts","LogPath":"/ephemeral/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1-json.log","Name":"/high_lumiere","RestartCount":0,"Driver":"devicemapper","ExecDriver":"native-0.2","MountLabel":"","ProcessLabel":"","AppArmorProfile":"","ExecIDs":null,"HostConfig":{"Binds":null,"ContainerIDFile":"","LxcConf":null,"Memory":0,"MemorySwap":0,"CpuShares":0,"CpuPeriod":0,"CpusetCpus":"","CpusetMems":"","CpuQuota":0,"BlkioWeight":0,"OomKillDisable":false,"MemorySwappiness":null,"Privileged":false,"PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":""}]},"Links":null,"PublishAllPorts":false,"Dns":null,"DnsSearch":null,"ExtraHosts":null,"VolumesFrom":null,"Devices":null,"NetworkMode":"default","IpcMode":"","PidMode":"","UTSMode":"","CapAdd":null,"CapDrop":null,"GroupAdd":null,"RestartPolicy":{"Name":"","MaximumRetryCount":0},"SecurityOpt":null,"ReadonlyRootfs":false,"Ulimits":null,"LogConfig":{"Type":"json-file","Config":{}},"CgroupParent":"","ConsoleSize":[0,0]},"GraphDriver":{"Name":"devicemapper","Data":{"DeviceId":"387","DeviceName":"docker-252:16-1114113-62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1","DeviceSize":"16106127360"}},"Mounts":[],"Config":{"Hostname":"62404e511eaf","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"22/tcp":{}},"PublishService":"","Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["bash","-c","/usr/sbin/sshd -D -p 22"],"Image":"localhost:5000/evarga/jenkins-slave","Volumes":null,"VolumeDriver":"","WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"MacAddress":"","OnBuild":null,"Labels":null}}

Oct 19, 2015 4:04:51 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision

Asked to provision 1 slave(s) for: dockertest

Oct 19, 2015 4:04:51 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provision

Will provision 'localhost:5000/evarga/jenkins-slave', for label: 'dockertest', in cloud: 'TestiDocker'

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

13 * Sending client request on thread jenkins.util.Timer [#6]
13 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/json?all=0&size=0
13 > Accept: application/json

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

14 * Client response received on thread jenkins.util.Timer [#6]
14 < 200
14 < Content-Length: 708
14 < Content-Type: application/json
14 < Date: Mon, 19 Oct 2015 16:04:51 GMT
14 < Server: Docker/1.8.2-fc22 (linux)
[{"Id":"62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1","Names":["/high_lumiere"],"Image":"localhost:5000/evarga/jenkins-slave","Command":"bash -c '/usr/sbin/sshd -D -p 22'","Created":1445270682,"Ports":[{"IP":"0.0.0.0","PrivatePort":22,"PublicPort":32823,"Type":"tcp"}],"Labels":null,"Status":"Up 7 seconds","HostConfig":{"NetworkMode":"default"}},{"Id":"d209d445c0cd531e327641fdc7bc6f0049e1f62ef1d079fc016e4e25bb84ba73","Names":["/ecstatic_blackwell"],"Image":"docker.io/registry:latest","Command":"docker-registry","Created":1444649743,"Ports":[{"IP":"0.0.0.0","PrivatePort":5000,"PublicPort":5000,"Type":"tcp"}],"Labels":{},"Status":"Up 7 days","HostConfig":{"NetworkMode":"default"}}]

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

15 * Sending client request on thread jenkins.util.Timer [#6]
15 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/json?all=0&size=0
15 > Accept: application/json

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

16 * Client response received on thread jenkins.util.Timer [#6]
16 < 200
16 < Content-Length: 708
16 < Content-Type: application/json
16 < Date: Mon, 19 Oct 2015 16:04:51 GMT
16 < Server: Docker/1.8.2-fc22 (linux)
[{"Id":"62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1","Names":["/high_lumiere"],"Image":"localhost:5000/evarga/jenkins-slave","Command":"bash -c '/usr/sbin/sshd -D -p 22'","Created":1445270682,"Ports":[{"IP":"0.0.0.0","PrivatePort":22,"PublicPort":32823,"Type":"tcp"}],"Labels":null,"Status":"Up 7 seconds","HostConfig":{"NetworkMode":"default"}},{"Id":"d209d445c0cd531e327641fdc7bc6f0049e1f62ef1d079fc016e4e25bb84ba73","Names":["/ecstatic_blackwell"],"Image":"docker.io/registry:latest","Command":"docker-registry","Created":1444649743,"Ports":[{"IP":"0.0.0.0","PrivatePort":5000,"PublicPort":5000,"Type":"tcp"}],"Labels":{},"Status":"Up 7 days","HostConfig":{"NetworkMode":"default"}}]

Oct 19, 2015 4:04:51 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud addProvisionedSlave

Provisioning 'localhost:5000/evarga/jenkins-slave' number '1' on 'TestiDocker'; Total containers: '2'

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

17 * Sending client request on thread Computer.threadPoolForRemoting [#4]
17 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/images/json?all=0
17 > Accept: application/json

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

18 * Client response received on thread Computer.threadPoolForRemoting [#4]
18 < 200
18 < Content-Length: -1
18 < Content-Type: application/json
18 < Date: Mon, 19 Oct 2015 16:04:51 GMT
18 < Server: Docker/1.8.2-fc22 (linux)
18 < Transfer-Encoding: chunked
[{"Id":"2a21886473e8ee383260b328d8c5c485fc9874a84f3640c318e82ccf79997e1e","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testijobi:b66"],"RepoDigests":[],"Created":1445270066,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"12a4197480038ab54e5c7d3e8540131938862fc12b8f744ac874ab7f8d83c7e9","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testijobi:b65"],"RepoDigests":[],"Created":1445268662,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"618d445516563bd67f73e7bb03cd08ff069666d5e9e503ead28521b48f004870","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testijobi:b64","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/library:tag"],"RepoDigests":[],"Created":1445268285,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"837cf0cd78c26471201ba4664d87ee0cadb8ebb56a9b697926504bc6614cc9c9","ParentId":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","RepoTags":["testijobi:b63"],"RepoDigests":[],"Created":1445259530,"Size":15210909,"VirtualSize":671523532,"Labels":null},{"Id":"b675de956de597d681db2b4c8ef8ac31756868e536bc4370e36d69241cc05075","ParentId":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","RepoTags":["testijobi:b62"],"RepoDigests":[],"Created":1445259411,"Size":15210909,"VirtualSize":671523532,"Labels":null},{"Id":"8ad9cebf7d2e3baf9cf5cc2ae97388181797ba3eb36d344da597f070d7056f7e","ParentId":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","RepoTags":["testijobi:b61"],"RepoDigests":[],"Created":1445259261,"Size":15178141,"VirtualSize":671490764,"Labels":null},{"Id":"b61f7df1a1f9af4063f5bd2800a47f21ea9c7be5727fba583636b47e87358d4f","ParentId":"bdb08f93b2443e0555ded0395268741bc4624e5f9ce0040b152afeb69f07f692","RepoTags":["localhost:5000/evarga/testijobi:test"],"RepoDigests":[],"Created":1445258137,"Size":15178141,"VirtualSize":656312623,"Labels":null},{"Id":"1f1831d472e400649d231fbb532ff07296933352d25a11e63f5c13beabdd2809","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["\u003cnone\u003e:\u003cnone\u003e"],"RepoDigests":["\u003cnone\u003e@\u003cnone\u003e"],"Created":1445252698,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"55accd04dee065ba4e7bd12f449c7d9e1f03f2ae6dd21fbbbc3f14e6c1eac15a","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b55"],"RepoDigests":[],"Created":1445251263,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"46d6487199cb6a042c9ecb998f82b22abb99659d163fffd69ae6d950aacfdd99","ParentId":"13d816bb48f958c675f45522ff663f8f6818240186491ecd6f611bc4142463b6","RepoTags":["localhost:5000/evarga/testijobi:b53"],"RepoDigests":[],"Created":1444992465,"Size":15210909,"VirtualSize":15210909,"Labels":null},{"Id":"208675b2a8b8539c7886695667f758b815f1f796d5bc961cdcd805783325f4db","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b48"],"RepoDigests":[],"Created":1444990769,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"17e143ab2b89af405142fec89924be87dd30c15431a4570c247fecba36db1db4","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b47"],"RepoDigests":[],"Created":1444987672,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"c8da388057c05bdef6e4519c39697363301f1c9419f68f21d6574dc650dd6b17","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b46"],"RepoDigests":[],"Created":1444760080,"Size":14761270,"VirtualSize":625506702,"Labels":null},{"Id":"f929829f009b4e0c7238a5ba8f55cdfce7af8c6a782e92564da34a40034d2a1b","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b45"],"RepoDigests":[],"Created":1444759373,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"bfc78cd339fd746d3b0341287e0c432f841f7e7ebecd3088f57ac11c6dca8e08","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["localhost:5000/evarga/testijobi:b43"],"RepoDigests":[],"Created":1444757438,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"192a9cb00182eba42a4f7010d368870dd6c5ceb2c08da18b3a8e5ae5c1ea4539","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/evarga/testijobi:b42","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/evarga/testijobi:test"],"RepoDigests":[],"Created":1444757339,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"0c57cf6f27184702c1628b138f91efee773c5a0bea6cd778ab1338e9a59025a1","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/docker jenkins test:b41","euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/docker jenkins test:test"],"RepoDigests":[],"Created":1444756829,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"1132e841320e4dec514f6a1d41a4ddef4698145a2382acbbf070ab57e9e139a0","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/docker jenkins test:b40"],"RepoDigests":[],"Created":1444755907,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"38f770f75d52269940340beb6ae59d037bd38d39e15976cb36a9a0ffdcef1e30","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:5000/library:test","docker jenkins test:b38"],"RepoDigests":[],"Created":1444753527,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"1ec6be7c86cb3050fb2d853536285bbe72b918f5e10c3a28eb4e385111d11e46","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testi:test","docker jenkins test:b37"],"RepoDigests":[],"Created":1444673387,"Size":15178141,"VirtualSize":625923573,"Labels":null},{"Id":"a29f7e2474238d1707f95401957e184128e20ca771a577d6f10261b614e07d17","ParentId":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","RepoTags":["testi:testitagi","docker jenkins test:b34"],"RepoDigests":[],"Created":1444668437,"Size":15210909,"VirtualSize":625956341,"Labels":null},{"Id":"1694982b51a1681a50f28d5f890d34d87d16b338570efff6917525a2afb8ddb9","ParentId":"9b2e6b2af83a23e7fdd6b48b523e824fe79e6c62daf337f512a9da5319dd8fc5","RepoTags":["docker.io/registry:latest"],"RepoDigests":[],"Created":1441884738,"Size":0,"VirtualSize":423246396,"Labels":{}},{"Id":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","ParentId":"e3934af35bde4124b273e23c8a5d369f4e73c7df37c1fd1f8f239329be86ced5","RepoTags":["localhost:5000/evarga/jenkins-slave:latest","localhost:5000/evarga/jenkins-slave:testi"],"RepoDigests":[],"Created":1419452556,"Size":0,"VirtualSize":610745432,"Labels":null}]

Oct 19, 2015 4:04:51 PM INFO com.nirima.jenkins.plugins.docker.DockerCloud provisionWithWait

Trying to run container for localhost:5000/evarga/jenkins-slave

Oct 19, 2015 4:04:51 PM FINEST com.github.dockerjava.jaxrs.CreateContainerCmdExec execute

POST: JerseyWebTarget { http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/create } 

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

19 * Sending client request on thread Computer.threadPoolForRemoting [#4]
19 > POST http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/create
19 > Accept: application/json
19 > Content-Type: application/json
{"name":null,"containerIDFile":null,"readonlyRootfs":false,"capAdd":null,"capDrop":null,"ulimits":null,"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"CpuPeriod":null,"Cpuset":null,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":["22/tcp"],"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["bash","-c","/usr/sbin/sshd -D -p 22"],"Entrypoint":null,"Image":"localhost:5000/evarga/jenkins-slave","Volumes":{},"WorkingDir":"","MacAddress":null,"NetworkDisabled":false,"ExposedPorts":{},"HostConfig":{"Binds":null,"Links":null,"LxcConf":null,"LogConfig":null,"PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":""}]},"PublishAllPorts":false,"Privileged":false,"ReadonlyRootfs":false,"Dns":null,"DnsSearch":null,"VolumesFrom":null,"ContainerIDFile":null,"CapAdd":null,"CapDrop":null,"RestartPolicy":null,"NetworkMode":null,"Devices":null,"ExtraHosts":null,"Ulimits":null,"Memory":0,"MemorySwap":0,"CpuShares":0},"Labels":null,"CpusetMems":null,"BlkioWeight":null,"OomKillDisable":null}

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

20 * Client response received on thread Computer.threadPoolForRemoting [#4]
20 < 201
20 < Content-Length: 90
20 < Content-Type: application/json
20 < Date: Mon, 19 Oct 2015 16:04:51 GMT
20 < Server: Docker/1.8.2-fc22 (linux)
{"Id":"7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af","Warnings":null}

Oct 19, 2015 4:04:51 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

21 * Sending client request on thread Computer.threadPoolForRemoting [#4]
21 > POST http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af/start
21 > Accept: application/json
21 > Content-Type: application/json
{}

Oct 19, 2015 4:04:52 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

22 * Client response received on thread Computer.threadPoolForRemoting [#4]
22 < 204
22 < Date: Mon, 19 Oct 2015 16:04:52 GMT
22 < Server: Docker/1.8.2-fc22 (linux)

Oct 19, 2015 4:04:52 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

23 * Sending client request on thread Computer.threadPoolForRemoting [#4]
23 > GET http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af/json
23 > Accept: application/json

Oct 19, 2015 4:04:52 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

24 * Client response received on thread Computer.threadPoolForRemoting [#4]
24 < 200
24 < Content-Length: -1
24 < Content-Type: application/json
24 < Date: Mon, 19 Oct 2015 16:04:52 GMT
24 < Server: Docker/1.8.2-fc22 (linux)
24 < Transfer-Encoding: chunked
{"Id":"7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af","Created":"2015-10-19T16:04:51.304514753Z","Path":"bash","Args":["-c","/usr/sbin/sshd -D -p 22"],"State":{"Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":2515,"ExitCode":0,"Error":"","StartedAt":"2015-10-19T16:04:51.983676884Z","FinishedAt":"0001-01-01T00:00:00Z"},"Image":"8880612971b0e41ecc5de6943c9680bb8dc08027dbae4d3a275ac827293cbf2e","NetworkSettings":{"Bridge":"","EndpointID":"224365bf145dcebd03199d79b365a80ee6986125e66cac0f4e65bc169f51b930","Gateway":"172.17.42.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"HairpinMode":false,"IPAddress":"172.17.0.60","IPPrefixLen":16,"IPv6Gateway":"","LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:3c","NetworkID":"40ae037108fbd4f2cbb631c594463f5552eebde80bde05c65757e1abb7cace4c","PortMapping":null,"Ports":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":"32824"}]},"SandboxKey":"/var/run/docker/netns/7f95bc423b26","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null},"ResolvConfPath":"/ephemeral/containers/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af/resolv.conf","HostnamePath":"/ephemeral/containers/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af/hostname","HostsPath":"/ephemeral/containers/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af/hosts","LogPath":"/ephemeral/containers/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af/7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af-json.log","Name":"/sleepy_bardeen","RestartCount":0,"Driver":"devicemapper","ExecDriver":"native-0.2","MountLabel":"","ProcessLabel":"","AppArmorProfile":"","ExecIDs":null,"HostConfig":{"Binds":null,"ContainerIDFile":"","LxcConf":null,"Memory":0,"MemorySwap":0,"CpuShares":0,"CpuPeriod":0,"CpusetCpus":"","CpusetMems":"","CpuQuota":0,"BlkioWeight":0,"OomKillDisable":false,"MemorySwappiness":null,"Privileged":false,"PortBindings":{"22/tcp":[{"HostIp":"0.0.0.0","HostPort":""}]},"Links":null,"PublishAllPorts":false,"Dns":null,"DnsSearch":null,"ExtraHosts":null,"VolumesFrom":null,"Devices":null,"NetworkMode":"default","IpcMode":"","PidMode":"","UTSMode":"","CapAdd":null,"CapDrop":null,"GroupAdd":null,"RestartPolicy":{"Name":"","MaximumRetryCount":0},"SecurityOpt":null,"ReadonlyRootfs":false,"Ulimits":null,"LogConfig":{"Type":"json-file","Config":{}},"CgroupParent":"","ConsoleSize":[0,0]},"GraphDriver":{"Name":"devicemapper","Data":{"DeviceId":"389","DeviceName":"docker-252:16-1114113-7f95bc423b265e66f00d87b974ad91328ccb158d019b9b74b0170b7f6622d9af","DeviceSize":"16106127360"}},"Mounts":[],"Config":{"Hostname":"7f95bc423b26","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"22/tcp":{}},"PublishService":"","Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["bash","-c","/usr/sbin/sshd -D -p 22"],"Image":"localhost:5000/evarga/jenkins-slave","Volumes":null,"VolumeDriver":"","WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"MacAddress":"","OnBuild":null,"Labels":null}}

Oct 19, 2015 4:04:54 PM FINE com.nirima.jenkins.plugins.docker.DockerComputer

 Computer DockerComputer{name=TestiDocker-62404e511eaf, slave=null} taskAccepted

Oct 19, 2015 4:05:00 PM FINE com.nirima.jenkins.plugins.docker.DockerComputer

 Computer DockerComputer{name=TestiDocker-62404e511eaf, slave=null} taskCompleted

Oct 19, 2015 4:05:00 PM FINE com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy

terminating TestiDocker-62404e511eaf since testijobi #67 seems to be finished

Oct 19, 2015 4:05:00 PM INFO com.nirima.jenkins.plugins.docker.DockerSlave _terminate

Disconnected computer

Oct 19, 2015 4:05:00 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

25 * Sending client request on thread Computer.threadPoolForRemoting [#5]
25 > POST http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1/stop?t=10
25 > Accept: application/json

Oct 19, 2015 4:05:00 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

26 * Client response received on thread Computer.threadPoolForRemoting [#5]
26 < 204
26 < Date: Mon, 19 Oct 2015 16:05:00 GMT
26 < Server: Docker/1.8.2-fc22 (linux)

Oct 19, 2015 4:05:00 PM INFO com.nirima.jenkins.plugins.docker.DockerSlave _terminate

Stopped container 62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1

Oct 19, 2015 4:05:00 PM FINEST com.github.dockerjava.jaxrs.CommitCmdExec execute

POST: JerseyWebTarget { http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/commit?container=62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1&author=Jenkins&repo=testijobi&tag=b67&pause=1 }

Oct 19, 2015 4:05:00 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

27 * Sending client request on thread Computer.threadPoolForRemoting [#5]
27 > POST http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/commit?container=62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1&author=Jenkins&repo=testijobi&tag=b67&pause=1
27 > Accept: application/vnd.docker.raw-stream
27 > Content-Type: application/json
{"containerId":"62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1","repository":"testijobi","tag":"b67","message":null,"author":"Jenkins","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Cmd":null,"DisableNetwork":false,"Env":null,"ExposedPorts":null,"Hostname":null,"Memory":null,"MemorySwap":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":null,"Volumes":null,"WorkingDir":null}

Oct 19, 2015 4:05:07 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

28 * Client response received on thread Computer.threadPoolForRemoting [#5]
28 < 201
28 < Content-Length: 74
28 < Content-Type: application/json
28 < Date: Mon, 19 Oct 2015 16:05:07 GMT
28 < Server: Docker/1.8.2-fc22 (linux)
{"Id":"ca06621ac2e724184ddc74499105adaa91ca8fbdb2a1f4dfe64ae51226b6394b"}

Oct 19, 2015 4:05:07 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Could not add additional tags: java.lang.NullPointerException: repository was not specified

Oct 19, 2015 4:05:07 PM INFO com.nirima.jenkins.plugins.docker.DockerSlave _terminate

Shutdowned slave for 62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1

Oct 19, 2015 4:05:07 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

29 * Sending client request on thread Computer.threadPoolForRemoting [#5]
29 > DELETE http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243/containers/62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1?v=0&force=0
29 > Accept: application/json

Oct 19, 2015 4:05:11 PM FINE com.github.dockerjava.jaxrs.filter.LoggingFilter log

30 * Client response received on thread Computer.threadPoolForRemoting [#5]
30 < 204
30 < Date: Mon, 19 Oct 2015 16:05:11 GMT
30 < Server: Docker/1.8.2-fc22 (linux)

Oct 19, 2015 4:05:11 PM INFO com.nirima.jenkins.plugins.docker.DockerSlave _terminate

Removed container 62404e511eaf3f957e56562b3497cf50e0650593f91d1ead946691124c81ddc1

Installed Plugins:

Ant Plugin 1.2
Credentials Plugin 1.22
Docker plugin 0.15.0
Durable Task Plugin 1.6
External Monitor Job Type Plugin 1.4
Javadoc Plugin 1.3
JUnit Plugin 1.6    
LDAP Plugin 1.11
Mailer Plugin 1.15  
Matrix Authorization Strategy Plugin 1.2
Matrix Project Plugin 1.6
OWASP Markup Formatter Plugin 1.3
PAM Authentication plugin 1.2
Script Security Plugin 1.14
SSH Credentials Plugin 1.11
SSH Slaves plugin 1.9
Token Macro Plugin 1.10

Cloud configuration block:

<clouds>
    <com.nirima.jenkins.plugins.docker.DockerCloud plugin="docker-plugin@0.16.0-SNAPSHOT">
      <name>TestDocker</name>
      <templates>
        <com.nirima.jenkins.plugins.docker.DockerTemplate>
          <configVersion>2</configVersion>
          <labelString>dockertest</labelString>
          <launcher class="com.nirima.jenkins.plugins.docker.launcher.DockerComputerSSHLauncher">
            <sshConnector plugin="ssh-slaves@1.9">
              <port>22</port>
              <credentialsId>6dd9777c-e467-40bb-a023-9452fed8e2df</credentialsId>
              <jvmOptions></jvmOptions>
              <javaPath></javaPath>
              <maxNumRetries>0</maxNumRetries>
              <retryWaitTime>0</retryWaitTime>
            </sshConnector>
          </launcher>
          <remoteFsMapping></remoteFsMapping>
          <remoteFs>/home/jenkins</remoteFs>
          <instanceCap>100</instanceCap>
          <mode>EXCLUSIVE</mode>
          <retentionStrategy class="com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy">
            <idleMinutes>10</idleMinutes>
            <idleMinutes defined-in="com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy">10</idleMinutes>
          </retentionStrategy>
          <numExecutors>1</numExecutors>
          <dockerTemplateBase>
            <image>localhost:5000/evarga/jenkins-slave</image>
            <dockerCommand></dockerCommand>
            <lxcConfString></lxcConfString>
            <hostname></hostname>
            <dnsHosts/>
            <volumes/>
            <volumesFrom2/>
            <environment/>
            <bindPorts></bindPorts>
            <bindAllPorts>false</bindAllPorts>
            <privileged>false</privileged>
            <tty>false</tty>
            <extraHosts class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
              <c class="list"/>
              <list reference="../c"/>
            </extraHosts>
          </dockerTemplateBase>
          <removeVolumes>false</removeVolumes>
          <pullStrategy>PULL_LATEST</pullStrategy>
        </com.nirima.jenkins.plugins.docker.DockerTemplate>
      </templates>
      <serverUrl>http://euca-10-157-69-112.eucalyptus.escloc18.eecloud.nsn-net.net:4243</serverUrl>
      <connectTimeout>3000</connectTimeout>
      <readTimeout>3000</readTimeout>
      <credentialsId></credentialsId>
      <containerCap>1000</containerCap>
    </com.nirima.jenkins.plugins.docker.DockerCloud>
  </clouds>

Docker:

Client:
 Version:      1.8.2-fc22
 API version:  1.20
 Package Version: docker-1.8.2-1.gitf1db8f2.fc22.x86_64
 Go version:   go1.4.2
 Git commit:   f1db8f2/1.8.2
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.8.2-fc22
 API version:  1.20
 Package Version: 
 Go version:   go1.4.2
 Git commit:   f1db8f2/1.8.2
 Built:        
 OS/Arch:      linux/amd64

Manage Old Data:

Nothing


To reproduce:

Install plugin and start own jenkins on localhost, then pull everga/jenkins and push it to own registry that is set up on localhost. Configure the plugin to use http://localhost:4243 as docker registry url and pushed evarga/jenkins image as the base image. Create freestyle job and use the "Additional tag to add" field, check the "Push on successful build" and build. We are behind a company proxy, if that affects the behavior of the plugin somehow.

magnayn commented 9 years ago

Hmm. It looks a touch broken. I suspect that when we ported over to docker-java, the different API wasn't converted correctly.

As an aside, docker has a very confus(ed,ing) terminology around labelling, tags and namespaces, which doesn't help.

Looking at it, I think it's also broken just below where

if (getJobProperty().pushOnSuccess) {
                    client.pushImageCmd(tagToken).exec();
                }

became changed to

if (getJobProperty().pushOnSuccess) {
                    client.pullImageCmd(tagToken).exec(new PullImageResultCallback()).awaitSuccess();
                }

Which looks completely wrong to me.

If you're near a compiler, you could replace the entire block with something like

if (!Strings.isNullOrEmpty(tagToken)) {

                final NameParser.ReposTag reposTag = NameParser.parseRepositoryTag(tagToken);
                final String commitTag = isEmpty(reposTag.tag) ? "latest" : reposTag.tag;

                getClient().tagImageCmd(tag_image, reposTag.repos, commitTag).withForce().exec();

                addJenkinsAction(tagToken);

                if (getJobProperty().pushOnSuccess) {
                    client.pushImageCmd(tagToken).exec(new PushImageResultCallback()).awaitSuccess();
                }
            }

Which ought to do what is needed.

jphelion commented 9 years ago

Thanks, I'll try that.

jphelion commented 9 years ago

Ok now tagging seems to be working but push fails to this error:

Oct 21, 2015 3:32:09 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Could not add additional tags: com.github.dockerjava.api.DockerClientException: Could not push image

I traced it back to the awaitSuccess method in PushImageResultCallback.java in docker-java.

magnayn commented 9 years ago

Ok. Nearly there then, I probably got the wrong intem in tagToken as I'm flying without a compiler

Try


 if (getJobProperty().pushOnSuccess) {
                    Identifier identifier = Identifier.fromCompoundString(tagToken);

                    PushImageResultCallback resultCallback = new PushImageResultCallback() {
                        public void onNext(PushResponseItem item) {
                            if( item == null ) {
                                LOGGER.log(Level.SEVERE, "NULL?");

                                return;
                            }
                            printResponseItemToListener(listener, item);
                            super.onNext(item);
                        }
                    };
                    try {
                        getClient().pushImageCmd(identifier).exec(resultCallback).awaitSuccess();
                    } catch(DockerClientException ex) {

                        LOGGER.log(Level.SEVERE, "Exception pushing docker image. Check that the destination registry is running.");
                        throw ex;
                    }
                }

Which may then give you some hints if it's actually failing due to the remote registry, or it's just the wrong name.

jphelion commented 9 years ago

Thanks again, I don't have my setup with me right now as I'm out of office but tomorrow I'll try that.

jphelion commented 9 years ago

I tested it with the new code snippet and it worked, but only when my image/repository name had only one / in it. When i tried with localhost:5000/evarga/jenkins-slave:testTag it would give the following error (I added the identifier there to see):

Oct 23, 2015 4:00:50 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Exception pushing docker image. Check that the destination registry is running. Identifier was: Identifier{repository=Repository{name=localhost:5000/evarga/jenkins-slave:testTag}, tag=Optional.absent()}

Oct 23, 2015 4:00:50 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Could not add additional tag: scom.github.dockerjava.api.DockerClientException: Could not push image

But if the image name was localhost:5000/jenkins-slave:testTag it worked. I don't know if having multiple / is bad naming convention or to be avoided completely in docker.

I also tried with the older version of the code (the one that fixed tagging) but that could not push an image with valid name (only one / in it) to the registry.

Also is it intended that I give the full name of the repository/image in the "Additional tags to add" field? In order to add a tag successfully and push to my registry I now had to give something similar as this: additionaltagsv2

EDIT: forgot to mention, I could push localhost:5000/evarga/jenkins-slave:testTag manually to the registry.

magnayn commented 9 years ago

IIRC (and I have not looked at the spec recently), the tag format is specified as "repository" : "tag", where repository is specified as 'docker hub account name' / 'image name' or 'registry server:port'/'image name'

So if you are using a local registry, you cannot have a / in your image name. (I think this sucks, but it is what it is, and the terminology is very confusing).

I don't know your setup, but I would think you need a real DNS name or IP address rather than just 'localhost' in the tagging setting.

On Fri, Oct 23, 2015 at 2:29 PM, jphelion notifications@github.com wrote:

I tested it with the new code snippet and it worked, but only when my image/repository name had only one / in it. When i tried with localhost:5000/evarga/jenkins-slave:testTag it would give the following error (I added the identifier there to see):

Oct 23, 2015 4:00:50 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Exception pushing docker image. Check that the destination registry is running. Identifier was: Identifier{repository=Repository{name=localhost:5000/evarga/jenkins-slave:testTag}, tag=Optional.absent()}

Oct 23, 2015 4:00:50 PM SEVERE com.nirima.jenkins.plugins.docker.DockerSlave slaveShutdown

Could not add additional tag: scom.github.dockerjava.api.DockerClientException: Could not push image

But if the image name was localhost:5000/jenkins-slave:testTag it worked. I don't know if having multiple / is bad naming convention or to be avoided completely in docker.

I also tried with the older version of the code (the one that fixed tagging) but that could not push an image with valid name (only one / in it) to the registry.

Also is it intended that I give the full name of the repository/image in the "Additional tags to add" field? In order to add a tag successfully and push to my registry I now had to give something similar as this: [image: additionaltagsv2] https://cloud.githubusercontent.com/assets/14053290/10693350/2c9d7ca4-7987-11e5-8d91-fcaa67e8883d.png

— Reply to this email directly or view it on GitHub https://github.com/jenkinsci/docker-plugin/issues/341#issuecomment-150571605 .

jphelion commented 9 years ago

IIRC (and I have not looked at the spec recently), the tag format is specified as "repository" : "tag", where repository is specified as 'docker hub account name' / 'image name' or 'registry server:port'/'image name' So if you are using a local registry, you cannot have a / in your image name. (I think this sucks, but it is what it is, and the terminology is very confusing).

Ah, I see. With only one / pushing and tagging seems to work well with the changes that were made in this issue.

I don't know your setup, but I would think you need a real DNS name or IP address rather than just 'localhost' in the tagging setting.

Yes, I agree. Localhost was only so that i could get a more controlled env to test everything out. I tested the changes just now with another computer serving as the docker host with real DNS name and everything worked fine. I'll test these changes with our real servers when they are free.

jphelion commented 8 years ago

Ok, sorry about the long delay, I have now finally had the time to test the changes on our servers and they are working fine. I think this issue can be closed now.