Hadoop - 3个数据节点正在运行并且正在运行但报告/ url未显示实时数据节点

时间:2016-07-14 18:00:42

标签: hadoop centos yarn hadoop2

我有一个名称节点(主节点)和3个数据节点(从节点)。我已经在Name节点本身配置了一个单个数据节点,该节点工作正常,并在报告中显示。所有守护程序都单独运行,但3个数据节点(从节点)未列在hadoop dfsadmin -report中。

启动jps时,一切看起来都不错。 :

名称节点

[hadoop@master ~]$ jps
4338 Jps
2114 NameNode
2420 SecondaryNameNode
2696 NodeManager
2584 ResourceManager
2220 DataNode

从属节点 [hadoop @ slave1~] $ jps 2114 NodeManager 2229 Jps 2015 DataNode

从属节点

[hadoop@slave2 ~]$ jps
2114 NodeManager
2229 Jps
2015 DataNode

从属节点 [hadoop @ slave3~] $ jps

2114 NodeManager
2229 Jps
2015 DataNode 

[hadoop@master ~]$ **hadoop dfsadmin -report**
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

16/07/14 21:27:46 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Configured Capacity: 7092494336 (6.61 GB)
Present Capacity: 1852854272 (1.73 GB)
DFS Remaining: 1852821504 (1.73 GB)
DFS Used: 32768 (32 KB)
DFS Used%: 0.00%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0
Live datanodes (1):

Name: 192.168.1.160:50010 (nn1)*(### comment - this is data node configured in the name node itself)*
Hostname: nn1
Decommission Status : Normal
Configured Capacity: 7092494336 (6.61 GB)
DFS Used: 32768 (32 KB)
Non DFS Used: 5239640064 (4.88 GB)
DFS Remaining: 1852821504 (1.73 GB)
DFS Used%: 0.00%
DFS Remaining%: 26.12%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Jul 14 21:27:46 IST 2016

1 个答案:

答案 0 :(得分:2)

此问题已解决 - 问题仅在于数据节点/从属节点无法与主节点通信。这是因为主节点中的防火墙系统不接受来自数据节点的传入连接。有两种方式来应对这种情况

  1. 您必须允许通过主节点
  2. 中的从属节点的(IP)进行传入通信
  3. 禁用防火墙。
  4. 我使用过第二个选项: 在主节点中键入以下命令以禁用防火墙。

    service iptables save
    service iptables stop
    chkconfig iptables off