FAQ
Hi,

I installed CM4 free edition and then CDH4 on 2 node cluster. After
installation I was able to start all services (HDFS, Hue, MapReduce,
Oozie, Zookeeper) but HBase service does not start. Below is the error
log.

I researched a bit in this group that led me to creating a HBase root
directory. Even that did not help. Appreciate your help.

Thanks,
Himansu


Fri Jun 15 12:11:36 PDT 2012
+ locate_java_home
+ '[' -z '' ']'
+ 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*'
+ '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
+ 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*'
+ '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
+ 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*'
+ '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
+ 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*'
+ '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
+ 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*'
+ '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
+ 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*'
+ '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
+ 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*'
+ '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
+ export JAVA_HOME=/usr/java/jdk1.6.0_31
+ JAVA_HOME=/usr/java/jdk1.6.0_31
+ break
+ '[' -z /usr/java/jdk1.6.0_31 ']'
+ echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
+ echo 'using 4 as CDH_VERSION'
+ echo 'using /usr/lib/hbase as HBASE_HOME'
+ echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
HBASE_CONF_DIR'
+ echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
HADOOP_CONF_DIR'
+ echo 'using /usr/lib/hadoop as HADOOP_HOME'
+ set_hbase_classpath
+ set_classpath_in_var HBASE_CLASSPATH
+ '[' -z HBASE_CLASSPATH ']'
+ '[' /usr/share/cmf ']'
++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
++ tr -d '\n'
+ ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
+ eval 'OLD_VALUE=$HBASE_CLASSPATH'
++ OLD_VALUE=
+ '[' -z ']'
+ export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
publish-4.0.1-shaded.jar
+ HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
shaded.jar
+ set -x
+ export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
MASTER
+ HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
+ perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
hdfs-site.xml
+ acquire_kerberos_tgt hbase.keytab
+ '[' -z hbase.keytab ']'
+ '[' -n '' ']'
+ '[' region_mover = master ']'
+ '[' toggle_balancer = master ']'
+ '[' '' '!=' '' ']'
+ exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
process/74-hbase-MASTER master start
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
hadoop/util/PlatformName
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.util.PlatformName
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.hadoop.util.PlatformName.
Program will exit.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
hadoop/io/Writable
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.io.Writable
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class:
org.apache.hadoop.hbase.master.HMaster. Program will exit.

Search Discussions

  • Herman Chen at Jun 15, 2012 at 8:27 pm
    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Ricky Saltzer at Jun 15, 2012 at 8:45 pm
    If this is a CM4 installation, you may need to re-deploy your client
    configuration.
    On Fri, Jun 15, 2012 at 4:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Himansu Sekhar at Jun 15, 2012 at 10:00 pm
    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Herman Chen at Jun 16, 2012 at 12:44 am
    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:


    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if you
    have it on some hosts, it's probably not installed on the host running the
    master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Himansu Sekhar at Jun 16, 2012 at 3:48 am
    Thanks Herman. But is it possible to run HDFS and other services when the
    hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did not
    install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if you
    have it on some hosts, it's probably not installed on the host running the
    master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Herman Chen at Jun 16, 2012 at 4:19 am
    Most services, including HDFS, should require the package too. Did you
    verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the package
    should be installed. If it said successful then it may be a bug. It'd be
    helpful if you can provide us the logs.

    Herman
    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when the
    hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did not
    install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if you
    have it on some hosts, it's probably not installed on the host running the
    master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g' /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Himansu Sekhar at Jun 18, 2012 at 5:01 pm
    Hi Herman,

    Looks like the packages are installed, I can see /usr/bin/hadoop and
    /usr/lib/hadoop/hadoop-common.jar.
    I didn't find the "which" command. But here is the output of "hadoop
    version" -

    [root@cloudera-cdh-1 bin]# hadoop version
    /usr/lib/hadoop/bin/hadoop: line 20: which: command not found
    dirname: missing operand
    Try `dirname --help' for more information.
    Hadoop 2.0.0-cdh4.0.0
    Subversion
    file:///data/1/jenkins/workspace/generic-package-centos64-5-5/topdir/BUILD/hadoop-2.0.0-cdh4.0.0/src/hadoop-common-project/hadoop-common
    -r 5d678f6bb1f2bc49e2287dd69ac41d7232fc9cdc
    Compiled by jenkins on Mon Jun 4 16:52:42 PDT 2012
    From source with checksum 64f877fc49f5adc0d7d55c13089e866e
    [root@cloudera-cdh-1 bin]#

    Can you tell me what log files you want and where I can find them?

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 9:19 PM, Herman Chen wrote:

    Most services, including HDFS, should require the package too. Did you
    verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the package
    should be installed. If it said successful then it may be a bug. It'd be
    helpful if you can provide us the logs.

    Herman

    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when the
    hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did not
    install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if
    you have it on some hosts, it's probably not installed on the host running
    the master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e 's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g'
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Herman Chen at Jun 18, 2012 at 6:35 pm
    Himansu,

    So it looks like the problem if you don't have 'which' installed, and the
    hbase script depends on that. You could try installing 'which' manually,
    and then it should work. Could you also tell me what linux distribution
    you're using?

    Herman
    On Mon, Jun 18, 2012 at 10:00 AM, Himansu Sekhar wrote:

    Hi Herman,

    Looks like the packages are installed, I can see /usr/bin/hadoop and
    /usr/lib/hadoop/hadoop-common.jar.
    I didn't find the "which" command. But here is the output of "hadoop
    version" -

    [root@cloudera-cdh-1 bin]# hadoop version
    /usr/lib/hadoop/bin/hadoop: line 20: which: command not found
    dirname: missing operand
    Try `dirname --help' for more information.
    Hadoop 2.0.0-cdh4.0.0
    Subversion
    file:///data/1/jenkins/workspace/generic-package-centos64-5-5/topdir/BUILD/hadoop-2.0.0-cdh4.0.0/src/hadoop-common-project/hadoop-common
    -r 5d678f6bb1f2bc49e2287dd69ac41d7232fc9cdc
    Compiled by jenkins on Mon Jun 4 16:52:42 PDT 2012
    From source with checksum 64f877fc49f5adc0d7d55c13089e866e
    [root@cloudera-cdh-1 bin]#

    Can you tell me what log files you want and where I can find them?

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 9:19 PM, Herman Chen wrote:

    Most services, including HDFS, should require the package too. Did you
    verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the package
    should be installed. If it said successful then it may be a bug. It'd be
    helpful if you can provide us the logs.

    Herman

    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when
    the hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did not
    install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if
    you have it on some hosts, it's probably not installed on the host running
    the master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the
    error
    log.

    I researched a bit in this group that led me to creating a HBase root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    + ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    + HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e
    's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g'
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Himansu Sekhar at Jun 18, 2012 at 7:10 pm
    I am using this -
    Linux version 2.6.18-308.8.1.el5 (mockbuild@builder10.centos.org) (gcc
    version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Tue May 29 14:57:25 EDT
    2012
    Centos Release 5.8 (Final)

    Can you tell me how to install 'which' manually?

    Thanks,
    Himansu
    On Mon, Jun 18, 2012 at 11:34 AM, Herman Chen wrote:

    Himansu,

    So it looks like the problem if you don't have 'which' installed, and the
    hbase script depends on that. You could try installing 'which' manually,
    and then it should work. Could you also tell me what linux distribution
    you're using?

    Herman

    On Mon, Jun 18, 2012 at 10:00 AM, Himansu Sekhar wrote:

    Hi Herman,

    Looks like the packages are installed, I can see /usr/bin/hadoop and
    /usr/lib/hadoop/hadoop-common.jar.
    I didn't find the "which" command. But here is the output of "hadoop
    version" -

    [root@cloudera-cdh-1 bin]# hadoop version
    /usr/lib/hadoop/bin/hadoop: line 20: which: command not found
    dirname: missing operand
    Try `dirname --help' for more information.
    Hadoop 2.0.0-cdh4.0.0
    Subversion
    file:///data/1/jenkins/workspace/generic-package-centos64-5-5/topdir/BUILD/hadoop-2.0.0-cdh4.0.0/src/hadoop-common-project/hadoop-common
    -r 5d678f6bb1f2bc49e2287dd69ac41d7232fc9cdc
    Compiled by jenkins on Mon Jun 4 16:52:42 PDT 2012
    From source with checksum 64f877fc49f5adc0d7d55c13089e866e
    [root@cloudera-cdh-1 bin]#

    Can you tell me what log files you want and where I can find them?

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 9:19 PM, Herman Chen wrote:

    Most services, including HDFS, should require the package too. Did you
    verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the
    package should be installed. If it said successful then it may be a bug.
    It'd be helpful if you can provide us the logs.

    Herman

    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when
    the hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did
    not install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if
    you have it on some hosts, it's probably not installed on the host running
    the master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue, MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the
    error
    log.

    I researched a bit in this group that led me to creating a HBase
    root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    +
    ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    +
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e
    's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g'
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config
    /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Himansu Sekhar at Jun 18, 2012 at 7:45 pm
    Got it working!!

    You were right, it was looking for "which". I installed "which" with my
    sysadmin's help and was able to start the HBase services.

    Thanks a lot for your help.

    -Himansu
    On Mon, Jun 18, 2012 at 12:10 PM, Himansu Sekhar wrote:

    I am using this -
    Linux version 2.6.18-308.8.1.el5 (mockbuild@builder10.centos.org) (gcc
    version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Tue May 29 14:57:25 EDT
    2012
    Centos Release 5.8 (Final)

    Can you tell me how to install 'which' manually?

    Thanks,
    Himansu

    On Mon, Jun 18, 2012 at 11:34 AM, Herman Chen wrote:

    Himansu,

    So it looks like the problem if you don't have 'which' installed, and the
    hbase script depends on that. You could try installing 'which' manually,
    and then it should work. Could you also tell me what linux distribution
    you're using?

    Herman

    On Mon, Jun 18, 2012 at 10:00 AM, Himansu Sekhar wrote:

    Hi Herman,

    Looks like the packages are installed, I can see /usr/bin/hadoop and
    /usr/lib/hadoop/hadoop-common.jar.
    I didn't find the "which" command. But here is the output of "hadoop
    version" -

    [root@cloudera-cdh-1 bin]# hadoop version
    /usr/lib/hadoop/bin/hadoop: line 20: which: command not found
    dirname: missing operand
    Try `dirname --help' for more information.
    Hadoop 2.0.0-cdh4.0.0
    Subversion
    file:///data/1/jenkins/workspace/generic-package-centos64-5-5/topdir/BUILD/hadoop-2.0.0-cdh4.0.0/src/hadoop-common-project/hadoop-common
    -r 5d678f6bb1f2bc49e2287dd69ac41d7232fc9cdc
    Compiled by jenkins on Mon Jun 4 16:52:42 PDT 2012
    From source with checksum 64f877fc49f5adc0d7d55c13089e866e
    [root@cloudera-cdh-1 bin]#

    Can you tell me what log files you want and where I can find them?

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 9:19 PM, Herman Chen wrote:

    Most services, including HDFS, should require the package too. Did you
    verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the
    package should be installed. If it said successful then it may be a bug.
    It'd be helpful if you can provide us the logs.

    Herman

    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when
    the hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did
    not install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if
    you have it on some hosts, it's probably not installed on the host running
    the master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue,
    MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the
    error
    log.

    I researched a bit in this group that led me to creating a HBase
    root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER
    as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER
    as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    +
    ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    +
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e
    's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g'
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config
    /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native
    Method)
    at
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native
    Method)
    at
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Herman Chen at Jun 18, 2012 at 8:28 pm
    Congratulations (missed this earlier). We will try to auto detect this
    problem in the future. Enjoy hadoop!

    Herman
    On Mon, Jun 18, 2012 at 12:45 PM, Himansu Sekhar wrote:

    Got it working!!

    You were right, it was looking for "which". I installed "which" with my
    sysadmin's help and was able to start the HBase services.

    Thanks a lot for your help.

    -Himansu

    On Mon, Jun 18, 2012 at 12:10 PM, Himansu Sekhar wrote:

    I am using this -
    Linux version 2.6.18-308.8.1.el5 (mockbuild@builder10.centos.org) (gcc
    version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Tue May 29 14:57:25 EDT
    2012
    Centos Release 5.8 (Final)

    Can you tell me how to install 'which' manually?

    Thanks,
    Himansu

    On Mon, Jun 18, 2012 at 11:34 AM, Herman Chen wrote:

    Himansu,

    So it looks like the problem if you don't have 'which' installed, and
    the hbase script depends on that. You could try installing 'which'
    manually, and then it should work. Could you also tell me what linux
    distribution you're using?

    Herman

    On Mon, Jun 18, 2012 at 10:00 AM, Himansu Sekhar wrote:

    Hi Herman,

    Looks like the packages are installed, I can see /usr/bin/hadoop and
    /usr/lib/hadoop/hadoop-common.jar.
    I didn't find the "which" command. But here is the output of "hadoop
    version" -

    [root@cloudera-cdh-1 bin]# hadoop version
    /usr/lib/hadoop/bin/hadoop: line 20: which: command not found
    dirname: missing operand
    Try `dirname --help' for more information.
    Hadoop 2.0.0-cdh4.0.0
    Subversion
    file:///data/1/jenkins/workspace/generic-package-centos64-5-5/topdir/BUILD/hadoop-2.0.0-cdh4.0.0/src/hadoop-common-project/hadoop-common
    -r 5d678f6bb1f2bc49e2287dd69ac41d7232fc9cdc
    Compiled by jenkins on Mon Jun 4 16:52:42 PDT 2012
    From source with checksum 64f877fc49f5adc0d7d55c13089e866e
    [root@cloudera-cdh-1 bin]#

    Can you tell me what log files you want and where I can find them?

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 9:19 PM, Herman Chen wrote:

    Most services, including HDFS, should require the package too. Did
    you verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the
    package should be installed. If it said successful then it may be a bug.
    It'd be helpful if you can provide us the logs.

    Herman

    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when
    the hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did
    not install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even
    if you have it on some hosts, it's probably not installed on the host
    running the master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster.
    After
    installation I was able to start all services (HDFS, Hue,
    MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the
    error
    log.

    I researched a bit in this group that led me to creating a HBase
    root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER
    as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER
    as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    +
    ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    +
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e
    's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g'
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config
    /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native
    Method)
    at
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native
    Method)
    at
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.
  • Herman Chen at Jun 18, 2012 at 8:16 pm
    Try "yum install which".

    Herman
    On Mon, Jun 18, 2012 at 12:10 PM, Himansu Sekhar wrote:

    I am using this -
    Linux version 2.6.18-308.8.1.el5 (mockbuild@builder10.centos.org) (gcc
    version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Tue May 29 14:57:25 EDT
    2012
    Centos Release 5.8 (Final)

    Can you tell me how to install 'which' manually?

    Thanks,
    Himansu
    On Mon, Jun 18, 2012 at 11:34 AM, Herman Chen wrote:

    Himansu,

    So it looks like the problem if you don't have 'which' installed, and the
    hbase script depends on that. You could try installing 'which' manually,
    and then it should work. Could you also tell me what linux distribution
    you're using?

    Herman

    On Mon, Jun 18, 2012 at 10:00 AM, Himansu Sekhar wrote:

    Hi Herman,

    Looks like the packages are installed, I can see /usr/bin/hadoop and
    /usr/lib/hadoop/hadoop-common.jar.
    I didn't find the "which" command. But here is the output of "hadoop
    version" -

    [root@cloudera-cdh-1 bin]# hadoop version
    /usr/lib/hadoop/bin/hadoop: line 20: which: command not found
    dirname: missing operand
    Try `dirname --help' for more information.
    Hadoop 2.0.0-cdh4.0.0
    Subversion
    file:///data/1/jenkins/workspace/generic-package-centos64-5-5/topdir/BUILD/hadoop-2.0.0-cdh4.0.0/src/hadoop-common-project/hadoop-common
    -r 5d678f6bb1f2bc49e2287dd69ac41d7232fc9cdc
    Compiled by jenkins on Mon Jun 4 16:52:42 PDT 2012
    From source with checksum 64f877fc49f5adc0d7d55c13089e866e
    [root@cloudera-cdh-1 bin]#

    Can you tell me what log files you want and where I can find them?

    Thanks,
    Himansu
    On Fri, Jun 15, 2012 at 9:19 PM, Herman Chen wrote:

    Most services, including HDFS, should require the package too. Did you
    verify whether the package is installed, and that for example
    /usr/bin/hadoop and /usr/lib/hadoop/hadoop-common.jar are there? If the
    files are actually there, then see what "which hadoop" returns.

    If you set up the hosts through CM4's host installation, then the
    package should be installed. If it said successful then it may be a bug.
    It'd be helpful if you can provide us the logs.

    Herman

    On Fri, Jun 15, 2012 at 8:47 PM, Himansu Sekhar wrote:

    Thanks Herman. But is it possible to run HDFS and other services when
    the hadoop common package is missing? Because all other services started
    successfully.

    Also, is it possible that CM4 says "installation successful" but did
    not install the hadoop package?

    Appreciate your inputs.

    Thanks,
    Himansu

    On Fri, Jun 15, 2012 at 5:43 PM, Herman Chen wrote:

    Hi,

    It looks like you're missing the hadoop common package (for
    example hadoop-2.0.0+91-1.cdh4.1.0.p0.424.el5) on that host. From the log:

    ++ which hadoop
    + HADOOP_IN_PATH=
    + '[' -f ']'

    So it's unable to load the libraries under /usr/lib/hadoop. Even if
    you have it on some hosts, it's probably not installed on the host running
    the master. Hope that helps.

    Herman
    On Fri, Jun 15, 2012 at 3:00 PM, Himansu Sekhar wrote:

    I did that and here is the err log attached.

    Thanks,
    Himansu


    On Fri, Jun 15, 2012 at 1:26 PM, Herman Chen wrote:

    Hi,

    This looks like a classpath problem. Could you edit your
    /usr/lib/hbase/bin/hbase to insert a "set -x" in the beginning, retry and
    show us the error log again? Thanks.

    Herman
    On Fri, Jun 15, 2012 at 12:18 PM, Himansu wrote:

    Hi,

    I installed CM4 free edition and then CDH4 on 2 node cluster. After
    installation I was able to start all services (HDFS, Hue,
    MapReduce,
    Oozie, Zookeeper) but HBase service does not start. Below is the
    error
    log.

    I researched a bit in this group that led me to creating a HBase
    root
    directory. Even that did not help. Appreciate your help.

    Thanks,
    Himansu


    Fri Jun 15 12:11:36 PDT 2012
    + locate_java_home
    + '[' -z '' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/java-6-sun/bin/java ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre//bin/java' ']'
    + 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*'
    + '[' -e '/usr/lib/jvm/java-1.6.0-sun-1.6.0.*/bin/java' ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/jre/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/jvm/j2sdk1.6-oracle/bin/java ']'
    + 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*'
    + '[' -e /usr/lib/j2sdk1.6-sun/bin/java ']'
    + 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*'
    + '[' -e /usr/java/jdk1.6.0_31/bin/java ']'
    + export JAVA_HOME=/usr/java/jdk1.6.0_31
    + JAVA_HOME=/usr/java/jdk1.6.0_31
    + break
    + '[' -z /usr/java/jdk1.6.0_31 ']'
    + echo 'using /usr/java/jdk1.6.0_31 as JAVA_HOME'
    + echo 'using 4 as CDH_VERSION'
    + echo 'using /usr/lib/hbase as HBASE_HOME'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER
    as
    HBASE_CONF_DIR'
    + echo 'using /var/run/cloudera-scm-agent/process/74-hbase-MASTER
    as
    HADOOP_CONF_DIR'
    + echo 'using /usr/lib/hadoop as HADOOP_HOME'
    + set_hbase_classpath
    + set_classpath_in_var HBASE_CLASSPATH
    + '[' -z HBASE_CLASSPATH ']'
    + '[' /usr/share/cmf ']'
    ++ find /usr/share/cmf/lib/plugins -name 'event-publish-*.jar'
    ++ tr -d '\n'
    +
    ADD_TO_CP=/usr/share/cmf/lib/plugins/event-publish-4.0.1-shaded.jar
    + eval 'OLD_VALUE=$HBASE_CLASSPATH'
    ++ OLD_VALUE=
    + '[' -z ']'
    + export HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-
    publish-4.0.1-shaded.jar
    + HBASE_CLASSPATH=/usr/share/cmf/lib/plugins/event-publish-4.0.1-
    shaded.jar
    + set -x
    + export
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-
    MASTER
    +
    HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/74-hbase-MASTER
    + perl -pi -e
    's#{{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/
    74-hbase-MASTER#g'
    /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    core-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hbase-site.xml /var/run/cloudera-scm-agent/process/74-hbase-MASTER/
    hdfs-site.xml
    + acquire_kerberos_tgt hbase.keytab
    + '[' -z hbase.keytab ']'
    + '[' -n '' ']'
    + '[' region_mover = master ']'
    + '[' toggle_balancer = master ']'
    + '[' '' '!=' '' ']'
    + exec /usr/lib/hbase/bin/hbase --config
    /var/run/cloudera-scm-agent/
    process/74-hbase-MASTER master start
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/util/PlatformName
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.util.PlatformName
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native
    Method)
    at
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.hadoop.util.PlatformName.
    Program will exit.
    Exception in thread "main" java.lang.NoClassDefFoundError:
    org/apache/
    hadoop/io/Writable
    Caused by: java.lang.ClassNotFoundException:
    org.apache.hadoop.io.Writable
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native
    Method)
    at
    java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class:
    org.apache.hadoop.hbase.master.HMaster. Program will exit.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedJun 15, '12 at 7:18p
activeJun 18, '12 at 8:28p
posts13
users3
websitecloudera.com
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase