- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Error: JAVA_HOME is not set and Java could not be found
- Labels:
-
Cloudera Manager
-
Manual Installation
Created on ‎09-18-2014 08:54 PM - edited ‎09-16-2022 02:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
+======================================================================+
| 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
Created ‎10-14-2014 01:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I sucessfully reinstalled it by 'Installation Path A - Automated Installation by Cloudera Manager' after increase memory to 4GB.
thank you very much!
Created ‎09-26-2014 03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to set java_home ?
who can help me ?
Created ‎09-26-2014 02:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can set "JAVA_HOME" in /etc/defaults/cloudera-scm-server
add to the end of the file
export JAVA_HOME=/usr/java/jdk1.7.0_55
Created ‎09-27-2014 07:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help
I set the java_home in /etc/default/cloudera-scm-server with 'export JAVA_HOME=/usr/java/jdk1.7.0_55-cloudera',but when click 'test connection' in Add Cloudera ManagementService with browser,i got the same error 'Unexpected error. Unable to verify database connection.', and the /var/log/cloudera-scm-server/cloudera-scm-server.log file show 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 1024ms: no GCs detected.
+======================================================================+
| Error: JAVA_HOME is not set and Java could not be found |
+----------------------------------------------------------------------+
| Please download the latest Oracle JDK from the Oracle Java web site |
| > http://www.oracle.com/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
Here is the java_home configure show:
[root@cdh1 ~]# tail /etc/default/cloudera-scm-server
# Java Options.
#
# Default value sets Java maximum heap size to 2GB, and Java maximum permanent
# generation size to 256MB.
#
export CMF_JAVA_OPTS="-Xmx2G -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp"
export JAVA_HOME=/usr/java/jdk1.7.0_55-cloudera
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
[root@cdh1 ~]#
[root@cdh1 ~]#
[root@cdh1 ~]# echo $JAVA_HOME
/usr/java/jdk1.7.0_55-cloudera/
[root@cdh1 ~]# ls /usr/java/jdk1.7.0_55-cloudera/
bin db jre LICENSE README.html src.zip THIRDPARTYLICENSEREADME.txt
COPYRIGHT include lib man release THIRDPARTYLICENSEREADME-JAVAFX.txt
[root@cdh1 ~]#
Is there something wrong? any how can i do?
Created ‎09-28-2014 09:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK so realize NONE of this should be necessary, and this is not normal to need to configure things this way. It is not necessary to have to set JAVA_HOME.
I think we need to focus on this part of the message, rather than the JAVA_HOME message which appears to be a false-positive error.
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 1024ms: no GCs detected.
How much memory is configured for your VM you are attempting to run things on? How much physical memory does the system you are running the VM on have?
It appears the 1.7 openJDK has been installed as well, which is alongside of the oracle JDK on the system.
What do you get for the following commands on the system:
# ls -l /usr/java
# yum list installed "*jdk*"
Thanks
Todd
Created ‎09-28-2014 06:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply!
The memory is configured for my VM i'm attempting to run things on is 512MB, and physical memory the system i'm running the VM on is 8GB.
The following commands on the system get like this:
# ls -l /usr/java
total 4
drwxr-xr-x. 8 root root 4096 Sep 19 18:05 jdk1.7.0_55-cloudera
# yum list installed "*jdk*"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cug.edu.cn
* extras: mirrors.cug.edu.cn
* updates: mirrors.btte.net
base | 3.7 kB 00:00
extras | 3.3 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 5.3 MB 00:01
Installed Packages
java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.el6_5 @updates
Created ‎09-29-2014 12:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help!
Memory configured for VM running things on is 512MB,and the physical memory the VM running on is 8GB.
The following commands get show:
[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 ~]# yum list installed "*jdk*"
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.yun-idc.com
* extras: mirrors.yun-idc.com
* updates: mirrors.btte.net
base | 3.7 kB 00:00
extras | 3.3 kB 00:00
updates | 3.4 kB 00:00
Installed Packages
java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.el6_5 @updates
Created ‎09-29-2014 10:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok at this point I would suggest reviewing the "requirements" section, here.
Also realize you need memory for CDH, so running the VM at a minimum of 4GB memory is necessary.
The issue you are seeing is because there is not enough memory, Cloudera Manager and CDH are memory intensive applicaitons. The JAVA_HOME error message you are seeing is due to this (the message is a false indication of the problem, as I stated in my previous note.
Created ‎09-29-2014 07:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much!
I set the memory of VM to 4GB,but i got the same error.
Created ‎09-29-2014 07:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Need i reinstall the centos system?
Created ‎09-30-2014 04:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
