Support Questions

Find answers, ask questions, and share your expertise

Error: JAVA_HOME is not set and Java could not be found

avatar
Contributor

I installed cdh5.0 follow 'Installation Path B - Manual Installation Using Cloudera Manager Packages'

When i intalled oracle-j2sdk1.7-1.7.0 cloudera-manager-daemons-5.1.2 cloudera-manager-server-5.1.2 and cloudera-manager-server-db-2-5.1.2 in my linux6.4(64bit),on  Database Setup page,i got an error like this:

INFO [JvmPauseMonitor:debug.JvmPauseMonitor@236] Detected pause in JVM or host machine (e.g. a stop the world GC, or JVM not scheduled): paused approximately 1039ms: no GCs detected.
+ cat
+======================================================================+
| Error: JAVA_HOME is not set and Java could not be found |
+----------------------------------------------------------------------+
| Please download the latest Oracle JDK from the Oracle Java web site |
| > h  t t p : /  / w w w .or acl e . c o m/technetwork/java/javase/index.html < |
| |
| Cloudera Manager requires Java 1.6 or later. |
| NOTE: This script will find Oracle Java whether you install using |
| the binary or the RPM based installer. |
+======================================================================+
+ exit 1
 
what can i do ?
1 ACCEPTED SOLUTION

avatar
Contributor

I sucessfully reinstalled it by 'Installation Path A - Automated Installation by Cloudera Manager' after increase memory to 4GB.

thank you very much!

View solution in original post

29 REPLIES 29

avatar
Contributor

in test connection web,get error:Unexpected error. Unable to verify database connection

avatar
Contributor

who can help me?

avatar
To verify if Oracle Java was installed correctly, could you provide:

# rpm -qa | grep oracle
# ls -l /usr/java

Regards,
Gautam Gopalakrishnan

avatar
Contributor

[root@cdh1 ~]# rpm -qa | grep oracle
oracle-j2sdk1.7-1.7.0+update55-2.x86_64
[root@cdh1 ~]# ls -l /usr/java/
total 4
drwxr-xr-x. 8 root root 4096 Sep 19 18:05 jdk1.7.0_55-cloudera
[root@cdh1 ~]#

 

 

Oracle Java was installed.

avatar
Contributor

how to set JAVA_HOME?

avatar
If you check the script /usr/share/cmf/bin/cmf-server on the host running
Cloudera Manager, you will see some checks for existing JDK locations. One
of them is /usr/java/jdk1.7* which matches your ls listing.

​re you able to run the "bin/java" program from that location and see if it
prints the right version?

# /usr/java/jdk1.7*/bin/java -version


Regards,
Gautam Gopalakrishnan

avatar
Contributor

here is my cloudera manager host show:

 

[root@cdh1 ~]# java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)


[root@cdh1 ~]# /usr/bin/java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)


[root@cdh1 ~]# /usr/java/jdk1.7.0_55-cloudera/bin/java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)


[root@cdh1 ~]# echo $JAVA_HOME
/usr/java/jdk1.7.0_55-cloudera


[root@cdh1 ~]# ps -ef | grep cmf-server
root 1207 1 0 21:49 ? 00:00:00 su cloudera-scm -s /bin/bash -c nohup /usr/sbin/cmf-server
root 1495 1322 0 22:12 pts/1 00:00:00 grep cmf-server

avatar
Contributor

JAVA_HOME seted in /etc/profile. and centos installed on VMware.

avatar
Contributor

[root@cdh1 ~]# whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz

 

But in /usr/share/java directory have no file