Skip to content
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

jenkins/jnlp-agent-jdk8 is broken #46

Closed
gounthar opened this issue Oct 23, 2024 · 0 comments · Fixed by #47
Closed

jenkins/jnlp-agent-jdk8 is broken #46

gounthar opened this issue Oct 23, 2024 · 0 comments · Fixed by #47

Comments

@gounthar
Copy link
Contributor

gounthar commented Oct 23, 2024

Jenkins and Plugins Version Report

Operating Environment:

  • Linux 5.15.153.1-microsoft-standard-WSL2 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 GNU/Linux
  • Debian under WSL2 with Docker version 27.2.0, build 3ab4256

Issue Description

This is a follow-up to jenkins-infra/helpdesk#4364.

The issue stems from a version mismatch in our Docker configuration. While we use a JDK8-based Maven image, the first stage of the build uses an image targeting JDK17:

docker run -it maven:3.6.3-jdk-8-slim bash
root@0e5b337402f5:/# java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
docker run -it jenkins/inbound-agent:alpine ash
~ $ java --version
openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode)

Steps to Reproduce

docker run -ti --rm jenkins/jnlp-agent-jdk8:latest

Expected Behavior

The command should display the standard agent usage information:

two arguments required, but got []
java -jar agent.jar [options...] <secret key> <agent name>
[... standard help output ...]

Actual Behavior

The command fails with a JNI error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Resolution

I will submit a pull request to address this version mismatch issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant