Hadoop cluster to build a pit record

1. After the hadoop cluster is built and started successfully, opening the namenode visualization interface fails

First of all, I wonder if hadoop is started successfully, jps check

Check that there are all hadoop processes. Use the curl command on the namenode to test whether the port is working, and it is found to be normal

netstat -ntlp view port 9870 is also normal

Use the curl command to test the port on the data node, and it is found that the connection is refused, but the network is connected

Use firewall-cmd --list-ports on the namenode to check which ports have been whitelisted and found that 9870 is not in the whitelist

Add port 9870 to the whitelist and restart the firewall

Try to open the namenode visual interface in the browser again, and it succeeds.

2. After the Hadoop cluster is started, only one datanode can be seen in the visual interface

Check that the startup process is normal

First check whether the fs.defaultFS configuration in the core-site.xml configuration file on the datanode node is correct. If it is localhost, change it to the ip address of the master

After the modification here is correct, there is still only one Datanode. Through Baidu and checking the system configuration, it is found that the double ip seen in ifconfig

Check the /data/hadoop-3.2.1/etc/hadoop/ifcfg-enp0s3 configuration file and find that the network connection is in dhcp mode

In dhcp mode, the router assigns IP addresses, so the modified ip can only be used for ssh or remote connection. The IP address used in other development is still the ip assigned by the router. Here is the configuration problem when installing the virtual machine

Change BOOTPROTO to static and add configuration information

IPADDR=192.168.xx.xx
NETMASK=255.255.255.0
GATEWAY=192.168.xx.1

The modified virtual network card configuration is as follows:

Restart the hadoop cluster, and the number of datanodes is normal.

 

Guess you like

Origin blog.csdn.net/noob9527/article/details/112833538