在执行hdfs namenode -bootstrapStandby的时候,一直报错,
FATAL ha.BootstrapStandby: Unable to fetch namespace information from active NN at node1/
192.168.152.142:8020: Call From node2/127.0.0.1 to node1:8020 failed on connection exception:
java.net.ConnectException: Connection refused; For more details see:
http://wiki.apache.org/hadoop/ConnectionRefused
用了很多方法一直没解决,包括检查防火墙关闭没有,hadoop.tmp.dir指定的目录删了没有。
去 http://wiki.apache.org/hadoop/ConnectionRefused看的以下内容
If the error message says the remote service is on "127.0.0.1" or "localhost" that means the configuration file is telling the client that the service is on the local server. If your client is trying to talk to a remote system, then your configuration is broken.
Check that there isn't an entry for your hostname mapped to 127.0.0.1 or 127.0.1.1 in /etc/hosts (Ubuntu is notorious for this).
所以尝试把hosts文件的前两行注释掉,重新尝试,终于成功!
转载请注明原文地址: https://ju.6miu.com/read-666803.html