如何在hadoop集群中访问master的端口50070?

xxhby3vn  于 2021-05-29  发布在  Hadoop
关注(0)|答案(2)|浏览(574)

我已经安装了基于centos7的hadoop2.7.2,它是一个有3个从机的主设备。
问题是我只能通过访问 localhost:50070 在主机中。而且去看医生也不管用 master:50070 或者 192.168.199.139:50070 , 192.168.199.139 是主机的ip地址。
同时,奴隶们也不能参观 192.168.199.139:50070 .
我需要更多指定的配置来访问吗 50070 ?
ifconfig 在母版中:

eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.199.139  netmask 255.255.255.0  broadcast 192.168.199.255
    inet6 fe80::20c:29ff:fe0d:6143  prefixlen 64  scopeid 0x20<link>
    ether 00:0c:29:0d:61:43  txqueuelen 1000  (Ethernet)
    RX packets 342080  bytes 318632744 (303.8 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 129369  bytes 16629889 (15.8 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 0  (Local Loopback)
    RX packets 6650  bytes 2908305 (2.7 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 6650  bytes 2908305 (2.7 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
    ether 52:54:00:fc:1a:4b  txqueuelen 0  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
oxcyiej7

oxcyiej71#

如果在/etc/hosts中用关联的ip更新主机名,那么只有您才能从任何计算机访问namenode。在hosts文件中添加如下内容 192.168.199.139 master p、 所有机器中的主机应相同

7xllpg7q

7xllpg7q2#

你应该检查参数 dfs.namenode.http-address 在文件中 hdfs-site.xml . 默认值 0.0.0.0:50070 允许从任何地方连接。但如果你有价值 localhost:50070 那么只允许从localhost进行连接。

相关问题