Plugin Information View Docker on the plugin site for more information. Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:
Background
Docker plugin allows to use a docker host to dynamically provision build agents, run a single build, then tear-down agent.
Optionally, the container can be committed, so that (for example) manual QA could be performed by the container being imported into a local docker provider, and run from there.
Setup
A quick setup is :
- get a docker environment running
- follow the instructions for creating a docker image that can be used as a Jenkins Agent
Docker Environment
Follow the installation steps on docker.io.
If your host needs to allow connections from a jenkins instance hosted on a different machine, you will need to open up the TCP port. This can be achieved by editing the docker config file and setting (for example)
DOCKER_OPTS="-H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock"
The docker configuration file location will depend your system, but it is likely to be /etc/init/docker.conf, /etc/default/docker or /etc/default/docker.io)
Multiple Docker Hosts
If you want to use more than just a physical node to run containers, you can rely on Docker Swarm Standalone - docker engine swarm mode isn't yet supported.
Follow docker swarm standalone instruction and configure docker swarm API endpoint in Jenkins.
Jenkins Configuration
Docker plugin is a "Cloud" implementation. You'll need to edit Jenkins system configuration (Jenkins > Manage > System configuraiton) and add a new Cloud of type "Docker".
Configure Docker (or Swarm standalone) API URL with required credentials. A test button let you connection with API is well set.
Then configure Agent templates, assigning them labels you can use for your jobs to select the adequate template, and docker container to run
Creating a docker image
You need a docker image that can be used to run Jenkins agent runtime. Depending on the launch method you select, there's some prerequisites for the Docker image to be used :
Launch via SSH
- sshd server and a JDK installed. You can just use jenkins/ssh-slave as a basis for a custom image.
- a SSH key (based on unique Jenkins master instance identity) can be injected in container on startup, you don't need any credential set as long as you use standard openssl sshd.
For backward compatibility or non-standard sshd packaged in your docker image, you also have option to provide manually configured ssh credentials
Launch via JNLP
- a JDK installed. You can just use jenkins/jnlp-slave as a basis for a custom image.
- Jenkins master URL has to be reachable from container.
- container will be configured automatically with agent's name and secret, so you don't need any special configuration of the container
Launch attached
- a JDK installed. You can just use jenkins/slave as a basis for a custom image.
- Please note this mode is experimental at time writing.
To create a custom image and bundle your favorite tools, just create a Dockerfile with FROM to point to one of the jenkins/*-slave reference image, and install everything needed for your own usage
FROM jenkins/ssh-slave RUN apt-get update && apt-get install XXX COPY your-favorite-tool-here
Note on ENTRYPOINT
Avoid overriding the docker command, as SSH Launcher relies on it.
You can use an Entrypoint to run some side service inside your build agent container before the agent runtime starts and establish a connexion. Just ensure your entrypoint eventually run the passed command :
exec "$@"
Configure plugin via Groovy script
Either automatically upon Jenkins post-initialization or through Jenkins script console. Example running locally, connecting to Docker service through unix///var/run/docker.sock and launching attached:
import com.nirima.jenkins.plugins.docker.DockerCloud import com.nirima.jenkins.plugins.docker.DockerTemplate import com.nirima.jenkins.plugins.docker.DockerTemplateBase import com.nirima.jenkins.plugins.docker.launcher.AttachedDockerComputerLauncher import io.jenkins.docker.connector.DockerComputerAttachConnector import jenkins.model.Jenkins // parameters def dockerTemplateBaseParameters = [ bindAllPorts: false, bindPorts: '', cpuShares: null, dnsString: '', dockerCommand: '', environmentsString: '', extraHostsString: '', hostname: '', image: 'jenkinsci/slave:latest', macAddress: '', memoryLimit: null, memorySwap: null, network: '', privileged: false, pullCredentialsId: '', sharedMemorySize: null, tty: true, volumesFromString: '', volumesString: '' ] def DockerTemplateParameters = [ instanceCapStr: '4', labelString: 'docker.local.jenkins.slave', remoteFs: '' ] def dockerCloudParameters = [ connectTimeout: 3, containerCapStr: '4', credentialsId: '', dockerHostname: '', name: 'docker.local', readTimeout: 60, serverUrl: 'unix:///var/run/docker.sock', version: '' ] // https://github.com/jenkinsci/docker-plugin/blob/docker-plugin-1.1.2/src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplateBase.java DockerTemplateBase dockerTemplateBase = new DockerTemplateBase( dockerTemplateBaseParameters.image, dockerTemplateBaseParameters.pullCredentialsId, dockerTemplateBaseParameters.dnsString, dockerTemplateBaseParameters.network, dockerTemplateBaseParameters.dockerCommand, dockerTemplateBaseParameters.volumesString, dockerTemplateBaseParameters.volumesFromString, dockerTemplateBaseParameters.environmentsString, dockerTemplateBaseParameters.hostname, dockerTemplateBaseParameters.memoryLimit, dockerTemplateBaseParameters.memorySwap, dockerTemplateBaseParameters.cpuShares, dockerTemplateBaseParameters.sharedMemorySize, dockerTemplateBaseParameters.bindPorts, dockerTemplateBaseParameters.bindAllPorts, dockerTemplateBaseParameters.privileged, dockerTemplateBaseParameters.tty, dockerTemplateBaseParameters.macAddress, dockerTemplateBaseParameters.extraHostsString ) // https://github.com/jenkinsci/docker-plugin/blob/docker-plugin-1.1.2/src/main/java/com/nirima/jenkins/plugins/docker/DockerTemplate.java DockerTemplate dockerTemplate = new DockerTemplate( dockerTemplateBase, new DockerComputerAttachConnector(), DockerTemplateParameters.labelString, DockerTemplateParameters.remoteFs, DockerTemplateParameters.instanceCapStr ) // https://github.com/jenkinsci/docker-plugin/blob/docker-plugin-1.1.2/src/main/java/com/nirima/jenkins/plugins/docker/DockerCloud.java DockerCloud dockerCloud = new DockerCloud( dockerCloudParameters.name, [dockerTemplate], dockerCloudParameters.serverUrl, dockerCloudParameters.containerCapStr, dockerCloudParameters.connectTimeout, dockerCloudParameters.readTimeout, dockerCloudParameters.credentialsId, dockerCloudParameters.version, dockerCloudParameters.dockerHostname ) // get Jenkins instance Jenkins jenkins = Jenkins.getInstance() // add cloud configuration to Jenkins jenkins.clouds.add(dockerCloud) // save current Jenkins state to disk jenkins.save()
See https://github.com/jenkinsci/docker-plugin/blob/master/CHANGELOG.md
61 Comments
Unknown User (gdm85)
in order for this plugin to work, you need the JClouds plugin installed.
To Author: please add this information!
Unknown User (varmenise)
Apparently you need Docker daemon to listen for tcp connection even if jenkins and docker run on the same machine - without opening up the TCP port jenkins and docker would not communicate.
Also, I was trying to use the ready-made jenkins slave as suggested above, and I pulled the evarga/jenkins-slave image.
However for me it does not work how it is.
In the docker file it defines the user jenkins:jenkins. However trying to connect from Jenkins to your everga container image using username
and password won't work: I needed to create an ssh key pair and modify the /etc/ssh/ssh_config file to point to the private key and /etc/ssh/sshd_config to point to the authorized_key file.
Actually I believe that modifying the ssh server file should be enough (sshd_config), since here we are talking about an incoming ssh request.
Done this and committed the new evarga/jenkins-slave image, it started working.
My step by step: http://varmenise.tumblr.com/post/87976165063/docker-on-centos-jenkins
Unknown User (larrycai)
port is also changed to 2375 since docker 1.0
Unknown User (ickersep)
It's possible to use unix:///var/run/docker.sock as URL (https://github.com/docker-java/docker-java/issues/168).
Additionaly, the jenkins user has to be a member of the docker group. And docker has to run on the local machine or when running jenkins as a container then the socket has to be passed in (https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/).
Unknown User (hefron)
I'm running Jenkins Master on Docker + slave containers on the same Docker.
I tried passing in the socket. It worked for Jenkins to connect to docker deamon but then Docker Plugin was unable to find slave containers. I had to configure Docker deamon to allow incoming tcp connections. It didn't work for me by default. I used the platform-independent
daemon.json
file, which is located in/etc/docker/
on Linux by default.So, for configuring Daemon port to connect to, do the following:
Set the following flag in the
daemon.json
file:Restart Docker
More details https://docs.docker.com/engine/reference/commandline/dockerd/#extended-description
Unknown User (smarmit)
Hi. Thanks for the plugin. As of 0.6 (I'm running 0.7 with Jenkins LTS 1.565.1) "Tag on Completion" was removed from the top-level configuration. The git comment with the change implies that the functionality just moved to the job configuration; make sense:
"* cf32ca2 Nigel Magnay - Revise the post-completion options (tag, push, clean) - no longer part of the template, but part of the job. (9 weeks ago)"
... however, I think the new functionality is actually to "Commit on successful build". I cannot seem to replace the functionality of "Tag on Completion" which would tag and commit my container on failure as well. That way I could debug in the container when required. With this change, I cannot debug failures in the container. Am I missing something?
Please let me know if you want me to open an Issue for this. And thanks again for the plugin.
Unknown User (larrycai)
@smartmit: actually "Commit on successful build" works as "Tag on Completion".
I tested it no matter the job is successful or not, the docker image will be saved with "<job name>:#<build number>", the tag "#<build number>" don't follow the docker tag naming rules since it contains "#"
If "clean images" checkbox is enabled, the image will be removed.
It seems we can't control to save images based on success/failure.
feature in 0.7 version is mess
Also the document here is not up to date
Unknown User (howieyu)
HI
My Jenkins's version is Jenkins ver. 1.595 with docker plugin v0.8
When I try to select cloud --> docker , nothing happen in web.
But I find there are some erro log in /var/log/jenkins/jenkins.log , about My class is missing descriptor
The following is the root cause
Dec 26, 2014 12:12:13 PM hudson.ExpressionFactory2$JexlExpression evaluate
WARNING: Caught exception evaluating: descriptor.getPropertyType(instance,field).itemTypeDescriptorOrDie in /$stapler/bound/333c1317-c818-4f69-9e8f-c616adfeb1af/render. Reason: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
......
Caused by: java.lang.AssertionError: class com.nirima.jenkins.plugins.docker.DockerTemplate is missing its descriptor in public final java.util.List com.nirima.jenkins.plugins.docker.DockerCloud.templates. See https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+missing+descriptor
at hudson.model.Descriptor$PropertyType.getItemTypeDescriptorOrDie(Descriptor.java:203)
... 128 more
Dec 26, 2014 12:12:13 PM hudson.widgets.RenderOnDemandClosure$1 generateResponse
WARNING: Failed to evaluate the template closure
org.apache.commons.jelly.JellyTagException: jar:file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/docker-plugin.jar!/com/nirima/jenkins/plugins/docker/DockerCloud/config.jelly:28:69: (file:/var/lib/jenkins/plugins/docker-plugin/WEB-INF/lib/docker-plugin.jar\!/com/nirima/jenkins/plugins/docker/DockerCloud/config.jelly:28:69:) <st:include> Error setting property 'class', exception - org.apache.commons.beanutils.ConversionException: No value specified for 'Class'
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
.....
Caused by: java.lang.IllegalArgumentException: Error setting property 'class', exception - org.apache.commons.beanutils.ConversionException: No value specified for 'Class'
at org.apache.commons.beanutils.ConvertingWrapDynaBean.set(ConvertingWrapDynaBean.java:74)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
... 116 more
Caused by: org.apache.commons.beanutils.ConversionException: No value specified for 'Class'
at org.apache.commons.beanutils.converters.AbstractConverter.handleMissing(AbstractConverter.java:310)
at org.apache.commons.beanutils.converters.AbstractConverter.convert(AbstractConverter.java:136)
at org.apache.commons.beanutils.converters.ConverterFacade.convert(ConverterFacade.java:60)
at org.apache.commons.beanutils.BeanUtilsBean.convert(BeanUtilsBean.java:1078)
at org.apache.commons.beanutils.BeanUtilsBean.copyProperty(BeanUtilsBean.java:437)
at org.apache.commons.beanutils.BeanUtils.copyProperty(BeanUtils.java:160)
at org.apache.commons.beanutils.ConvertingWrapDynaBean.set(ConvertingWrapDynaBean.java:67)
... 117 more
Unknown User (gamepla)
Try used 1.580.2 rc.
Unknown User (gamepla)
I have been playing around with this plugin for week, it has some great features.
I like it fire up slaves on the fly, talking to apis in any server and host it in a cloud.
But the deal breaker is a simple miss configuration or wrong images will result spawning so many slaves as to stun the master.
Hopefully it can be resolve soon for this.
Unknown User (recyard)
Same here, I've created an issue on github.
Unknown User (inkysea)
I tried running this plugin with no joy.
Docker version 1.8.1
Jenkins version 1.609
I'm using the evarga/jenkins-slave image and followed the suggestions for updating ssh keys on the image. I can run the image from the docker command line and ssh into the image. I've configured the system->cloud->docker and verified connectivity to docker using test connection. I've configured the Jenkins project to use the container with the appropriate label. When executing a build, Jenkins displays the message "pending---Waiting for next available executor" for the pending build job. I run docker ps and there is no container running.
Anyone have some insight into getting this to work?
Unknown User (inkysea)
Disregard, I played around with the labels and it started working. I believe I may have had a white space in the label. Entering the labels for a second time, in both system config and job config got things working.
Unknown User (baristated)
I am having some issues with this myself. Currently I am able to see the Images on my docker machine using the Jenkins GUI plug in but when I try to run a job on the correctly tagged image I get an error saying "(pending---All nodes of label ‘423262b670e4’ are offline". Not sure where the break down is but Jenkins clearly has access to the docker API as it is able to see all the images within Docker. I have tired many different types of lables on the images. I have also tired to use the docker.io/evarga/jenkins-slave image that is suggested as a preconfigured slave with no luck. I always get that error. Here is the out put from /var/log/messages
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.516929222-07:00" level=info msg="GET /containers/json?all=false&limit=-1&since=&before=&size=false"
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.524794264-07:00" level=info msg="GET /containers/json?all=false&limit=-1&since=&before=&size=false"
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.526443654-07:00" level=info msg="GET /images/json?filter=423262b670e4&all=true"
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.536055583-07:00" level=info msg="POST /images/create?fromImage=423262b670e4"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.122418871-07:00" level=error msg="Error from V2 registry: Authentication is required."
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.620184629-07:00" level=info msg="GET /images/423262b670e4/json"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.631906538-07:00" level=info msg="POST /containers/create"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.632159020-07:00" level=error msg="Handler for POST /containers/create returned error: json: cannot unmarshal string into Go value of type []string"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.632215872-07:00" level=error msg="HTTP Error" err="json: cannot unmarshal string into Go value of type []string" statusCode=500
Any help is greatly appreciated.
Thanks!
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.516929222-07:00" level=info msg="GET /containers/json?all=false&limit=-1&since=&before=&size=false"
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.524794264-07:00" level=info msg="GET /containers/json?all=false&limit=-1&since=&before=&size=false"
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.526443654-07:00" level=info msg="GET /images/json?filter=423262b670e4&all=true"
Oct 1 12:57:48 sfo-docker-03 docker: time="2015-10-01T12:57:48.536055583-07:00" level=info msg="POST /images/create?fromImage=423262b670e4"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.122418871-07:00" level=error msg="Error from V2 registry: Authentication is required."
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.620184629-07:00" level=info msg="GET /images/423262b670e4/json"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.631906538-07:00" level=info msg="POST /containers/create"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.632159020-07:00" level=error msg="Handler for POST /containers/create returned error: json: cannot unmarshal string into Go value of type []string"
Oct 1 12:57:50 sfo-docker-03 docker: time="2015-10-01T12:57:50.632215872-07:00" level=error msg="HTTP Error" err="json: cannot unmarshal string into Go value of type []string" statusCode=500
Unknown User (cpenhaligon)
Are there any plans to allow multiple entries to be defined in the Docker URL field? We run secondary masters in our Docker Swarm to enable redundancy, but with the Docker Plugin in its current form, we would have to manually update the URL if the primary master unexpectedly went offline. If that field accepted multiple entries, all of this would be handled automatically.
Unknown User (tektimmy)
Hi! First I want to thank you for developing this plugin!
My use case: Jenkins and Docker are running on different hosts and an firewall controls the whole network and blocks all connections by default (whitelist based). The connection between jenkins and docker server is secured with an TLS verification which runs fine after generating the PKCs key. It would be nice to have a note on the documentation about it, this ticket helped me figuring it out: https://github.com/jenkinsci/docker-plugin/issues/245
I want to build my Jenkins Project on an Docker Image I created, so it must be started as a slave which is configured in "Manage Jenkins / Configure System / Cloud / Docker / Images", is that right? There only "Docker Templates" are available, where can i use an docker image that already exists?
Also I have the problem that I don't have a clue (no documentation) about how the Jenkins Docker Plugin starts the Jenkins Slave Jar, because SSH connections on different ports are not available in our network..
Unknown User (bcopy)
Hello,
Would it be possible to provide an example, so as to clarify how to use the Remote FS Root Mapping field ?
It says "Enables the ability to browse workspaces of jobs being built using docker containers. Specify the location on the Jenkins master where the job workspaces will be and map them from the images using volumes, network shares, etc."
so I assume that the field must contain the location of a Jenkins Master local filesystem location. I gave it /var/lib/jenkins but my workspaces are not available there.
Maybe what the doc means by : "...map them from the images using volumes, network shares, etc" - means that it is up to me to use SMB ( or NFS or whatever ) to map :
/var/lib/jenkins/myWorkspace
to my Docker host workspace folder ?
Unknown User (cedrajin21)
Hi Brice,
Did you figured this out?
Unknown User (ndeloof)
This "feature" has been removed from latest release, as it doesn't make any sense but for those running builds on same host as jenkins master with a local docker daemon.
Unknown User (ptho)
using 16.1, I got error: https protocol is not supported while using the http for Docker URL.
downgrade back to 16.0, it worked.
Not sure why 16.1 is complaining about https protocol is not supported while using http.
Unknown User (taylorp36)
Does the Docker Plugin support connecting a Swarm using docker engine 1.12+ ?
I cannot connect to the swarm as a new "Cloud" and am seeing this error:Caused by: shaded.org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response
I could successfully connect Swarm using docker engine 1.10:
Version = swarm/1.2.4
Unknown User (bcopy)
Which URL or params would you use to connect to a 1.10 swarm ? Which port and credentials ?
Unknown User (cloudshare)
I'm very sorry but I seemed to have accidentally edited this page's labels. Did not mean to. However, the label change does not show up in the page's history, so I'm not sure how to revert my own edit.
Unknown User (user_sdn)
I am using this plugin to run dynamic ssh jenkins slaves in a different server. I need to be able to use the -u argument in the docker run command so that I can mount workspace to host and write on host volumes without using the root user. any recommendations?
Unknown User (cweiss)
We're using a private Docker repo that's unsigned. The Jenkins plugin seems unable to pull images from our repo. It works fine when pulling 'public' images (IE - ubuntu).
I've ensured that our Docker host supports the unsigned repo (Ubuntu 16.04 - added repo to /etc/docker/daemon.json). I can manually pull the images from the repo to our Docker host and the Jenkins builds will run with the images run fine, it just can't seem to do the pull if the image doesn't exist.
Example image name: dockerhost.ourcompany.com:5000/image:tag
$docker pull dockerhost.ourcompany.com:5000/image:tag
works fine from the prompt.
There's nothing in syslog to indicate what's going on. Any ideas? Do we need to do anything special for the plugin to support unsigned private repos?
Unknown User (cweiss)
To add more data - It looks like specifically having the ":5000" on the tag causes a crash in the plugin (removing it allows the plugin to try and pull the image, but the image doesn't exist without the ":5000" in the name):
Unknown User (cweiss)
Nevermind - After RTFMing again - the plugin doesn't normally have functionality to pull the images from repos.
Unknown User (ravi_s)
Hi All,
I am having 3 dockercloud running. If one of Dockercloud stops working(example docker goes down and takes 2 days to get it up), the jobs which were scheduled to run on other dockercloud won't start (jobs keep on waiting in queue).
Unknown User (visibilityspots)
We are currently facing the same issues where we created 2 docker cloud environments for 2 physical docker nodes with the same label and a max capacity of 15 containers per node. When the first node reaches it's 15 containers the next job in line get's stuck in the queue waiting to clean up containers on the first node and never get's executed on the free 2nd node..
Did you perhaps found a solution for this already? Is this normal behaviour and are we trying to have the plugin being too smart.
Unknown User (ndeloof)
Why do you use two cloud definitions for 2 physical nodes on your build cluster, and not a swarm manager (swarm standalone - swarm mode is not supported yet) ?
Please also note wiki comments is the worst place to report issues
Please use JIRA or users-list
Unknown User (20100v)
Is the privileged option really working ? I'm unable to access to /dev/kvm from Jenkins . If I launch the image outside Jenkins with the privileged option, Jenkins user is able to see /dev/kvm.
Unknown User (falc0n24)
Hello.
This plugin is working great for me. There is however, one improvement that could be done. When Docker is launching new container it assigns unique ID that is also host name of the system running in Docker. I would like to use this host name (Container ID) as parameter to another plugin (VncViewer). I have found that there is DOCKER_CONTAINER_ID env. variable present, but it doesn't have this short ID that is present e.g. also when I list running containers with docker ps. Is there already Jenkins variable for this shorter ID present? If not, would it be possible to add it?
BR, Krzysztof
Unknown User (jblaine)
This wiki page is very out of date. It says:
Latest Release
Latest Release Date
Required Core
Dependencies
0.16.2 (archives)
Sep 13, 2016
Unknown User (jblaine)
Whoa. Why is my username showing as IRCbot Run by Kohsuke?
Unknown User (guymi)
Hi,
Why "Keep this slave on-line as much as possible" retention strategy is gone since the last release?
Thanks,
Guy
Unknown User (ndeloof)
please join jenkins-users mailing list for questions.
retention strategies have been whitelisted to only offer those who match the docker-agent use case : run agent in a container for a build, then throw it away.
Unknown User (aedward1)
We've just updated from 0.16.2 to 1.0.4 and we've started seeing the following warning on the Jenkins front page:
"SSH Host Key Verifiers are not configured for all SSH slaves on this Jenkins instance. This could leave these slaves open to man-in-the-middle attacks."
We have a collection of bare-metal nodes, but they all of which have the "Host Key Verification Strategy" set, so we don't think that is the problem. We also have a docker swarm that spins up containers as needed, and all "Docker Agent Templates" within that Docker cloud have "Connect method" set to "Connect with SSH". Is this warning expected? Is there a way to set the host verification strategy within the "Docker Agent Template"?
Unknown User (ndeloof)
Already fixed in 1.1.
Please check issue tracker on github before posting,
and please don't use this wiki for assistance request, join jenkins-users for this purpose
Unknown User (aedward1)
For others that end up here, the issue for this is https://github.com/jenkinsci/docker-plugin/issues/555 and 1.1 was released on 5th Oct (yesterday) https://github.com/jenkinsci/docker-plugin/releases/tag/docker-plugin-1.1
Unknown User (alexvy86)
I'm using the plugin's "Build/Publish Docker Image" build step which starts successfully, and I can see in the logs that it starts processing the DockerFile I indicated. However, it keeps failing because it seems to be passing the workspace root directory as context for "docker build", but my Dockerfile is written such that the context is a subfolder under the repository root (a "src" folder), and I couldn't find a way to configure it.
I took a look at the code and it seems that the plugin is always passing the Dockerfile's location as the build context:
https://github.com/jenkinsci/docker-plugin/blob/5a2a123cd808a9c82d154cbcc22ef906a6a97907/src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderPublisher.java#L409
Are there any plans to allow the user to set a different context folder for the docker build?
Unknown User (ndeloof)
Why don't you just move your Dockerfile into this subfolder ?
or use the plain docker CLI if you have some special needs ?
also, better to ask on jenkins-users mailing list. Wiki isn't a support forum
Unknown User (alexvy86)
You're right, I'll check in the mailing list. But just to answer your question and for future reference, this repo has several projects and a Dockerfile for each, so it makes more sense to keep the Dockerfile in each project's subfolder. Having the plugin "tied" to a particular project structure feels a bit limiting. And about using plain docker CLI, that's the alternative I'm exploring now, but it required that I create a custom docker image for the Jenkins slaves with Docker installed. The fact that the plugin worked and actually started the docker build with a plain jenkins/ssh-slave image (asking the host to actually perform the docker build, obviously) made me a bit hopeful that I'd be able to pull this off with an OOTB ssh-slave image, but it seems I'll have to do a couple of extra things on top.
Unknown User (scarlson)
Are there plans to support docker-compose? IMO it would be incredible useful for companies that use compoase to create a common build environment using volumes/user/etc. like we do. Currently we would love to use this plugin but we cannot because we must use compose so developers can run it locally too, so we are stuck doing it with bash in script{} blocks.
Unknown User (ndeloof)
This is partially covered by https://github.com/jenkinsci/docker-plugin/issues/549
Main issue with docker-compose is this is a client-side tool, docker API doesn't know about this format, so we have to re-implement compose.yaml parsing and execution in plain java, supporting various versions.
Unknown User (jmguilla)
Hello guys!
We deployed this plugin at the very beginning, and I cannot tell you since when, but we are now seeing many (our Jenkins crashes when >15k) threads (dockerjava-netty-*-*) created. They are all stuck in "sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)"
1- I've quickly checked, and it seems that we cannot configure anything else than netty client?
2- Can we configure something in order to avoid this?
Let me know if you need some details about our setup and if you want me to create a bug...
BR
Unknown User (jeko)
Hello!
Short question:
Is it possible to hide given labels for an image, so that autocomplete in the job-config-section will not show the label after the first letter ist pressed!?
It is importent to me, that "non-admins" are not able to gain label-names!
Thanks!
Unknown User (dimadima)
Hello everyone. My objective/job is to run Jenkin's jobs in docker containers to see the result of these jobs in 'workspace' when a job is done. I have 2 issues here. the first is when the job is done, the container and the 'workspace' dies so I can not see the result. I put the 'workspace' into 'volume'. Now the 'workspace' doesn't die but it is still invisible for Jenkins. I have some ideas how to solve it but they are not really good. Can it be solved with the help of Docker-plugin? The second issue is that now I can add only all projects into 'volume' as I don't know how to configure it several times to separate the folders.
Unknown User (jeko)
Hello
... I put the 'workspace' into 'volume'. Now the 'workspace' doesn't die but it is still invisible for Jenkins....
Yes, of course! Because every started container is one unique Slave for the Jenkins. At the end of the build the container (which is also a complete slave) will be destroyed. So for Jenkins there is nothing he can look at.
... Can it be solved with the help of Docker-plugin?...
I guess no. Because there is no problem. To save artefacts after the build, there are thousands ways to reach this. (save artefacts in nexus, use "archive arctefacts" from jenkins, copy via ssh, and so on ....)
... The second issue is that now I can add only all projects into 'volume' as I don't know how to configure it several times to separate the folders...
Dont do that. This is a breach to the design! One main-purpose for using docker for builds is, to have a clean environment for each build!
regards
JekO
Unknown User (dimadima)
Thanks for the answer. Why can not I use such environment variables in "volume"?
Unknown User (tsudot)
Is there any way to upgrade the docker version in the plugin? I want to use the multi stage builds of docker which is available on 17.05 + versions. Current version of docker is 17.03.
Unknown User (saml)
Hello Folks,
I am running into the same issue where I can't browse the workspace from Jenkins after building in a docker container.
Both Docker and Jenkins are running on the same host for now.
Ubuntu 16.04
Jenkins 2.89.4
Docker 1.1.3
Any help on this issue would be greatly appreciated.
Thanks
Unknown User (ndeloof)
Wiki is not a support forum, join jenkins-users mailing list.
You can't browse workspace as workspace is attached to an agent and docker agent is removed after build completion. Just Archive artifacts.
Unknown User (saml)
Thanks for the information Nicolas,
Will move to jenkins-users for future questions
Unknown User (nhereman)
I put this here in case it may save some time to someone:
In the "container settings", the "Port bindings" field has not exactly the same effect than the "-p" option.
Unlike the "-p" option of docker run, here you can't bind a port that is not exposed.
Unknown User (robarros)
include a option --no-cache for build dockerfile
Unknown User (tkl)
Hello,
I want to have the launched container inside my host network (as if I would start with "docker run --net=host ..." from command line). I played a bit with the "Network" field but my impression is this is for something else...
Did anyone know how to get this work? And what the "Network" field is used for?
Thanks in advance.
Unknown User (auschas)
If you are using the host's network, just put the word host in the text box, Otherwise put the name of the relevant network.
Unknown User (sentinel)
Hello,
Updated this plugin from 0.18 to 1.1.5 and requested Jenkins restart, but Jenkins didnn't start. From syslog:
Oct 27 23:10:15 jenkins-master-instance-1 java[12943]: INFO: Prepared all plugins
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:16 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: WARNING: Failed to instantiate Key[type=hudson.plugins.jira.JiraProjectProperty$DescriptorImpl, annotation=@com.google.inject.name.Named(value=hudson.plugins.jira.JiraProjectProperty.DESCRIPTOR)]; skipping this component
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: com.google.inject.ProvisionException: Unable to provision, see the following errors:
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: 1) Tried proxying hudson.plugins.jira.JiraProjectProperty$DescriptorImpl to support a circular dependency, but it is not an interface.
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: 1 error
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:432)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:394)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:385)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:493)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.load(ExtensionList.java:380)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.getComponents(ExtensionList.java:183)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:192)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.iterator(ExtensionList.java:172)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.get(ExtensionList.java:149)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.jenkins.plugins.googlecontainerregistryauth.GoogleContainerRegistryCredentialModule.matches(GoogleContainerRegistryCredentialModule.java:87)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.jenkins.plugins.googlecontainerregistryauth.GoogleContainerRegistryCredentialProvider.getCredentials(GoogleContainerRegistryCredentialProvider.java:71)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:413)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.plugins.jira.CredentialsHelper.lookupSystemCredentials(CredentialsHelper.java:38)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.plugins.jira.JiraSite.<init>(JiraSite.java:273)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.plugins.jira.JiraSite.readResolve(JiraSite.java:398)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.lang.reflect.Method.invoke(Method.java:498)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:66)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:271)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:197)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:176)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:468)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:393)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:331)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.XStream2.unmarshal(XStream2.java:161)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.util.XStream2.unmarshal(XStream2.java:132)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.XmlFile.unmarshal(XmlFile.java:178)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.XmlFile.unmarshal(XmlFile.java:161)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.model.Descriptor.load(Descriptor.java:894)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.plugins.jira.JiraProjectProperty$DescriptorImpl.<init>(JiraProjectProperty.java:72)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.plugins.jira.JiraProjectProperty.<clinit>(JiraProjectProperty.java:65)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.misc.Unsafe.ensureClassInitialized(Native Method)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.lang.reflect.Field.get(Field.java:393)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at net.java.sezpoz.IndexItem.instance(IndexItem.java:185)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder.instantiate(ExtensionFinder.java:361)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder.access$700(ExtensionFinder.java:232)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder$SezpozModule$1.get(ExtensionFinder.java:536)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:432)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:394)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:385)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:493)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.load(ExtensionList.java:380)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.getComponents(ExtensionList.java:183)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:192)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.ExtensionList.iterator(ExtensionList.java:172)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at org.jenkinsci.plugins.xunit.AliasInitializer.init(AliasInitializer.java:46)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.lang.reflect.Method.invoke(Method.java:498)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins$5.runTask(Jenkins.java:1069)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Oct 27 23:10:16 jenkins-master-instance-1 java[12943]: #011at java.lang.Thread.run(Thread.java:748)
Oct 27 23:10:18 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:18 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
Oct 27 23:10:18 jenkins-master-instance-1 java[12943]: INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
Oct 27 23:10:19 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:19 PM org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl <init>
Oct 27 23:10:19 jenkins-master-instance-1 java[12943]: WARNING: Docker URL is not set, docker client won't be initialized
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:20 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:20 PM jenkins.InitReactorRunner$1 onAttained
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: INFO: Started all plugins
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:20 PM jenkins.InitReactorRunner$1 onAttained
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: INFO: Augmented all extensions
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:20 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
Oct 27 23:10:20 jenkins-master-instance-1 java[12943]: WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.configfiles.GlobalConfigFiles$1 in file:/srv/jenkins/plugins/config-file-provider/WEB-INF/lib/config-file-provider.jar; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins setBuildsAndWorkspacesDir
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Using non default workspaces directories: ${JENKINS_HOME}/workspace/${ITEM_FULLNAME}.
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.InitReactorRunner$1 onTaskFailed
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: SEVERE: Failed Loading global config
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: java.lang.NullPointerException
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.TreeMap.compare(TreeMap.java:1294)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.TreeMap.put(TreeMap.java:538)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Nodes.load(Nodes.java:332)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins$13.run(Jenkins.java:3113)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins$5.runTask(Jenkins.java:1069)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.lang.Thread.run(Thread.java:748)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM hudson.util.BootFailure publish
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: SEVERE: Failed to initialize Jenkins
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.NullPointerException
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.WebAppMain$3.run(WebAppMain.java:250)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.NullPointerException
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.InitReactorRunner.run(InitReactorRunner.java:48)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins.executeReactor(Jenkins.java:1103)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins.<init>(Jenkins.java:907)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.model.Hudson.<init>(Hudson.java:85)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.model.Hudson.<init>(Hudson.java:81)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.WebAppMain$3.run(WebAppMain.java:233)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Caused by: java.lang.NullPointerException
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.TreeMap.compare(TreeMap.java:1294)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.TreeMap.put(TreeMap.java:538)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Nodes.load(Nodes.java:332)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins$13.run(Jenkins.java:3113)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins$5.runTask(Jenkins.java:1069)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.lang.Thread.run(Thread.java:748)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins cleanUp
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Stopping Jenkins
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM hudson.model.ComputerSet <clinit>
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: WARNING: Failed to instantiate NodeMonitors
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: java.io.IOException: Unable to read /srv/jenkins/nodeMonitors.xml
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.XmlFile.read(XmlFile.java:149)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.model.ComputerSet.<clinit>(ComputerSet.java:444)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.metrics.impl.JenkinsHealthCheckProviderImpl.getHealthChecks(JenkinsHealthCheckProviderImpl.java:89)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.metrics.api.HealthCheckProviderListener.onChange(HealthCheckProviderListener.java:93)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.metrics.api.HealthCheckProviderListener.attach(HealthCheckProviderListener.java:79)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.metrics.api.Metrics.afterExtensionsAugmented(Metrics.java:295)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.lang.reflect.Method.invoke(Method.java:498)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at jenkins.model.Jenkins$5.runTask(Jenkins.java:1069)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.lang.Thread.run(Thread.java:748)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Caused by: com.thoughtworks.xstream.io.StreamException: : null
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:69)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1053)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at hudson.XmlFile.read(XmlFile.java:147)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011... 18 more
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Caused by: java.nio.channels.ClosedByInterruptException
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:164)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.io.FilterInputStream.read(FilterInputStream.java:83)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at java.io.PushbackInputStream.read(PushbackInputStream.java:139)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.getHeader(XmlHeaderAwareReader.java:79)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.core.util.XmlHeaderAwareReader.<init>(XmlHeaderAwareReader.java:61)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65)
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: #011... 20 more
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins$18 onAttained
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Started termination
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins$18 onAttained
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Completed termination
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins _cleanUpDisconnectComputers
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Starting node disconnection
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins _cleanUpShutdownPluginManager
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Stopping plugin manager
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:21 PM jenkins.model.Jenkins _cleanUpPersistQueue
Oct 27 23:10:21 jenkins-master-instance-1 java[12943]: INFO: Persisting build queue
Oct 27 23:10:22 jenkins-master-instance-1 java[12943]: Oct 27, 2018 11:10:22 PM jenkins.model.Jenkins cleanUp
Oct 27 23:10:22 jenkins-master-instance-1 java[12943]: INFO: Jenkins stopped
On Jenkins page i see:
java.lang.NullPointerException
at java.util.TreeMap.compare(TreeMap.java:1294)
at java.util.TreeMap.put(TreeMap.java:538)
at jenkins.model.Nodes.load(Nodes.java:332)
at jenkins.model.Jenkins$13.run(Jenkins.java:3113)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1069)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:48)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1103)
at jenkins.model.Jenkins.<init>(Jenkins.java:907)
at hudson.model.Hudson.<init>(Hudson.java:85)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.WebAppMain$3.run(WebAppMain.java:233)
Caused: hudson.util.HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:250)
Rolled back plugin to 0.18b and successfully started up.
Thanks in advance.
Unknown User (oxygen)
Hi,
I added a docker agent in the "Configure System" page and the image contained variable defined in the job by parameterized build and I started the job, it failed to initiate the container, could you add this feature that the variables can be referred in the plugin configuration?
the plugin version is 1.1.5
Unknown User (sentinel)
Hi,
Plugin does not work correctly with private images (i.e. images from GCR). I placed image to use as eu.gcr.io/project/image:tag and plugin said, that no such image in repo. I pulled it manually with "Pull strategy: Never pull" on machine and then build started.
Plugin also tried to use "gcloud docker – pull" instead of "docker pull" in 18.03 docker version. (no such error in 0.18 version)
I use 1.1.15 plugin version.
Unknown User (mangeshr)