namenode單節點啟動成功後自動消失/格式化失敗/fsimage載入失敗
問題描述;
叢集 start-all.sh 啟動後,發現少了一個namenode。
單節點namenode啟動成功,但是啟動其他節點後,jps發現namenode消失了
格式化namenode報錯
問題排查與解析
解決思路
1、單節點啟動排查。
整體關閉stop-all.sh,
單節點啟動 hadoop-daemon.sh start namenode;jps namenode單個節點啟動成功,
再次啟動下一個hadoop-daemon.sh start datanode;jps後,發現namenode 消失了
說明namenode啟動失敗
2、
透過logs檢視問題
2022-06-02 06:30:39,722 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
java.io.IOException:
Failed to load FSImage file, see error(s) above for more info.
at org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:692)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:294)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:975)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:681)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:585)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:645)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:812)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:796)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1493)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1559)
報錯的原因:fsimage的映象檔案載入失敗
基本定位到問題
3、解決方案
試圖透過格式化 hadoop namenode -format解決,結果仍舊報錯
通namenode(active)的節點,複製 dfs的檔案到掛掉的節點。scp -r dfs/ hadoop001:`pwd`
[root@hadoop002 data]# scp -r dfs/ hadoop001:`pwd`
root@hadoop001's password: (輸入密碼)
再次start-all.sh
[root@hadoop001 logs]# start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [hadoop001 hadoop002]
hadoop001: starting namenode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-namenode-hadoop001.out
hadoop002: starting namenode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-namenode-hadoop002.out
hadoop001: starting datanode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-datanode-hadoop001.out
hadoop003: starting datanode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-datanode-hadoop003.out
hadoop002: starting datanode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-datanode-hadoop002.out
Starting journal nodes [hadoop001 hadoop002 hadoop003]
hadoop003: starting journalnode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-journalnode-hadoop003.out
hadoop001: starting journalnode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-journalnode-hadoop001.out
hadoop002: starting journalnode, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-journalnode-hadoop002.out
Starting ZK Failover Controllers on NN hosts [hadoop001 hadoop002]
hadoop001: starting zkfc, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-zkfc-hadoop001.out
hadoop002: starting zkfc, logging to /opt/module/hadoop-2.7.3/logs/hadoop-root-zkfc-hadoop002.out
starting yarn daemons
starting resourcemanager, logging to /opt/module/hadoop-2.7.3/logs/yarn-root-resourcemanager-hadoop001.out
hadoop002: starting nodemanager, logging to /opt/module/hadoop-2.7.3/logs/yarn-root-nodemanager-hadoop002.out
hadoop001: starting nodemanager, logging to /opt/module/hadoop-2.7.3/logs/yarn-root-nodemanager-hadoop001.out
hadoop003: starting nodemanager, logging to /opt/module/hadoop-2.7.3/logs/yarn-root-nodemanager-hadoop003.out
透過jps檢視
[root@hadoop001 logs]# jps
106723 DFSZKFailoverController
105860 NameNode
106052 DataNode
107065 NodeManager
106427 JournalNode
106939 ResourceManager
12126 QuorumPeerMain
107182 Jps
問題解決!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70017085/viewspace-2898521/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Hadoop 啟動namenode節點失敗Hadoop
- MySQL啟動失敗MySql
- docker啟動失敗Docker
- RAC節點啟動失敗--ASM無法連線ASM
- Win7 Nginx啟動失敗 cmd命令失敗Win7Nginx
- tomcat 啟動失敗Tomcat
- dota2啟動失敗 初始化vulkan失敗
- beego自動建表失敗Go
- sqlplus啟動失敗SQL
- linux smartd啟動失敗Linux
- systemctl 命令設定開機自啟動失敗
- 19c RAC因profile.xml檔案丟失節點1啟動失敗XML
- 使用Huge Pages後資料庫啟動失敗資料庫
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- dbsnmp啟動失敗解決方法
- 監聽啟動失敗解決
- init.cssd程式啟動失敗CSS
- informix資料庫啟動失敗ORM資料庫
- Windows自帶Android模擬器啟動失敗WindowsAndroid
- 記一次docker安裝成功,啟動失敗的原因Docker
- Spring 自動注入失敗異常Spring
- Linux使用Ambari啟動服務啟動失敗Linux
- hbase啟動失敗問題解決
- oracle 10g em啟動失敗Oracle 10g
- mongodb啟動失敗問題解決MongoDB
- PbootCMS後臺“登入失敗:表單提交校驗失敗,請重新整理後重試”boot
- start-all.sh指令碼啟動Hadoop的NameNode、DataNode、ResourceManager和NodeManager失敗指令碼Hadoop
- RAC刪除節點失敗重啟大法解決
- MQ消費失敗,自動重試思路MQ
- Oracle RAC常見啟動失敗故障分析Oracle
- sqlserver服務啟動失敗-1067SQLServer
- sql server 重新啟動計算機失敗SQLServer計算機
- mysql(mariadb)啟動失敗解決方法MySql
- OracleDBConsole啟動失敗處理Oracle
- oracle 10g em啟動失敗 續Oracle 10g
- 寶塔皮膚啟動失敗怎麼回事
- centos7 sftp設定後 ssh 啟動失敗 原因分析CentOSFTP
- 美化載入失敗的圖片