AnsweredAssumed Answered

Error: JAVA_HOME is not set

Question asked by laink on May 21, 2013
Latest reply on May 21, 2013 by laink
I am encountering the JAVA_HOME not set problem when I try to run mapr-warden

I've tried all the suggestions on the internet regarding how to set JAVA_HOME for sudo but I'm still stuck with the problem.

The strange thing is I was encountering the same error when I ran: /opt/mapr/bin/maprcli

But after I got the JAVA_HOME set for sudo, I am not encountering the error for maprcli. But I still encounter it for mapr-warden.

I looked through the logs. I suspect the error is encountered when the warden tries to start jobtracker. Right now, the mapr-jobtracker is not able to start up.

I've been trying various things over the past few days and basically am at wits end. I'll appreciate any help.

This is the java version and JAVA_HOME setting:

    $ sudo java -version
    java version "1.6.0_24"
    OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-
    OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
    $ sudo echo "$JAVA_HOME"

 As you can see, within sudo, it is able to find java and the versionis 1.6.0_24. The JAVA_HOME environment variable is also set.

This is the error I get when I run mapwarden

    $ sudo service mapr-warden stop
    stopping WARDEN
    looking to stop mapr-core processes not started by warden
    $ sudo service mapr-warden status
    /opt/mapr/logs/ exists with pid 10909 but no WARDEN.
    $ sudo service mapr-warden starts
    Usage: /etc/init.d/mapr-warden {start|stop|status|restart|}
    $ sudo service mapr-warden start
    |      Error: JAVA_HOME is not set and Java could not be found         |
    | Please download the latest Sun JDK from the Sun Java web site        |
    |       > <                      |
    |                                                                      |
    | Hadoop requires Java 1.6 or later.                                   |
    | NOTE: This script will find Sun Java whether you install using the   |
    |       binary or the RPM based installer.                             |
    mkdir: missing operand
    Try `mkdir --help' for more information.
    Starting WARDEN, logging to /opt/mapr/logs/warden.log
    For diagnostics look at /opt/mapr/logs/ for createsystemvolumes.log, warden.logs