HDFS Support for Multihomed Networks 并在Cloudera HDFS Support for Multihomed Networks 上完成。 Parameters for Multi-Homing for Hortonworks
<property>
<name>dfs.namenode.rpc-bind-host</name>
<value>0.0.0.0</value>
<description>
The actual address the RPC server will bind to. If this optional address is
set, it overrides only the hostname portion of dfs.namenode.rpc-address.
It can also be specified per name node or name service for HA/Federation.
This is useful for making the name node listen on all interfaces by
setting it to 0.0.0.0.
</description>
</property>
另外,建议改dfs.namenode.rpc-bind-host,
dfs.namenode.servicerpc-bind-host、dfs.namenode.http-bind-host 和
dfs.namenode.https-bind-host
默认情况下,HDFS 端点被指定为主机名或 IP
地址。在任何一种情况下,HDFS 守护进程都将绑定到单个 IP
使守护程序无法从其他网络访问的地址。
解决方案是对服务器端点进行单独设置以强制
绑定通配符 IP 地址 INADDR_ANY 即 0.0.0.0。不提供
具有任何这些设置的端口号。
注意:在主/从中首选使用主机名而不是 IP 地址
配置文件。
<property>
<name>dfs.namenode.rpc-bind-host</name>
<value>0.0.0.0</value>
<description>
The actual address the RPC server will bind to. If this optional address is
set, it overrides only the hostname portion of dfs.namenode.rpc-address.
It can also be specified per name node or name service for HA/Federation.
This is useful for making the name node listen on all interfaces by
setting it to 0.0.0.0.
</description>
</property>
<property>
<name>dfs.namenode.servicerpc-bind-host</name>
<value>0.0.0.0</value>
<description>
The actual address the service RPC server will bind to. If this optional address is
set, it overrides only the hostname portion of dfs.namenode.servicerpc-address.
It can also be specified per name node or name service for HA/Federation.
This is useful for making the name node listen on all interfaces by
setting it to 0.0.0.0.
</description>
</property>
<property>
<name>dfs.namenode.http-bind-host</name>
<value>0.0.0.0</value>
<description>
The actual adress the HTTP server will bind to. If this optional address
is set, it overrides only the hostname portion of dfs.namenode.http-address.
It can also be specified per name node or name service for HA/Federation.
This is useful for making the name node HTTP server listen on all
interfaces by setting it to 0.0.0.0.
</description>
</property>
<property>
<name>dfs.namenode.https-bind-host</name>
<value>0.0.0.0</value>
<description>
The actual adress the HTTPS server will bind to. If this optional address
is set, it overrides only the hostname portion of dfs.namenode.https-address.
It can also be specified per name node or name service for HA/Federation.
This is useful for making the name node HTTPS server listen on all
interfaces by setting it to 0.0.0.0.
</description>
</property>
注意:在开始修改之前,将代理和服务器停止为
关注:
- 服务 cloudera-scm-agent 停止
- 服务 cloudera-scm-server 停止
如果您的集群配置了主 NameNode 和辅助 NameNode
比这种修改需要在两个节点中进行。修改
用server and agent stopped 完成
完成并保存hdfs-site.xml 文件后,启动
NameNodes 上的服务器和代理以及代理
DataNodes(这不会
如果这样做也会伤害集群)使用以下方法:
- 服务 cloudera-scm-agent 启动
- 服务 cloudera-scm-server 启动
可以为 IBM BigInsights 实施相同的解决方案:
To configure HDFS to bind to all the interfaces , add the following configuration variable using Ambari under the section HDFS
-> Configs ->Advanced -> Custom hdfs-site
dfs.namenode.rpc-bind-host = 0.0.0.0
Restart HDFS to apply the configuration change .
Verify if port 8020 is bound and listening to requests from all the interfaces using the following command.
netstat -anp|grep 8020
tcp 0 0 0.0.0.0:8020 0.0.0.0:* LISTEN 15826/java
IBM BigInsights: How to configure Hadoop client port 8020 to bind to all the network interfaces?
在Cloudera的HDFS配置中有一个属性叫做
在Cloudera的HDFS configuration中有一个名为Bind NameNode to Wildcard Address的属性,只需选中该框,它将在0.0.0.0上绑定服务
then restart hdfs service
On the Home > Status tab, click to the right of the service
name and select Restart. Click Start on the next screen to confirm.
When you see a Finished status, the service has restarted.
Starting, Stopping, Refreshing, and Restarting a Cluster
Starting, Stopping, and Restarting Services