2

我已经建立了一个包含 3 台机器的小型 Hadoop 集群:

  1. 机器(Hadoop1)同时运行 NameNode 和 Jobtracker
  2. 机器(Hadoop2)正在运行 SecondaryNameNode
  3. 机器(Hadoop3)正在运行 DataNode 和 TaskTracker

当我检查日志文件时,一切正常。但是,当我尝试通过在机器 Hadoop2 上键入 localhost:50090 来检查 SecondaryNameNode 的工作状态时,它显示:

Unable to connect ....can't establish a connection to the server at localhost:50090.

有人遇到过这种问题吗?

SNN 上 hdfs-site.xml 中的内容:

<configuration>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>

<property>
<name>dfs.http.address</name>
<value>Hadoop1:50070</value>
</property>

<property>
<name>dfs.secondary.http.address</name>
<value>Hadoop2:50090</value>
</property>
</configuration>

以下是来自 SNN 的运行日志的一部分:

2013-04-23 19:47:00,820 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of transactions: 0 Total time for transactions(ms): 0Number of transactions batched in Syncs: 0 Number of syncs: 0 SyncTimes(ms): 0
2013-04-23 19:47:00,987 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Downloaded file fsimage size 654 bytes.
2013-04-23 19:47:00,989 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Downloaded file edits size 4 bytes.
2013-04-23 19:47:00,989 INFO org.apache.hadoop.hdfs.util.GSet: VM type       = 64-bit
2013-04-23 19:47:00,989 INFO org.apache.hadoop.hdfs.util.GSet: 2% max memory = 17.77875 MB
2013-04-23 19:47:00,989 INFO org.apache.hadoop.hdfs.util.GSet: capacity      = 2^21 = 2097152 entries
2013-04-23 19:47:00,989 INFO org.apache.hadoop.hdfs.util.GSet: recommended=2097152, actual=2097152
2013-04-23 19:47:00,998 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: fsOwner=hadoop
2013-04-23 19:47:00,998 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: supergroup=supergroup
2013-04-23 19:47:00,998 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isPermissionEnabled=true
2013-04-23 19:47:00,998 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: dfs.block.invalidate.limit=100
2013-04-23 19:47:00,999 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
2013-04-23 19:47:00,999 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Caching file names occuring more than 10 times
2013-04-23 19:47:00,999 INFO org.apache.hadoop.hdfs.server.common.Storage: Number of files = 7
2013-04-23 19:47:01,000 INFO org.apache.hadoop.hdfs.server.common.Storage: Number of files under construction = 0
2013-04-23 19:47:01,000 INFO org.apache.hadoop.hdfs.server.common.Storage: Edits file /app/hadoop/tmp/dfs/namesecondary/current/edits of size 4 edits # 0 loaded in 0 seconds.
2013-04-23 19:47:01,001 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of transactions: 0 Total time for transactions(ms): 0Number of transactions batched in Syncs: 0 Number of syncs: 0 SyncTimes(ms): 0
2013-04-23 19:47:01,049 INFO org.apache.hadoop.hdfs.server.common.Storage: Image file of size 654 saved in 0 seconds.
2013-04-23 19:47:01,334 INFO org.apache.hadoop.hdfs.server.common.Storage: Image file of size 654 saved in 0 seconds.
2013-04-23 19:47:01,570 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Posted URL Hadoop1:50070putimage=1&port=50090&machine=Hadoop3&token=-32:145975115:0:1366717621000:1366714020860
2013-04-23 19:47:01,771 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Checkpoint done. New Image Size: 654
4

1 回答 1

0

尝试在您的 SNN 上为 hdfs-site.xml 中的 dfs.secondary.http.address 赋值。另外,我假设您的机器之间没有启用防火墙,对吗?如果您可以显示您的日志,这将有所帮助,我看到有时用户为 SNN 输入了错误的端口号,该端口号在他们的日志中有所不同,因此会出现连接错误。

于 2013-04-23T06:32:47.237 回答