title: Hadoop Nodemanager and Resourcemanager not starting
body: <p>I am trying to setup the latest Hadoop 2.2 single node cluster on Ubuntu 13.10 64 bit. the OS is a fresh installation, and I have tried using both java-6 64 bit and java-7 64 bit.</p>
  
  <p>After following the steps from <a href="http://raseshmori.wordpress.com/2012/09/23/install-hadoop-2-0-1-yarn-nextgen/" rel="nofollow noreferrer">this</a> and after failing, from <a href="http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html" rel="nofollow noreferrer">this</a> link, I am not able to start <code>nodemanager</code> and <code>resourcemanager</code> with the command:</p>
  
  <pre><code>sbin/yarn-daemon.sh start nodemanager
  sudo sbin/yarn-daemon.sh start nodemanager
  </code></pre>
  
  <p>and resource manager with</p>
  
  <pre><code>sbin/yarn-daemon.sh start resourcemanager
  sudo sbin/yarn-daemon.sh start resourcemanager
  </code></pre>
  
  <p>and both fails with error:</p>
  
  <pre><code>starting nodemanager, logging to /home/hduser/yarn/hadoop-2.2.0/logs/yarn-hduser-nodemanager-ubuntu.out
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:788)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:447)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  </code></pre>
  
  <p>Resource Manager fails with similar error: <code>NoClassDefFoundError</code></p>
  
  <p>I have been trying this for many hours and have tried Google and nothing worked. Please let me know what I have missed. <a href="http://mail-archives.apache.org/mod_mbox/hadoop-mapreduce-user/201203.mbox/%3C4F51169C.6090707@apache.org%3E" rel="nofollow noreferrer">This</a> and <a href="http://web.archiveorange.com/archive/v/ea8lWp2E39VA31biEi0t" rel="nofollow noreferrer">this</a> link while searching for a solution didn't work.</p>
  
  <p>I have tried using both java-6 and java-7 64 bit, with no success.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>The accepted answer managed to get rid of the exception and all the daemons are now starting but there is still an exception while running jobs, mentioned in <a href="https://stackoverflow.com/questions/19642862/cannot-initialize-cluster-exception-while-running-job-on-hadoop-2">this</a> question</p>