【发布时间】:2017-09-21 08:46:37
【问题描述】:
我在 Hadoop 中配置我的 Master 和 Slave 时遇到了一个小挫折,我的 Master 和 Slave 中的 namenode 和 datanode 都已启动并运行。
但是 WebUI 中的 LiveNodes 计数没有得到反映,但节点正在运行。
我已经尝试禁用防火墙并格式化节点,但无法解决。
任何帮助将不胜感激!!!
这里是sn-ps:
大师:
jps 命令输出:
5088 日/秒
4446 名称节点
4681 次要名称节点
奴隶:
jps 命令输出:
2478 日/秒
2410 数据节点
ubuntu@hadoop-master:/usr/local/hadoop/etc/hadoop$ $HADOOP_HOME/bin/hdfs dfsadmin -refreshNodes
16/04/28 02:22:37 WARN ipc.Client: Address change detected. Old: hadoop-master/52.200.230.29:50077 New: hadoop-master/127.0.0.1:50077
refreshNodes: Call From hadoop-master/127.0.0.1 to hadoop-master:50077 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
hadoop-slave-1的日志文件:
2016-04-28 21:23:07,248 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: hadoop-master/52.200.230.29:9000
2016-04-28 21:23:12,257 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: hadoop-master/52.200.230.29:9000
2016-04-28 21:23:17,265 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: hadoop-master/52.200.230.29:9000
2016-04-28 21:23:22,273 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: hadoop-master/52.200.230.29:9000
2016-04-28 21:23:27,282 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: hadoop-master/52.200.230.29:9000
2016-04-28 21:23:32,291 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: hadoop-master/52.200.230.29:9000
Hadoop-master的日志文件:
2016-04-28 21:21:04,002 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 127.0.0.1
2016-04-28 21:21:04,002 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Rolling edit logs
2016-04-28 21:21:04,002 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Ending log segment 407
2016-04-28 21:21:04,002 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 0 Number of transactions batched in Syncs: 0 Number of syncs: 2 SyncTimes(ms): 22
2016-04-28 21:21:04,003 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 2 Total time for transactions(ms): 0 Number of transactions batched in Syncs: 0 Number of syncs: 3 SyncTimes(ms): 23
2016-04-28 21:21:04,003 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /usr/local/hadoop/hadoop_data/hdfs/namenode/current/edits_inprogress_0000000000000000407 -> /usr/local/hadoop/hadoop_data/hdfs/namenode/current/edits_0000000000000000407-0000000000000000408
2016-04-28 21:21:04,004 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Starting log segment at 409
netstat -pant 对我的主人的命令:
ubuntu@hadoop-master:/usr/local/hadoop/etc/hadoop$ netstat -pant
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 21491/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:50077 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:50078 0.0.0.0:* LISTEN 21491/java
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 21726/java
tcp 0 0 172.31.63.189:50070 128.235.8.68:57225 ESTABLISHED 21491/java
tcp 0 0 127.0.0.1:41471 127.0.0.1:50078 TIME_WAIT -
tcp 0 124 172.31.63.189:22 128.235.8.68:56950 ESTABLISHED -
tcp 0 0 172.31.63.189:50070 128.235.8.68:57224 ESTABLISHED 21491/java
tcp 0 0 172.31.63.189:50070 128.235.8.68:57223 ESTABLISHED 21491/java
tcp 0 0 172.31.63.189:22 128.235.8.68:57084 ESTABLISHED -
tcp 0 0 172.31.63.189:22 58.218.204.215:39402 ESTABLISHED -
tcp 0 0 172.31.63.189:50070 128.235.8.68:57227 ESTABLISHED 21491/java
tcp 0 0 172.31.63.189:50070 128.235.8.68:57228 ESTABLISHED 21491/java
tcp 0 0 172.31.63.189:50070 128.235.8.68:57226 ESTABLISHED 21491/java
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::50077 :::* LISTEN -
tcp6 0 0 :::9000 :::* LISTEN -
【问题讨论】:
-
请粘贴几行namenode和datanode日志
-
嗨,我已经用日志文件编辑了我的问题
-
namenode 似乎已启动。但是 datanodes 无法连接到 namenode 。你修改过namenode的端口号吗?我看到 9000,而默认值为 8020。验证所有配置都有正确的地址