Hi Team,
Good Morning, We have installed Jenkins latest version with Java 17. Tring to execute shell script on remote server via SSH connection with pipeline scripts.
Agent is not connecting the Remoteserver because of java used on remote server is Java8 and on Jenkins is installed with Java17, I am able to connect agent on local server where Jenkins installed ( java17)
[10/25/24 09:33:02] [SSH] Starting agent process: cd “/home/ofsaailx/agent” && java -jar remoting.jar -workDir /home/ofsaailx/agent -jar-cache /home/ofsaailx/agent/remoting/jarCache
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
Option 2:
Installed Jenkins version supported for Java 8 on remote server jenkins-2.164.3 but after installation all the plugin’s are failed and asking to upgrade " You must update Jenkins from version 2.164.3 to version 2.387.3 or later to run this plugin"
we have an issue here as per the documents of supported versions version 2.387.3 is not compatible with Java8 on remote server and we can’t upgrade version because remote server applications are only works on Java8 to execute these shell scripts commands.
2.419 (August 2023) and newer
Java 11, Java 17, or Java 21
2.357 (June 2022) and newer
Java 11 or Java 17
Request you please advise if you have any fix to overcome these issues. Thank you in advance.