-1

I have started hdfs, but datanodes are not shown in the website. Although when i run the "jps" command at the datanode machines:

41348 Jps
41028 DataNode

Also, Datanode directory is empty.

this is the content of the hdfs-site.xml file:

<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
<property>
    <name>dfs.datanode.data.dir</name>
    <value>/usr/local/hadoop/hdfs/data/dataNode</value>
</property>
<property>
    <name>dfs.disk.balancer.enabled</name>
    <value>false</value>
</property>
<property>
    <name>dfs.permissions</name>
    <value>false</value>
</property>

I checked datanode log files, and this error is shown:

2023-03-21 09:39:45,177 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: hadoop-master/64.226.67.23:9000. Already tried 0 time(s)
2023-03-21 09:39:46,179 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: hadoop-master/64.226.67.23:9000. Already tried 1 time(s)
2023-03-21 09:39:47,181 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: hadoop-master/64.226.67.23:9000. Already tried 2 time(s)
2023-03-21 09:39:48,183 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: hadoop-master/64.226.67.23:9000. Already tried 3 time(s)
Radwa Ahmed
  • 131
  • 1
  • 1
  • 9
  • **DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question. [ask] – Rob Mar 20 '23 at 23:57

2 Answers2

0

The datanode won't store any data without an active namenode. The logs are saying it's failing to connect to a Namenode at that address

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
0

Here is a thing i faced when i was trying to configure cluster. Not sure but you can check for possibilities. I had two nodes namenode and datanode.

Each of this node had two IPs, and one loopback ip. Namenode eth0 172.17.42.10 eth1 10.7.0.73

Datanode eth0 172.17.42.15 eth1 10.7.0.75

In both the node 172.x.x.x was used for contacting node from outside, say for ssh.

And 10.x.x.x was only for hadoop communication it was not exposed outside.

So when i start namenode it was starting on interface 10.7.0.73:9000 (I had verified that using netstat).

But due to some configurations mismatch datanode was trying to contact 172.17.42.10:9000 but as namenode was listening on 10.7.0.73:9000 datanode was not connecting to it and in datanode logs i was getting same error message you provided here.