I upgraded Jenkins (Linux) 2.356 (JDK 1.8) to version 2.363 (JDK 11), controller is running fine I was able to login to the console. But, the 3 Linux agents went offline. I don’t want to upgrade agent Java version. All 3 are running on JDK 1.8. I am sure I missed something. Any help would be greatly appreciated.
I checked the log via the console. It says “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.”
52.0 is Java 1.8, I cannot upgrade agent Java since the web applications are using Java 1.8 only. My understand is I can run controller and agent on different Java versions.
The same JDK is needed on the agent and the controller. The controllers sends Java classes to the agent. If the agent does not understand those Java classes, the agent won’t work.
All agents must be running on the same JVM version as the controller due to how controllers and agents communicate. If you’re upgrading your Jenkins controller to run on Java 11, you also need to upgrade the JVM on your agents.
The JVM that runs the agent can be different than other JVM’s installed on the agent computer. If a web application requires JDK 8, that does not prevent your running a Jenkins agent in JDK 11 on the same computer that hosts the JDK8 web application.
Thanks. I installed the same version of JDK in one of the agent. It now has 2 version of JDK installed (1.8 and 11). I changed the JDK using ‘sudo alternatives --config java’ and issued a reboot. It now automatically connected to the controller. How do I use JDK 1.8 and run the application deployment pipeline? It’s still confusing me.
In the console ‘Node properties’ we defined the Environment variables for JAVA_HOME as /usr/java/latest. This symlink currently points to JDK11. Should I modify the symlink to point to JDK 1.8? OR should I add a JAVA_HOME in the Global Tool Configuration to point it to JDK 1.8 path? I don’t want to choose different versions of java per job.