It’s very strange.I have seen NameNode and DataNode that they have already started in jps command.I can go into the NameNode WebSite(50070) and use “hdfs dfs -get” to get file.But I can’t download file from the NameNode WebSite.
Advertisement
Answer
The problem is because the /etc/hosts file.I configured the relation of the hostname and IP. IP is 127.0.0.1. So hadoop use 127.0.0.1. If I use other host to visit. The browser will use localhost to visit. So the file can’t download from NameNode website.
So it only configure the hostname to be real IPv4 address,then restart hadoop.
Other thing: I have configured core-site.xml’s fs.defaultFS property as hdfs://centos110:9000. The centos110 hostname is configuration in /etc/host file.