build
build copied to clipboard
Jenkins agents need newer Java (11+)
It looks like after updating to the latest Jenkins LTS (https://www.jenkins.io/security/advisory/2022-09-09/) several agents are failing to connect to the server. e.g. example failure from one of the agent logs:
WARNING: LinkageError while performing UserRequest:hudson.slaves.SlaveComputer$SlaveVersion@435cd082
java.lang.UnsupportedClassVersionError: Failed to load hudson.slaves.SlaveComputer$SlaveVersion
...
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=hudson/slaves/SlaveComputer$SlaveVersion, offset=6
...
Sep 14, 2022 11:38:51 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Terminated
Looks like now that Jenkins has dropped support for Java 8 (https://github.com/nodejs/build/issues/2984) the agents also require Java 11+.
For the time being I've rolled back the Jenkins update by backing up the jenkins.war
file on the test CI server and copying over the one from the release server (which hadn't been updated yet). We'll need to update eventually but this will buy some time to get Java updated on the test machines.
Via ansible --list-hosts "test-*" | cut -d "-" -f 3 | sort -u
these are the OS's we currently have in the test matrix:
os | current Java | most recent Java from distro | Notes |
---|---|---|---|
aix71 | ~8~ ➡️ 17 | - | IBM Semuru Java 11/17 requires XL C++ Runtime environment 16 |
aix72 | ~8~ ➡️ 17 | - | IBM Semuru |
aix73 | ~8~ ➡️ 17 | - | IBM Semuru |
centos7 | ~8~ ➡️ 11 | 11 | ppc64 install Adoptium binaries and has been updated to Java 17 |
debian10 | 11 | 11 | |
debian8 | 8 | 8 | Should be removed from CI |
debian9 | 8 | 8 | Should be removed from CI |
fedora32 | ~8~ ➡️ 11 | 11 | Should be updated to Fedora 35 |
fedora34 | ~8~ ➡️ 17 | 17 | Should be updated to Fedora 36 |
freebsd12 | ~8~ ➡️ 11 | 16 | |
ibmi73 | 11 | 11 | |
macos10.14 | ~8~ ➡️ 17 | 19 | |
macos10.15 | ~8~ ➡️ 17 | 19 | |
macos11 | ~8~ ➡️ 17 | 19 | |
rhel7 | 11 | 11 | |
rhel8 | 17 | ||
smartos18 | ~8~ ➡️ 11 | 11 | |
smartos20 | ~8~ ➡️ 11 | 15 | Move to 11 |
ubuntu1404 | 8 | Should be removed from CI | |
ubuntu1604 | 8 | 9 | Should be removed from CI |
ubuntu1804 | ~8~ ➡️ 17 | 17 | |
ubuntu2004 | |||
win10 | ~8~ ➡️ 17 | 19 (Temurin) | |
win2012r2 | ~8~ ➡️ 17 | 19 (Temurin) | |
win2016 | ~8~ ➡️ 17 | 19 (Temurin) | |
zos24 |
Just finished updating the Windows machines. Remaining platforms:
- macos
- smartos
- End-of-Life Linux (e.g. debian 8) which should be removed from CI
Is this something I may be able to do as a first task?
Is this something I may be able to do as a first task?
Yes 🙂. We use Ansible to manage our CI hosts. In theory updating the Java being used for an existing platform would be:
- Update https://github.com/nodejs/build/blob/main/ansible/roles/java-base/vars/main.yml
- Check if the platform uses a non-default path to the Java binary and update if necessary: https://github.com/nodejs/build/blob/7fdcf5790e73b41802263f312f73009800cf66f0/ansible/roles/jenkins-worker/vars/main.yml#L80-L97
When actually running the Ansible scripts against a CI host it's usually better to check that the host isn't running a build (otherwise the script may interrupt the in progress build) -- marking the host as offline in Jenkins will stop any jobs being scheduled on it (just remember to set it back to being online in Jenkins afterwards).
Specifically for the macs one caveat is that when @AshCripps added the M1's we had to use a Java SDK from Azul as that was the only native Apple Silicon Java available at the time -- I understand that there are now Adoptium binaries available so in theory we could simplify the playbook by removing the M1 specific tasks: https://github.com/nodejs/build/blob/7fdcf5790e73b41802263f312f73009800cf66f0/ansible/roles/java-base/tasks/main.yml#L68-L78
According to https://github.com/AdoptOpenJDK/homebrew-openjdk, we should move all macs to the temurin
cask.
PR: https://github.com/nodejs/build/pull/3085
From https://github.com/nodejs/build/pull/3085:
macOS update status
Updated to Java 17
- release-nearform-macos10.15-x64-1
- release-nearform-macos11.0-arm64-1
- release-orka-macos10.15-x64-1
- test-nearform-macos10.15-x64-1
- test-nearform-macos10.15-x64-2
- test-nearform-macos11.0-arm64-1
- test-orka-macos10.14-x64-1
- test-orka-macos10.14-x64-2
- test-orka-macos10.14-x64-3
- test-orka-macos11-x64-1
- test-orka-macos11-x64-2
Impossible to connect via SSH
- release-macstadium-macos11.0-arm64-1
- test-macstadium-macos11.0-arm64-3
- test-macstadium-macos11.0-arm64-4
Offline
- test-nearform-macos10.15-x64-3
- test-orka-macos10.15-x64-1
- test-orka-macos10.15-x64-2