Comments (9)
review a pull request
⇒ #1049. Would ideally be tested by a real user affected by the NPE. The inbound connector is not the default, is trickier to set up, and seems to have less test coverage.
from docker-plugin.
I've now reproduced the issue with a clean Jenkins setup in docker ( jenkins/jenkins:latest which is 208bdf1be3b9
and Jenkins 2.444)
docker run --name jenkins-server -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins
- Go through setup wizard and Install default plugins.
- Install docker plugin (v1.5 currently).
- Add a cloud and one template (see xml included earlier).
- Run a job using labels defined for the template.
Jenkins log contains:
Feb 06, 2024 3:52:08 PM INFO com.nirima.jenkins.plugins.docker.DockerTemplate doProvisionNode
Trying to run container for image "some-host:5000/jenkins-centos-9-java"
Feb 06, 2024 3:52:08 PM SEVERE com.nirima.jenkins.plugins.docker.DockerCloud$1 run
Error in provisioning; template='DockerTemplate{configVersion=2, labelString='centos centos9 dockerswarm', connector=DockerComputerJNLPConnector{}, remoteFs='/data/jenkins-slave', instanceCap=15, mode=EXCLUSIVE, retentionStrategy=com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy@29, dockerTemplateBase=DockerTemplateBase{image='some-host:5000/jenkins-centos-9-java', mounts=[type=bind,source=/nfs00,destination=/nfs00, type=bind,source=/nfs00,destination=/nfs00-ro,readonly], bindAllPorts=false, memoryLimit=32000, memorySwap=-1, cpuPeriod=0, cpuQuota=0, privileged=false, tty=false}, removeVolumes=false, stopTimeout=0, pullStrategy=PULL_ALWAYS, pullTimeout=300, disabled=BySystem,0 ms,4 min 59 sec,Template provisioning failed., name='jenkins-centos9'}' for cloud='tc-docker-swarm'
java.lang.NullPointerException: Cannot read field "tunnel" because "this.jnlpLauncher" is null
at io.jenkins.docker.connector.DockerComputerJNLPConnector.beforeContainerCreated(DockerComputerJNLPConnector.java:201)
at com.nirima.jenkins.plugins.docker.DockerTemplate.doProvisionNode(DockerTemplate.java:729)
at com.nirima.jenkins.plugins.docker.DockerTemplate.provisionNode(DockerTemplate.java:682)
at com.nirima.jenkins.plugins.docker.DockerCloud$1.run(DockerCloud.java:414)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
The wording of the NPE is slightly different, perhaps changed in 2.443->2.444
from docker-plugin.
I've also confirmed that using a clean in-docker installation of Jenkins 2.376 with the latest
docker plugin (1.4 for that version) works fine.
Summary of my tests so far:
Jenkins | Plugin | Result | Notes |
---|---|---|---|
2.376 | 1.4 | Works | |
2.436 | 1.5 | Works | |
2.437 | 1.5 | NPE | Suspecting jenkinsci/jenkins#8762 as the cause |
2.443 | 1.4 | NPE | |
2.444 | 1.5 | NPE |
from docker-plugin.
The wording of the NPE is slightly different, perhaps changed in 2.443->2.444
No, because Java 17 improves NPEs generally.
this.jnlpLauncher = jnlpLauncher != null ? jnlpLauncher : new JNLPLauncher(false);
Better yet, bump the minimum Jenkins version to one including jenkinsci/remoting#677 and stop using a JNLPLauncher
field at all; rewrite to just take a text field for list of agent.jar
options. AFAICT it is being used only for the -tunnel
option.
from docker-plugin.
Thanks @jglick .
I am a little out of my depth, so I'm hoping that you are either addressing docker plugin maintainers or are willing to hold my hand as I try to make a PR to fix this.
from docker-plugin.
CC @MarkEWaite since you appear to be active here; could draft a PR if you like.
Looks like there is already
-tunnel
as well as any of the other supported options, so it would suffice to just delete @DataBoundSetter
.from docker-plugin.
could draft a PR if you like
I'm happy to review a pull request if you're willing to submit it
from docker-plugin.
We're hit severely by this as well.
from docker-plugin.
review a pull request
⇒ #1049. Would ideally be tested by a real user affected by the NPE. The inbound connector is not the default, is trickier to set up, and seems to have less test coverage.
Works for me (see conversation in #1049)
from docker-plugin.
Related Issues (20)
- Dynamic provision of Docker Agent Templates HOT 14
- can not get container id if the Jenkins is running in a podman HOT 4
- Client certificate doesn't provide to remote docker daemon HOT 1
- Docker cloud does not show credentials dropdown HOT 1
- Support to connect to docker/podman socket via SSH tunnel HOT 2
- Docker.inside() sh block doesn't wait until "$@" is executed
- Unable to run Jenkins build node if I set "User Jenkins" in the dockerfile HOT 11
- No logs when using awslogs log driver
- Deprecated value in DEFAULT_ENTRY_POINT_ARGUMENTS
- Is there a way to add build time options like --add-host?
- uninstallation pending HOT 1
- Pipeline withDockerContainer() report an Error:Cannot run program "docker": error=2, No such file or directory HOT 1
- Add Instance Number to Environment Variables
- Support for sysctl settings
- Introduce how to use this plugin in a Pipeline HOT 5
- Docker 27.0.1: Failure to login to docker registry with port HOT 2
- Duplicated slaves spawned
- Agents can't be reused - Broken Pipe HOT 1
- Docker plugin stopped starting Docker containers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-plugin.