hadoop50070頁面打不開以及hadoop dfsadmin -report出來的結果為
阿新 • • 發佈:2018-11-10
-
50070頁面打不開
用jps命令檢視發現namenode沒有啟動
解決辦法:刪掉master和slave虛擬機器的hadoop.tmp.dir,dfs.name.dir,dfs.data.dir配置的目錄,重新用hadoop namenode -format 格式化,再start-all.sh
成功 -
在終端輸入
hadoop dfsadmin -report
,結果如下:
[[email protected] hadoop]# hdfs dfsadmin -report Configured Capacity: 0 (0 B) Present Capacity: 0 (0 B) DFS Remaining: 0 (0 B) DFS Used: 0 (0 B) DFS Used%: NaN% Under replicated blocks: 0 Blocks with corrupt replicas: 0 Missing blocks: 0 hadoop dfsadmin -safemode leave
方法一:關掉防火牆systemctl stop firewalld.service
失敗
方法二:離開安全模式
hadoop dfsadmin -safemode leave
失敗
最後按照解決50070頁面打不開的方法,成功解決
[[email protected] hadoop_opt]# hadoop dfsadmin -report DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. Configured Capacity: 36477861888 (33.97 GB) Present Capacity: 25981939712 (24.20 GB) DFS Remaining: 25981931520 (24.20 GB) DFS Used: 8192 (8 KB) DFS Used%: 0.00% Under replicated blocks: 0 Blocks with corrupt replicas: 0 Missing blocks: 0 -------------------------------------------------
看部落格說,沒有正確退出hadoop容易造成好多問題。
以後記住要用stop-all.sh把所有程序關掉。
防火牆命令:
- 檢視防火牆狀態
firewall-cmd --state
- 開啟服務
systemctl start firewalld.service
- 關閉服務
systemctl stop firewalld.service
- 開機自啟
systemctl enable firewalld.service
- 關閉開機自啟
systemctl disable firewalld.service