Posts: 17
Registered: ‎06-16-2016
Accepted Solution

JAVA_HOME not set for clients

CDM version: 5.7.1

I've set the Java Home Directory in the hosts config to /opt/java/jdk

It's picked up properly by all services, but not by clients


For example running the yarn command, it will complain JAVA_HOME is not set


The file used to check for JAVA_HOME is:



Apparently this file is not checking the hosts config setting. I'm surprised by that.

The info for this option says:

Explicitly set the value of JAVA_HOME for all processes. This will override the auto-detection logic that is normally used.


Why doesn't it apply to client processes?



Cloudera Employee
Posts: 16
Registered: ‎08-16-2016

Re: JAVA_HOME not set for clients

Posts: 17
Registered: ‎06-16-2016

Re: JAVA_HOME not set for clients

a case was opened with support, confirmed that the Java home directory override currently only applies to servers, not to clients.This can lead to Java version inconsistencies.


This will be resolved in a future version, and can be tracked via OPSAPS-40053


To specify a Java home directory for all clients, set the variable in file /etc/default/bigtop-utils