Problem scenario
You have a multi-node Hadoop cluster running Hadoop version 3. You run this command: hdfs dfsadmin -report
You receive an error that includes this message: "failed on connection exception: java.net.ConnectException: Connection refused; "
What should you do?
Potential Solution
Run these three commands:
bash /usr/local/hadoop/sbin/stop-dfs.sh
hdfs namenode -format
bash /usr/local/hadoop/sbin/start-dfs.sh