When running the data node process if you see the below error and datanode process is not starting:
ERROR datanode.DataNode: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode: NameNode:50010
Its means that this particular datanode is not recognized by the NameNode. You might be using "dfs.host" property ( should be specifed in hdfs-site.xml) which will be pointing to a file which has the list of IP address of various datanode. You need to provide the entry of this datanode IP in this file.
Example: My hdfs-site.xml has this property mentioned like this: ( not showing other properties)
<property>
<name>dfs.hosts</name>
<value>/usr/local/hadoop/conf/include</value>
</property>
The "include" file in the above location has the following entries:(lets say) 192.168.1.20 192.168.1.29 Now in this file, you provide the IP address of the data node which you wish to make as slave After the entry is provided,run the following command to tell the NameNode about the new nodes which are getting added "hadoop dfsadmin -refreshNodes" Now go to your newly added datanode and start up the process: hadoop datanode ( it will start datanode process) hadoop tasktracker ( it will start task tracker process)
ERROR datanode.DataNode: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode: NameNode:50010
Its means that this particular datanode is not recognized by the NameNode. You might be using "dfs.host" property ( should be specifed in hdfs-site.xml) which will be pointing to a file which has the list of IP address of various datanode. You need to provide the entry of this datanode IP in this file.
Example: My hdfs-site.xml has this property mentioned like this: ( not showing other properties)
<property>
<name>dfs.hosts</name>
<value>/usr/local/hadoop/conf/include</value>
</property>
The "include" file in the above location has the following entries:(lets say) 192.168.1.20 192.168.1.29 Now in this file, you provide the IP address of the data node which you wish to make as slave After the entry is provided,run the following command to tell the NameNode about the new nodes which are getting added "hadoop dfsadmin -refreshNodes" Now go to your newly added datanode and start up the process: hadoop datanode ( it will start datanode process) hadoop tasktracker ( it will start task tracker process)