Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

Thank you for your help.We just had 7-day holiday on National Day.Now the logs on show:

 

WARN [main:ehcache.AbstractEhcacheRegionFactory@180] HHH020003: Could not find a specific ehcache configuration for cache named [com.cloudera.cmf.model.DbCluster.activatedReleases]; using defaults.

ERROR [CommandPusher:inspector.InspectorMerge@153] Unexpected error gathering inspector results.

java.lang.NullPointerException
at com.cloudera.cmf.inspector.HuePythonVersionInspection.gather(HuePythonVersionInspection.java:84)
at com.cloudera.cmf.inspector.InspectorMerge.gather(InspectorMerge.java:150)
at com.cloudera.cmf.command.inspector.InspectorCommand.postGather(InspectorCommand.java:158)
at com.cloudera.cmf.command.inspector.InspectorCommand.update(InspectorCommand.java:126)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandInternal(CommandPusherThread.java:388)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandBatched(CommandPusherThread.java:220)
at com.cloudera.server.cmf.CommandPusherThread.innerLoop(CommandPusherThread.java:139)
at com.cloudera.server.cmf.CommandPusherThread.run(CommandPusherThread.java:112)

INFO [CommandPusher:datacollection.GlobalCollectHostStatisticsCommand@199] Setting command substage state. DATA_GATHERING=>FAILED

ERROR [DataArchiver-19:datacollection.HealthArchiver@76] Was unable to retrieve service and role health reports.

com.cloudera.cmf.command.datacollection.BulkHealthRequestException: MgmtServiceLocatorException while making a HOST_MONITORING health request.

at com.cloudera.cmf.command.datacollection.BulkHealthRequest.makeRequest(BulkHealthRequest.java:122)
at com.cloudera.cmf.command.datacollection.BulkHealthRequest.makeHostRequest(BulkHealthRequest.java:106)
at com.cloudera.cmf.command.datacollection.HealthArchiver.archive(HealthArchiver.java:83)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:66)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.cloudera.cmon.MgmtServiceLocatorException: Could not find a HOST_MONITORING nozzle from SCM.
at com.cloudera.cmon.MgmtServiceLocator.getNozzleIPC(MgmtServiceLocator.java:141)
at com.cloudera.cmon.MgmtServiceLocator.getNozzleIPC(MgmtServiceLocator.java:118)
at com.cloudera.cmon.MgmtServiceLocator.getNozzleIPCWrapper(MgmtServiceLocator.java:188)
at com.cloudera.cmf.command.datacollection.BulkHealthRequest.makeRequest(BulkHealthRequest.java:117)
... 8 more

408 ERROR [CommandPusher:datacollection.GlobalCollectHostStatisticsCommand@1119] Exception in future java.util.concurrent.FutureTask@2fde373d
java.util.concurrent.ExecutionException: com.cloudera.cmon.MgmtServiceLocatorException: There is no configured event store
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:202)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.getErrorFromFuture(GlobalCollectHostStatisticsCommand.java:1110)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.updateArchiverStage(GlobalCollectHostStatisticsCommand.java:1080)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.handleDataArchivers(GlobalCollectHostStatisticsCommand.java:875)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.update(GlobalCollectHostStatisticsCommand.java:571)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandInternal(CommandPusherThread.java:388)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandBatched(CommandPusherThread.java:220)
at com.cloudera.server.cmf.CommandPusherThread.innerLoop(CommandPusherThread.java:139)
at com.cloudera.server.cmf.CommandPusherThread.run(CommandPusherThread.java:112)
Caused by: com.cloudera.cmon.MgmtServiceLocatorException: There is no configured event store
at com.cloudera.cmon.MgmtServiceLocator.getEventStoreQueryProxy(MgmtServiceLocator.java:312)
at com.cloudera.cmf.command.datacollection.EventsArchiver.archive(EventsArchiver.java:68)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:66)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

2014-10-08 17:04:59,464 ERROR [DataArchiver-20:datacollection.MetricsArchiver@111] Unable to make metrics request. Skipping.
com.cloudera.cmf.command.datacollection.MetricsRequestException: MgmtServiceLocatorException while making a metrics request.
at com.cloudera.cmf.command.datacollection.MetricsRequest.makeRequest(MetricsRequest.java:159)
at com.cloudera.cmf.command.datacollection.MetricsArchiver.archive(MetricsArchiver.java:92)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:66)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.cloudera.cmon.MgmtServiceLocatorException: Could not find a HOST_MONITORING nozzle from SCM.
at com.cloudera.cmon.MgmtServiceLocator.getNozzleIPC(MgmtServiceLocator.java:141)
at com.cloudera.cmon.MgmtServiceLocator.getNozzleIPC(MgmtServiceLocator.java:118)
at com.cloudera.cmon.MgmtServiceLocator.getNozzleIPCWrapper(MgmtServiceLocator.java:188)
at com.cloudera.cmf.command.datacollection.MetricsRequest.makeRequest(MetricsRequest.java:151)
... 7 more

ERROR [CommandPusher:datacollection.GlobalCollectHostStatisticsCommand@1119] Exception in future java.util.concurrent.FutureTask@2fde373d
java.util.concurrent.ExecutionException: com.cloudera.cmon.MgmtServiceLocatorException: There is no configured event store
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:202)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.getErrorFromFuture(GlobalCollectHostStatisticsCommand.java:1110)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.updateArchiverStage(GlobalCollectHostStatisticsCommand.java:1080)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.handleDataArchivers(GlobalCollectHostStatisticsCommand.java:875)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.update(GlobalCollectHostStatisticsCommand.java:571)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandInternal(CommandPusherThread.java:388)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandBatched(CommandPusherThread.java:220)
at com.cloudera.server.cmf.CommandPusherThread.innerLoop(CommandPusherThread.java:139)
at com.cloudera.server.cmf.CommandPusherThread.run(CommandPusherThread.java:112)
Caused by: com.cloudera.cmon.MgmtServiceLocatorException: There is no configured event store
at com.cloudera.cmon.MgmtServiceLocator.getEventStoreQueryProxy(MgmtServiceLocator.java:312)
at com.cloudera.cmf.command.datacollection.EventsArchiver.archive(EventsArchiver.java:68)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:66)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

ERROR [CommandPusher:datacollection.GlobalCollectHostStatisticsCommand@894] Data archiver failed.
java.util.concurrent.ExecutionException: com.cloudera.cmon.MgmtServiceLocatorException: There is no configured event store
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.handleDataArchivers(GlobalCollectHostStatisticsCommand.java:891)
at com.cloudera.cmf.command.datacollection.GlobalCollectHostStatisticsCommand.update(GlobalCollectHostStatisticsCommand.java:571)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandInternal(CommandPusherThread.java:388)
at com.cloudera.server.cmf.CommandPusherThread.handleCommandBatched(CommandPusherThread.java:220)
at com.cloudera.server.cmf.CommandPusherThread.innerLoop(CommandPusherThread.java:139)
at com.cloudera.server.cmf.CommandPusherThread.run(CommandPusherThread.java:112)
Caused by: com.cloudera.cmon.MgmtServiceLocatorException: There is no configured event store
at com.cloudera.cmon.MgmtServiceLocator.getEventStoreQueryProxy(MgmtServiceLocator.java:312)
at com.cloudera.cmf.command.datacollection.EventsArchiver.archive(EventsArchiver.java:68)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:66)
at com.cloudera.cmf.command.datacollection.DataArchiver.call(DataArchiver.java:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

INFO [CommandPusher:datacollection.GlobalCollectHostStatisticsCommand@898] Data archivers complete.

WARN [PhoneHomeCallable-0:datacollection.PhoneHomeCallable@105] IOException while close ssh/sftp client.
net.schmizz.sshj.connection.ConnectionException: Disconnected

INFO [StaleEntityEviction:model.HeartbeatStore@107] Reaped 0 process heartbeats and 0 host heartbeats.

 

avatar
Contributor

I have installed and configured 2 hosts.One host installed oracle-j2sdk1.7  java-1.7.0-openjdk cloudera-manager-daemons cloudera-manager-server and  cloudera-manager-server-db-2,another host installed cloudera-manager-agent-5.1.2-1.cm512.p0.116.el6.x86_64.rpm  cloudera-manager-daemons.

avatar
Master Collaborator

Ok so at this point I need to clarify, there is no valid reason to install the openJDK, generally speaking we only support the oracle JDK.

 

IMHO there is something that has taken place up to this point that is preventing proper installation, perhaps things failed initially as the VM you are using failed to finish critical DB setup steps due to not having enough memory.

 

IMHO really starting over with a fresh CentOS 6.4 or 6.5 VM makes sense at this point.

 

Once that VM is created make sure you have followed the "requirements" section of our installation guide with regard to the proper configuraiton of networking on your VM, I suggest setting up bridged networking in your VM software.

 

http://www.cloudera.com/content/cloudera/en/documentation/cloudera-manager/v5-latest/Cloudera-Manage...

 

Then download the simple installler and follow the path A installation steps, using the embedded postgres DB. 

This is detailed here in the section titled "

Download and Run the Cloudera Manager Server Installer" 

http://www.cloudera.com/content/cloudera/en/documentation/cloudera-manager/v5-latest/Cloudera-Manage...

 

avatar
Master Collaborator

You will then use CM to configure you "other" host, once its started...  dont pre-install any packages on it.

avatar
Contributor

Thank you very much! I'll reinstall it again.

avatar
Contributor

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

thank you very much!

avatar
Explorer

Hi,

 

I've been having the same issue but everything is working properly at my client cluster.

 

The only thing that I'd like to clarify is that echo $JAVA_HOME command returns empty line and the client is asking my why.

 

And what get me courious about it is that on Cloudera Manager, the Java Home Directory is empt as well.

 

java -version

java version "1.7.0_45"

 

rpm -qa | grep oracle

oracle-j2sdk1.7-1.7.0+update67-1.x86_64

 

ps auxf  | grep java

/usr/java/jdk1.7.0_67-cloudera/bin/java

 

At this point I understand that there are 2 java versions installed and the whole system is using jdk1.7.0_67-cloudera.

 

So what the heck java home directory on Cloudera Manager is empty? 🙂

 

Thank you

 

Fabricio

avatar
Master Collaborator

JAVA_HOME does not need to be set in the shell for things to work (nor does linux alternatives have to point to the oracle JDK for default command line). 

 

JDK discovery is handled for the platform in /usr/share/cmf/bin/cmf-server

 

It can be set for CM in the /etc/default/cloudera-scm-server file if needed, but also within the CM UI for CDH if the JDK is in a custom location

 

 

avatar
Explorer
Hi,

Thank you for your reply.

Now everything makes sense to me.

Best

Fabricio

avatar
Contributor

If you choose to use a custom Java location, modify the host configuration to ensure the JDK can be found:
Open the Cloudera Manager Admin Console.
In the main navigation bar, click the Hosts tab and optionally click a specific host link.
Click the Configuration tab.
Select Category > Advanced.
Set the Java Home Directory property to the custom location.
Click Save Changes.