FAQ
Hi,

I followed the tutorial to install hadoop cdh4.1.2 and I have already
installed Java sun jdk1.6.0_31 and set it JAVA_HOME, but everytime I do
sudo service hadoop-0.20-mapreduce-jobtracker start, I will always get
below error message :

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

Is there any step that I should do before run this jobtracker?

Thanks.

Search Discussions

  • Kevin O'dell at Nov 11, 2012 at 3:48 pm
    Martinus,

    Is this a CM managed cluster(I am going to assume yes since this is scm
    users)? If so CM should be picking this up to set the value for you. It
    decides JAVA_HOME by looking here:
    attempt to find java
    if [ -z "$JAVA_HOME" ]; then
    for candidate in \
    /usr/lib/jvm/java-6-sun \
    /usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/ \
    /usr/lib/jvm/java-1.6.0-sun-1.6.0.* \
    /usr/lib/jvm/j2sdk1.6-oracle/jre \
    /usr/lib/jvm/j2sdk1.6-oracle \
    /usr/lib/j2sdk1.6-sun \
    /usr/java/jdk1.6* \
    /usr/java/jre1.6* \
    /Library/Java/Home \
    /usr/java/default \
    /usr/lib/jvm/default-java \
    /usr/lib/jvm/java-openjdk \
    /usr/lib/jvm/jre-openjdk \
    /usr/lib/jvm/java-1.6.0-openjdk-1.6.* \
    /usr/lib/jvm/jre-1.6.0-openjdk* ; do
    if [ -e $candidate/bin/java ]; then
    export JAVA_HOME=$candidate

    Can you verify that your java is being picked up by the candidate statement?

    On Sun, Nov 11, 2012 at 2:53 AM, Martinus Martinus wrote:

    Hi,

    I followed the tutorial to install hadoop cdh4.1.2 and I have already
    installed Java sun jdk1.6.0_31 and set it JAVA_HOME, but everytime I do
    sudo service hadoop-0.20-mapreduce-jobtracker start, I will always get
    below error message :

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

    Is there any step that I should do before run this jobtracker?

    Thanks.


    --
    Kevin O'Dell
    Customer Operations Engineer, Cloudera
  • Vinithra Varadharajan at Nov 11, 2012 at 5:31 pm
    Martinus,

    If you are using Cloudera Manager, you don't need to start the JobTracker
    from the commandline. You can either do so using the API (links below) or
    from the UI.
    http://blog.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/
    http://cloudera.github.com/cm_api/apidocs/v2/path__clusters_-clusterName-_services_-serviceName-_roleCommands_start.html

    -Vinithra

    On Sat, Nov 10, 2012 at 11:53 PM, Martinus Martinus
    wrote:
    Hi,

    I followed the tutorial to install hadoop cdh4.1.2 and I have already
    installed Java sun jdk1.6.0_31 and set it JAVA_HOME, but everytime I do
    sudo service hadoop-0.20-mapreduce-jobtracker start, I will always get
    below error message :

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

    Is there any step that I should do before run this jobtracker?

    Thanks.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedNov 11, '12 at 7:53a
activeNov 11, '12 at 5:31p
posts3
users3
websitecloudera.com
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase