Hadoop datanode cannot connect to namenode
Start-dfs.sh
All processes have been started successfully
Master:
65456 Jps
64881 NameNode
65057 DataNode
7380 NodeManager
65276 SecondaryNameNode
Slave:
3607 DataNode
7380 NodeManager
3675 Jps
Under hadoop:
Slaves file settings:
Master
Slave1
Slave2
-
Netstat-anp | grep 9000
Tcp 00 192.168.1.2009000 LISTEN 64881/java 0.0.0.0
Tcp 00 192.168.1.200:9000 192.168.1.200:42846 ESTABLISHED 64881/java
Tcp 00 192.168.1.200 tcp 42853 192.168.1.200 9000 TIME_WAIT-
Tcp 00 192.168.1.200:42846 192.168.1.200:9000 ESTABLISHED 65057/java
Problem description:
Under the http://master:50070/ monitoring page.
Live nodes is 1.
Only master's datanode can see that the other two slave have processes but cannot connect to master.
And there is no current file generated under slave and dfs/data.
View the log as follows:
2016-11-08 13 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.0.100:9000. Already tried 6 time (s); retry policy is RetryUpToMaximumCountWithFixedSleep (maxRetries=10, sleepTime=1000 MILLISECONDS)
The reason is that centos7
Turn off selinux and iptables. No, turn off the dynamic firewall.
Turn off the firewall: * very important *
# systemctl status firewalld.service-check the status of the firewall
# systemctl stop firewalld.service-turn off the firewall
# systemctl disable firewalld.service-permanently turn off the firewall