为什么我无法访问http:// hadoop-master:50070当我定义dfs.namenode.http-address [英] Why I can't access http://hadoop-master:50070 when i define dfs.namenode.http-address
问题描述
Hadoop版本为2.7.1
修改hdfs.xml,添加两个属性:
<性>
<名称> dfs.namenode.http-address< / name>
<值> HADOOP-MASTER:50070< /值>
< / property>
<属性>
< name> dfs.namenode.secondary.http-address< / name>
<值> HADOOP-SLAVE-1:50090< /值>
< / property>
然后重新启动hadoop群集,但我无法访问 http:// hadoop-master:50070 。
namenode进程处于活动状态。
和
[hadoop @ HADOOP-MASTER〜] $ lsof -i:50070
COMMAND PID USER FD类型设备大小/关闭节点名称
java 26541 hadoop 184u IPv4 1261606 0t0 TCP HADOOP-MASTER:50070(LISTEN)
但是,当我删除 dfs.namenode.http-address
属性时,50070正在运行。
$ b $因此,问题是
dfs.namenode.http-address
属性的意思,我猜它定义了可以访问的节点? $ b $该值被定义为地址和dfs namenode web ui将在其上侦听的基础端口,并且默认值为 0.0.0.0:50070,这意味着它可以被所有可达到它的机器公开访问。 注意地址是地址,而不是主机名。如果您需要从默认值更改此值,请使用IP地址,而不是物理机器名称。
资料来源: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml
The Hadoop Version is 2.7.1 Modify the hdfs.xml , add two properties:
<property>
<name>dfs.namenode.http-address</name>
<value>HADOOP-MASTER:50070</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>HADOOP-SLAVE-1:50090</value>
</property>
And restart the hadoop cluster,but I can't access http://hadoop-master:50070. the namenode process is alive. and
[hadoop@HADOOP-MASTER ~]$ lsof -i:50070
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 26541 hadoop 184u IPv4 1261606 0t0 TCP HADOOP-MASTER:50070 (LISTEN)
But when I remove the dfs.namenode.http-address
property,the 50070 worked on.
So,The Problem is what dfs.namenode.http-address
property mean,I guess it define the node who can access?
That value is defined as "The address and the base port where the dfs namenode web ui will listen on" and defaults to 0.0.0.0:50070, which means it is publicly accessible to all machines that can reach it.
Notice that is says address, not hostname. If you need to change this value from the default, use an IP address, not a physical machine name.
Source: https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml
这篇关于为什么我无法访问http:// hadoop-master:50070当我定义dfs.namenode.http-address的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!