-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE in DockerComputerJNLPConnector.beforeContainerCreated starting with Jenkins 2.437 #1047
Comments
I've now reproduced the issue with a clean Jenkins setup in docker ( jenkins/jenkins:latest which is
Jenkins log contains:
The wording of the NPE is slightly different, perhaps changed in 2.443->2.444 |
I've also confirmed that using a clean in-docker installation of Jenkins 2.376 with the Summary of my tests so far:
|
No, because Java 17 improves NPEs generally. docker-plugin/src/main/java/io/jenkins/docker/connector/DockerComputerJNLPConnector.java Lines 201 to 202 in 84cce22
docker-plugin/src/main/java/io/jenkins/docker/connector/DockerComputerJNLPConnector.java Lines 59 to 62 in 84cce22
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 docker-plugin/src/main/java/io/jenkins/docker/connector/DockerComputerJNLPConnector.java Lines 240 to 245 in 84cce22
docker-plugin/src/main/java/io/jenkins/docker/connector/DockerComputerJNLPConnector.java Lines 169 to 172 in 84cce22
|
Thanks @jglick . |
CC @MarkEWaite since you appear to be active here; could draft a PR if you like. Looks like there is already Lines 27 to 29 in 84cce22
-tunnel as well as any of the other supported options, so it would suffice to just delete Line 31 in 84cce22
@DataBoundSetter .
|
I'm happy to review a pull request if you're willing to submit it |
We're hit severely by this as well. |
⇒ #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. |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
CentOS Stream 8 on master (also same results when running Jenkins in a container)
Docker Classic Swarm: Version = swarm/1.2.9, API Version = 1.30
Reproduction steps
The following works with Jenkins up to 2.437 but fails as follows:
localhost
.jenkins/inbound-agent
yields the same results.Docker Cloud Definition
Expected Results
Container should get provisioned (as they do with Jenkins up to 2.437)
Actual Results
Container is not provisioned. The following is in the Jenkins master log:
Anything else?
I attempted to downgrade the docker plugin to 1.2.10 (The only option I had), but that version isn't compatible with the latest Docker API plugin (Class Not Found type errors), and Jenkins doesn't offer a downgrade for the API plugin.
Everything works on another Jenkins installation that has not been upgraded (Docker Plugin 1.2.10 on Jenkins 2.376)
Are you interested in contributing a fix?
I am happy to contribute a fix if someone can help me figure out what's failing here. The exception seem to point to this line which is odd, but if it in fact means line 202 then
jnlpLauncher
must be null. Why?The text was updated successfully, but these errors were encountered: