title: Hadoop 3.2.1 Multinode Cluster Nodemanager is not running
body: <p>I have Hadoop 3.2.1 installed on Ubuntu 16.04lts and my cluster has 18 datanodes and 1 master.
  After running:</p>
  <pre><code>$ start-dfs.sh
  $ start-yarn.sh
  $ jps
  </code></pre>
  <p>On master I get the following:</p>
  <pre><code>ResourceManager
  NameNode
  SecondaryNameNodecode
  jps
  </code></pre>
  <p>And on datanodes:</p>
  <pre><code>DataNode
  jps
  </code></pre>
  <p>All the nodes seems to be live:
  <a href="https://i.stack.imgur.com/ifAEW.png" rel="nofollow noreferrer">NameNode Overview Web Page</a></p>
  <p>But when I reach the Cluster overview, none of my datanodes seems to be active:
  <a href="https://i.stack.imgur.com/jSKhY.png" rel="nofollow noreferrer">Cluster Overview</a></p>
  <p>My configurations files:</p>
  <p><strong>core-site.xml</strong></p>
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
  &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
  &lt;value&gt;/home/hadoop/hadoop-3.2.1/tmp&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;fs.default.name&lt;/name&gt;
  &lt;value&gt;hdfs://hadoop-master:9000&lt;/value&gt;
  &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p><strong>hdfs-site.xml</strong></p>
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
  &lt;name&gt;dfs.name.dir&lt;/name&gt;
  &lt;value&gt;/home/hadoop/hadoop-3.2.1/data/namenode&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;dfs.data.dir&lt;/name&gt;
  &lt;value&gt;/home/hadoop/hadoop-3.2.1/data/datanode&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;dfs.replication&lt;/name&gt;
  &lt;value&gt;3&lt;/value&gt;
  &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>The namenode and datanode directories exists on every host (master and datanodes)</p>
  <p><strong>mapred-site.xml</strong></p>
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
  &lt;name&gt;mapreduce.framework.name&lt;/name&gt;
  &lt;value&gt;yarn&lt;/value&gt;
  &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p><strong>yarn-site.xml</strong></p>
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
  &lt;name&gt;yarn.resourcemanager.hostname&lt;/name&gt;
  &lt;value&gt;hadoop-master&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;yarn.nodemanager.aux-services &lt;/name&gt;
  &lt;value&gt; mapreduce_shuffle&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;yarn.nodemanager.aux-services.mapreduce.shuffle.class&lt;/name&gt;
  &lt;value&gt;org.apache.hadoop.mapred.ShuffleHandler&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
  &lt;name&gt;yarn.nodemanager.resource.memory-mb&lt;/name&gt;
  &lt;value&gt;2048&lt;/value&gt;
  &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>Also I have configured hadoop-env.sh for JAVA_HOME Path and all the other variables are in .bashrc file (also in every host).</p>
  <p>I have modified the /etc/hosts file to include all the hosts with their IPs and hostnames and finally I have also modified the workers file to include all the IPs of the datanodes.</p>
  <p>The first time I have formatted the NameNode, the directories for the hdfs-site.xml was wrong (I had the datanode dir twice), so hdfs make its own directories under /tmp/hdfs/ (if I remember correctly). But I fixed this with formating again the NameNode with the corect directories.</p>