我正在尝试通过docker运行hadoop集群。我有一个虚拟机作为namenode,另一个作为datanode,但是datanode在运行时给了我这个错误 start-dfs.sh
:
namenode: namenode running as process 130. Stop it first.
datanode上的命令jps不显示namenode正在运行。然后我尝试手动启动,使用:
hadoop namenode
它失败了,错误如下:
java.net.BindException: Problem binding to [namenode:9000] java.net.BindException: Cannot assign requested address; For more details see: http://wiki.apache.org/hadoop/BindException
到目前为止,namenode似乎不可访问或者没有监听端口9000。但是网络设置是正确的:如果我在datanode上执行:
telnet namenode 9000
它正确地连接到namenode netstat -apn | grep 9000
from namenode显示传入连接。如果我关闭namenode上的dfs( stop-dfs.sh
),来自datanode的telnet命令失败,原因是“ Connection closed by foreign host.
"
hdfs-site.xml文件
<configuration>
<property>
<name>dfs.replication</name>
<value>3</value> <!-- I have tried with 1 and 2 too -->
</property>
<property>
<name>dfs.namenode.datanode.registration.ip-hostname-check</name>
<value>false</value>
</property>
</configuration>
core-site.xml文件
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://namenode:9000</value>
</property>
</configuration>
谢谢!
暂无答案!
目前还没有任何答案,快来回答吧!