>Jenkins not able to launch the slave due to unrecognizable JAVA_HOME

Stop using Slave and use Agent as a name for the Build Agents attached to 
the Jenkins Controller (no longer master)

>so could anyone please help as it is urgent

This is a User group, so NOTHING here is urgent. If someone can help, I 
will do it, but it is not mandatory, and NOBODY can request urgency here.

And now we can continue with your question. 

As Mark said Java 12 was never supported and is not a LTS. 
It is recommended that the Jenkins Controller and the Build Agent process 
be run in the same Java version to avoid compatibility issues.
As the message said, the plugin tried to find the `java` binary in the 
PATH, which was impossible, so it tried to use some hardcoded paths. The 
correct way is to configure your build agent to have a Java binary in the 
PATH. How to do it depends on your distribution and the shell you use for 
the user who connects through SSH. There is plenty of documentation about 
how to set up the environment of a system/user in Linux/Unix.

Tools location is not used to locate the Java version to run the build 
agent process, it is used on jobs, so no matter the configuration you put 
there is not used.



On Monday, April 15, 2024 at 4:30:20 PM UTC+2 Mark Waite wrote:

> On Monday, April 15, 2024 at 7:09:03 AM UTC-7 Sai wrote:
>
> Hi,
>
> I have the below machine config
>
> *(Master Jenkins)*
> OS RedHat Enterprise Linux 7.6
> openjdk version "11.0.22" 2024-01-16 LTS
> path: /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-1.el7_9.x86_64/bin/java
>
>
> The Jenkins project stopped supporting RHEL 7 in Nov 2023.  RHEL 7.9 is 
> the most recent release of RHEL 7.  You're running RHEL 7.6, an outdated 
> version of an unsupported operating system.  It might work, but the Jenkins 
> project no longer tests or verifies that operating system 
>  
>
>
> * (Slave Jenkins)*
> RHEL VERSION=7.9 (Maipo)
> openjdk version "12.0.2" 2019-07-16
> path: /etc/java/jdk-12.0.2+10/bin/java
>
>
> Jenkins has never supported Java 12.  I don't recall anyone ever doing any 
> Jenkins testing or Jenkins development with Java 12.  Java 12 is also not 
> supported by the OpenJDK project.
>
> Jenkins currently supports Java 11, Java 17, and Java 21.  
>
> The installation location that you are listing for Java 12 is unexpected.  
> Applications (like Java) are not intended to be installed in the "/etc" 
> directory.  If you install Java 11 on the agent operating system using 
> either Eclipse Temurin packages or operating system packages, it will not 
> place Java in "/etc".
>
> Your options include:
>
>    - Install Java 11 on the agent and plan for future operating system 
>    upgrades to replace RHEL 7 with something that is supported
>    - Continue attempts with Java 12 on the agent after assuring that Java 
>    12 is actually installed.  You'll be running an unsupported, untested 
>    Jenkins configuration with an unsupported Java version
>    - Install Java 17 on the controller and on the agent  and plan for 
>    future operating system upgrades to replace RHEL 7 with something that is 
>    supported
>    - Install Java  21 on the controller and on the agent  and plan for 
>    future operating system upgrades to replace RHEL 7 with something that is 
>    supported
>
>
> but still jenkins not recognizing JAVA path
>
> so could anyone please help as it is urgent
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/77c5824d-4885-41f8-8d7e-03951a001144n%40googlegroups.com.

Reply via email to