Summary of solutions to the inaccessibility of web port 50070 in hadoop

1. The virtual machine is to check the status of the firewall under Centos7 systemctl status firewalld.service. If it is active, turn off the firewall ( systemctl stop firewalld.service) or disable the firewall ( systemctl disable firewalld.service).
If the virtual machine is Centos6, service iptables status (check firewall status), service iptables stop (temporarily turn off the firewall), chkconfig iptables off (permanently turn off the firewall).

2. Check the C:\Windows\System32\drivers\etc\hosts file in Windows. After opening this file, check whether your node ip address and host name are automatically generated for you . If not, set it yourself manually , Similar to the figure below.

Insert picture description here

3. The absolute path of java in the three files of hadoop-env.sh, yarn-env.sh, and mapred-env.sh must be configured correctly. The command to view the absolute path of java is echo $JAVA_HOME

4. Add the following content to the hdfs-site.xml file:

<property>
  <name>dfs.namenode.http-address</name>
  <value>主机名:50070</value>
</property>

5. Check if your hadoop version is 3.x, if so, the 3.x version has been changed to 9870, and the 2.x version has always been 50070.

6. Check if there is any configuration error in your hadoop configuration file, here I paste my configuration file for reference, https://blog.csdn.net/weixin_44080445/article/details/106009359

Guess you like

Origin blog.csdn.net/weixin_44080445/article/details/108716739