Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Error: JAVA_HOME is set explicitly but still not found

Error: JAVA_HOME is set explicitly but still not found

New Contributor

Hi all,

 

I am trying to install a Cloudera client on a Centos 6.5 box. I have an existing install of Java on the box from installing ElasticSearch and I have declared this Java install in /etc/default/cloudera-scm-agent with "export CMF_AGENT_JAVA_HOME=/opt/jdk1.8.0_72" yet I still get the following error:

 

[22/Mar/2016 18:58:40 +0000] 21188 MainThread tmpfs INFO Reusing mounted tmpfs at /var/run/cloudera-scm-agent/process
[22/Mar/2016 18:58:41 +0000] 21188 MainThread agent INFO Trying to connect to newly launched supervisor (Attempt 1)
[22/Mar/2016 18:58:41 +0000] 21188 MainThread agent INFO Supervisor version: 3.0
[22/Mar/2016 18:58:41 +0000] 21188 MainThread agent INFO Successfully connected to supervisor
[22/Mar/2016 18:58:41 +0000] 21188 MainThread status_server INFO Using maximum impala profile bundle size of 1073741824 bytes.
[22/Mar/2016 18:58:41 +0000] 21188 MainThread status_server INFO Using maximum stacks log bundle size of 1073741824 bytes.
[22/Mar/2016 18:58:41 +0000] 21188 MainThread _cplogging INFO [22/Mar/2016:18:58:41] ENGINE Bus STARTING
[22/Mar/2016 18:58:41 +0000] 21188 MainThread _cplogging INFO [22/Mar/2016:18:58:41] ENGINE Started monitor thread '_TimeoutMonitor'.
[22/Mar/2016 18:58:41 +0000] 21188 MainThread _cplogging INFO [22/Mar/2016:18:58:41] ENGINE Serving on Shelob.zepko.local:9000
[22/Mar/2016 18:58:41 +0000] 21188 MainThread _cplogging INFO [22/Mar/2016:18:58:41] ENGINE Bus STARTED
[22/Mar/2016 18:58:41 +0000] 21188 MainThread __init__ INFO New monitor: (<cmf.monitor.host.HostMonitor object at 0x2777290>,)
[22/Mar/2016 18:58:41 +0000] 21188 MonitorDaemon-Scheduler __init__ INFO Monitor ready to report: ('HostMonitor',)
[22/Mar/2016 18:58:41 +0000] 21188 MainThread agent INFO Setting default socket timeout to 30
[22/Mar/2016 18:58:41 +0000] 21188 Monitor-HostMonitor network_interfaces WARNING NIC iface eth0 returned unexpected error (1): Operation not permitted
[22/Mar/2016 18:58:41 +0000] 21188 Monitor-HostMonitor network_interfaces WARNING NIC iface eth1 returned unexpected error (1): Operation not permitted
[22/Mar/2016 18:58:41 +0000] 21188 MainThread agent INFO Using parcels directory from server provided value: /opt/cloudera/parcels
[22/Mar/2016 18:58:41 +0000] 21188 MainThread parcel INFO Agent does create users/groups and apply file permissions
[22/Mar/2016 18:58:41 +0000] 21188 MainThread downloader INFO Downloader path: /opt/cloudera/parcel-cache
[22/Mar/2016 18:58:41 +0000] 21188 MainThread parcel_cache INFO Using /opt/cloudera/parcel-cache for parcel cache
[22/Mar/2016 18:58:42 +0000] 21188 MainThread agent INFO Active parcel list updated; recalculating component info.
[22/Mar/2016 18:58:42 +0000] 21188 MainThread version_detector INFO Identified java component java8 with full version JAVA_HOME=/opt/jdk1.8.0_72 java version "1.8.0_72" Java(TM) SE Runtime Environment (build 1.8.0_72-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode) for requested version .
[22/Mar/2016 18:59:11 +0000] 21188 DnsResolutionMonitor throttling_logger INFO Failed to get Java location: ['', "+ BIGTOP_JAVA_MAJOR=\n+ version=\n+ locate_java_home\n+ locate_java_home_no_verify\n+ JAVA6_HOME_CANDIDATES=('/usr/lib/j2sdk1.6-sun' '/usr/lib/jvm/java-6-sun' '/usr/lib/jvm/java-1.6.0-sun-1.6.0' '/usr/lib/jvm/j2sdk1.6-oracle' '/usr/lib/jvm/j2sdk1.6-oracle/jre' '/usr/java/jdk1.6' '/usr/java/jre1.6')\n+ local JAVA6_HOME_CANDIDATES\n+ OPENJAVA6_HOME_CANDIDATES=('/usr/lib/jvm/java-1.6.0-openjdk' '/usr/lib/jvm/jre-1.6.0-openjdk')\n+ local OPENJAVA6_HOME_CANDIDATES\n+ JAVA7_HOME_CANDIDATES=('/usr/java/jdk1.7' '/usr/java/jre1.7' '/usr/lib/jvm/j2sdk1.7-oracle' '/usr/lib/jvm/j2sdk1.7-oracle/jre' '/usr/lib/jvm/java-7-oracle')\n+ local JAVA7_HOME_CANDIDATES\n+ OPENJAVA7_HOME_CANDIDATES=('/usr/lib/jvm/java-1.7.0-openjdk' '/usr/lib/jvm/java-7-openjdk')\n+ local OPENJAVA7_HOME_CANDIDATES\n+ JAVA8_HOME_CANDIDATES=('/usr/java/jdk1.8' '/usr/java/jre1.8' '/usr/lib/jvm/j2sdk1.8-oracle' '/usr/lib/jvm/j2sdk1.8-oracle/jre' '/usr/lib/jvm/java-8-oracle')\n+ local JAVA8_HOME_CANDIDATES\n+ OPENJAVA8_HOME_CANDIDATES=('/usr/lib/jvm/java-1.8.0-openjdk' '/usr/lib/jvm/java-8-openjdk')\n+ local OPENJAVA8_HOME_CANDIDATES\n+ MISCJAVA_HOME_CANDIDATES=('/Library/Java/Home' '/usr/java/default' '/usr/lib/jvm/default-java' '/usr/lib/jvm/java-openjdk' '/usr/lib/jvm/jre-openjdk')\n+ local MISCJAVA_HOME_CANDIDATES\n+ case ${BIGTOP_JAVA_MAJOR} in\n+ JAVA_HOME_CANDIDATES=(${JAVA7_HOME_CANDIDATES[@]} ${JAVA8_HOME_CANDIDATES[@]} ${JAVA6_HOME_CANDIDATES[@]} ${MISCJAVA_HOME_CANDIDATES[@]} ${OPENJAVA7_HOME_CANDIDATES[@]} ${OPENJAVA8_HOME_CANDIDATES[@]} ${OPENJAVA6_HOME_CANDIDATES[@]})\n+ '[' -z '' ']'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/jdk1.7*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/jre1.7*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/j2sdk1.7-oracle*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/j2sdk1.7-oracle/jre*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-7-oracle*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/jdk1.8*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/jre1.8*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/j2sdk1.8-oracle*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/j2sdk1.8-oracle/jre*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-8-oracle*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/j2sdk1.6-sun*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-6-sun*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-1.6.0-sun-1.6.0*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/j2sdk1.6-oracle*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/j2sdk1.6-oracle/jre*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/jdk1.6*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/jre1.6*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/Library/Java/Home*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/java/default*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/default-java*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/jre-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-1.7.0-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-7-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-1.8.0-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-8-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/java-1.6.0-openjdk*'\n+ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'\n++ ls -rvd '/usr/lib/jvm/jre-1.6.0-openjdk*'\n+ verify_java_home\n+ '[' -z '' ']'\n+ cat\n+======================================================================+\n| Error: JAVA_HOME is not set and Java could not be found |\n+----------------------------------------------------------------------+\n| Please download the latest Oracle JDK from the Oracle Java web site |\n| > http://www.oracle.com/technetwork/java/javase/index.html < |\n| |\n| Cloudera Manager requires Java 1.6 or later. |\n| NOTE: This script will find Oracle Java whether you install using |\n| the binary or the RPM based installer. |\n+======================================================================+\n+ exit 1\n"]
[22/Mar/2016 18:59:11 +0000] 21188 DnsResolutionMonitor throttling_logger INFO DnsTest not running. Java not located.
[22/Mar/2016 19:00:43 +0000] 21188 MainThread version_detector INFO Identified java component java8 with full version JAVA_HOME=/opt/jdk1.8.0_72 java version "1.8.0_72" Java(TM) SE Runtime Environment (build 1.8.0_72-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode) for requested version .

 

 

Help :(

2 REPLIES 2
Highlighted

Re: Error: JAVA_HOME is set explicitly but still not found

Rising Star

@AdamTheAnalyst 

Can you add the java patch in /etc/default/cloudera-scm-server

export JAVA_HOME="/usr/java/jdk1.8.0_72-cloudera"

and restart the CM server. Also check the Java Home Directory in CM > Hosts > All host > Configuration.

Re: Error: JAVA_HOME is set explicitly but still not found

Rising Star

@AdamTheAnalyst Sorry for typo add the java path. If that resolves your issue, please spare some time in accepting the solution. Thanks.

Don't have an account?
Coming from Hortonworks? Activate your account here