Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce, mail # user - Cannot start yarn daemons


Copy link to this message
-
Re: Cannot start yarn daemons
Ravi Prakash 2012-01-09, 16:32
Hi,

Clearly the jar file containing the class
"org/apache/hadoop/conf/Configuration" is not available on the CLASSPATH.
Did you build hadoop properly? The way I would usually check this is:
1. I have a shell script findclass
#!/bin/sh
LOOK_FOR=$1

if [ -z $LOOK_FOR ]; then
        echo -e "Usage: findclass <classname>\n Will find . -name *.jar and
jar tvf them"
fi

for i in `find . -name "*.jar"`
do
  echo "Looking in $i ..."
  jar tvf $i | grep $LOOK_FOR > /dev/null
  if [ $? == 0 ]
  then
    echo "==> Found \"$LOOK_FOR\" in $i"
  fi
done

If you run findclass org/apache/hadoop/conf/Configuration, it will tell you
the list of jars in subdirectories which contain that class.

2. Check that atleast one of the jars listed in the CLASSPATH printed out
when you run the yarn-daemon.sh is one which contains the above class. This
in your case is hadoop-common*.jar (e.g. hadoop-common-0.23.1-SNAPSHOT.jar)

HTH
Ravi
On Mon, Jan 9, 2012 at 2:23 AM, raghavendhra rahul <
[EMAIL PROTECTED]> wrote:

> Hi,
>   I am trying to install hadoop 0.23.1 SNAPSHOT. while starting yarn
> daemons.sh it shows the following error
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/conf/Configuration
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.conf.Configuration
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> Could not find the main class:
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager. Program will
> exit.
>