Why does a datanode doesn´t disappear in the hadoop web site when the datanode job is killed?
NickName:Pablo Ochoa Ask DateTime:2021-12-20T17:42:18

Why does a datanode doesn´t disappear in the hadoop web site when the datanode job is killed?

I have a 3 node HA cluster in a CentOS 8 VM. I am using ZK 3.7.0 and Hadoop 3.3.1. In my cluster I have 2 namenodes, node1 is the active namenode and node2 is the standby namenode in case that node1 falls. The other node is the datanode I just start all with the command

start-dfs.sh

In node1 I had the following processes running: NameNode, Jps, QuorumPeerMain and JournalNode In node2 I had the following processes running: NameNode, Jps, QuorumPeerMain, JournalNode and DataNode.

My hdfs-site.xml configuration is the following:

    <property>
        <name>dfs.replication</name>
        <value>2</value>
    </property>
    <property>
        <name>dfs.namenode.name.dir</name>
        <value>/datos/namenode</value>
    </property>
    <property>
        <name>dfs.datanode.data.dir</name>
        <value>/datos/datanode</value>
    </property>
    <property>
        <name>dfs.nameservices</name>
        <value>ha-cluster</value>   
    </property>
    <property>
        <name>dfs.ha.namenodes.ha-cluster</name>
        <value>nodo1,nodo2</value>
    </property>
    <property>
        <name>dfs.permissions</name>
        <value>false</value>
    </property>
    <property>
        <name>dfs.namenode.rpc-address.ha-cluster.nodo1</name>
        <value>nodo1:8020</value>
    </property>
    <property>
        <name>dfs.namenode.rpc-address.ha-cluster.nodo2</name>
        <value>nodo2:8020</value>
    </property>
    <property>
        <name>dfs.namenode.http-address.ha-cluster.nodo1</name>
        <value>nodo1:9870</value>
    </property> 
    <property>
        <name>dfs.namenode.http-address.ha-cluster.nodo2</name>
        <value>nodo2:9870</value>
    </property>
    <property>
        <name>dfs.namenode.shared.edits.dir</name>
        <value>qjournal://nodo3:8485;nodo2:8485;nodo1:8485/ha-cluster</value>
    </property>

The problem is that since the node2 is the standby namenode I didn't want it to have the DataNode process running, so I killed it. I used the command kill -9 (I know it's not the best way, I should have used hdfs --daemon stop datanode). Then I entered the hadoop website to check how many datanodes I had. In the node1 (the active namenode) Hadoop website, in the datanode part I only had 1 datanode, node3. The problem is that in the Hadoop website of the node2 (the standby namenode) was like this: Hadoop Website of node2

In case u can't see the image:

default-rack/nodo2:9866 (192.168.0.102:9866)    http://nodo2:9864   558s        

/default-rack/nodo3:9866 (192.168.0.103:9866)   http://nodo3:9864   1s  

The node2 datanode hasn't been alive for 558s and it doesn't take the node as dead. Does anybody know why does this happen??

Copyright Notice:Content Author:「Pablo Ochoa」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70419926/why-does-a-datanode-doesn%c2%b4t-disappear-in-the-hadoop-web-site-when-the-datanode-j

More about “Why does a datanode doesn´t disappear in the hadoop web site when the datanode job is killed?” related questions

How does a datanode know next datanode in the writting pipeline?

From "White, Tom; Hadoop: The Definite Guide; Ch. 3, The Hadoop Distributed Filesystem, Anatomy of a File Write": ...The DataStreamer streams the packets to the first datanode in the pipeline, w...

Show Detail

Why does a datanode doesn´t disappear in the hadoop web site when the datanode job is killed?

I have a 3 node HA cluster in a CentOS 8 VM. I am using ZK 3.7.0 and Hadoop 3.3.1. In my cluster I have 2 namenodes, node1 is the active namenode and node2 is the standby namenode in case that node1

Show Detail

Couldn't start hadoop datanode normally

I'd started datanode successfully before, but when I tried today it shows the following info. It sounds like I have not mkdir the /home/hadoop/appdata/hadoopdata directory,but I confirmed that the

Show Detail

how does hdfs choose a datanode to store

As the title indicates, when a client requests to write a file to the hdfs, how does the HDFS or name node choose which datanode to store the file? Does the hdfs try to store all the blocks of this

Show Detail

Why blocksize in HDFS is consistent in all the DataNode?

In continuation to question: data block size in HDFS, why 64MB? I know that blocksize in HDFS is consistent/same in all the Data Node (size depends on configuration) in a distribution. My questio...

Show Detail

Commissioning a datanode in hadoop

I have hadoop 1.2.1 set up in my 3 machines. When decommissioned a machine it worked fine. But when commissioning a new datanode, it brings down my other 2 datanodes. Set up is as follows: 192.168...

Show Detail

DataNode failing to Start in Hadoop

I trying setup Hadoop install on Ubuntu 11.04 and Java 6 sun. I was working with hadoop 0.20.203 rc1 build. I am repeatedly running into an issue on Ubuntu 11.04 with java-6-sun. When I try to star...

Show Detail

ERROR datanode.DataNode: Exception in secureMain

I was trying to install Hadoop on windows. Namenode is working fine but Data Node is not working fine. Following error is being displayed again and again even after trying for several times. Follow...

Show Detail

hadoop Datanode shutting down

I have configured hadoop cluster with namenode 192.168.56.101 secondarynode 192.168.56.102 datanode1 192.168.56.103 after running start-dfs.sh and start-mapred.sh all demons are up except the dat...

Show Detail

Cannot change hdfs datanode directory

The problem is that I can't change datanode directory for hdfs blocks. If I put this property into hdfs-site.xml I cannot run datanode: &lt;property&gt; &lt;name&gt;dfs.datanode.data.dir&lt;/n...

Show Detail