Hadoop错误9_解决Hadoop的Safe mode is ON问题

来源:互联网 发布:淘宝一箩筐 编辑:程序博客网 时间:2024/06/04 18:36

好久没启动Hadoop集群,今天启动后发现出了一些问题


启动后,输入jps命令,发现Namenode节点没有启动,问题描述如下:

<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;">[hadoop@Master hadoop]$ jps</span></p><p>33100 ResourceManager33358 Jps32957 SecondaryNameNode</p>
同样,输入bin/hdfs dfsadmin -report查看各个节点的状态,也显示失败:

[hadoop@Master hadoop]$ bin/hdfs dfsadmin -report15/09/23 19:30:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableSafe mode is ONConfigured 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: 0Blocks with corrupt replicas: 0Missing blocks: 0-------------------------------------------------report: Access denied for user hadoop. Superuser privilege is required[hadoop@Master hadoop]$ 

查找解决方法,按一下方法解决:


[hadoop@Master hadoop]$  hadoop dfsadmin -safemode leaveDEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.15/09/23 19:37:11 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicablesafemode: Access denied for user hadoop. Superuser privilege is required[hadoop@Master hadoop]$ suPassword: [root@Master hadoop]#  hadoop dfsadmin -safemode leaveDEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.15/09/23 19:37:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableSafe mode is OFF[root@Master hadoop]# 

需要在root用户下,输入hadoop dfsadmin -safemode leave

再次启动,发现成功:

[hadoop@Master hadoop]$ bin/hdfs dfsadmin -report15/09/23 19:42:26 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableSafe mode is ONConfigured Capacity: 37558796288 (34.98 GB)Present Capacity: 22514479104 (20.97 GB)DFS Remaining: 22513803264 (20.97 GB)DFS Used: 675840 (660 KB)DFS Used%: 0.00%Under replicated blocks: 0Blocks with corrupt replicas: 0Missing blocks: 0-------------------------------------------------Live datanodes (2):Name: 192.168.154.159:50010 (Slave2)Hostname: Slave2Decommission Status : NormalConfigured Capacity: 18779398144 (17.49 GB)DFS Used: 28672 (28 KB)Non DFS Used: 6979022848 (6.50 GB)DFS Remaining: 11800346624 (10.99 GB)DFS Used%: 0.00%DFS Remaining%: 62.84%Configured Cache Capacity: 0 (0 B)Cache Used: 0 (0 B)Cache Remaining: 0 (0 B)Cache Used%: 100.00%Cache Remaining%: 0.00%Xceivers: 1Last contact: Wed Sep 23 19:42:25 PDT 2015Name: 192.168.154.158:50010 (Slave1)Hostname: Slave1Decommission Status : NormalConfigured Capacity: 18779398144 (17.49 GB)DFS Used: 647168 (632 KB)Non DFS Used: 8065294336 (7.51 GB)DFS Remaining: 10713456640 (9.98 GB)DFS Used%: 0.00%DFS Remaining%: 57.05%Configured Cache Capacity: 0 (0 B)Cache Used: 0 (0 B)Cache Remaining: 0 (0 B)Cache Used%: 100.00%Cache Remaining%: 0.00%Xceivers: 1Last contact: Wed Sep 23 19:42:25 PDT 2015[hadoop@Master hadoop]$ 


附录:

dfsadmin -safemode value 参数value的说明如下:
enter - 进入安全模式
leave - 强制NameNode离开安全模式
get -  返回安全模式是否开启的信息
wait - 等待安全模式结束。


查找解决方法,按一下方法解决:

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 退款后又发货了怎么办 淘宝卖家不发货也不退款怎么办 已经申请退款卖家仍发货怎么办 淘宝卖家已发货买家申请退款怎么办 爱上街App不发货怎么办 阿里卖家虚假发货怎么办 联系不到淘宝卖家怎么办 没货买家不退款怎么办 买到假货没有发票怎么办 淘宝买的手机发票怎么办 淘宝上的发票丢了怎么办 淘宝买的东西电子发票怎么办 发票联给错顾客怎么办 客人让多给发票怎么办 13岁早晨上学叫不醒怎么办 官换机过保坏了怎么办 官换机在保坏了怎么办 留学生美国东西寄回国怎么办便宜 淘宝东西没到收货了怎么办 在淘宝上买东西被骗怎么办 网上把钱骗走了怎么办 在淘宝上卖号被骗了怎么办 如果淘宝商家保证金不够退款怎么办 天猫账号忘记了怎么办 姨妈来了10天了怎么办 微店商品无资质被下架怎么办 微店商品无资质怎么办 淘宝买东西提前确认收货了怎么办 苹果手机王者荣耀充值充多了怎么办 买家淘宝账号出现虚拟交易怎么办 贵州通登录不上怎么办 华为手机媒体声音小怎么办 苹果七内存满了怎么办 华为p9玩王者卡怎么办 鞋放健身房丢了怎么办 京东商家搞虚假活动怎么办 淘宝买的商品出现质量问题怎么办 买了重复的东西怎么办 借记卡在atm用不了怎么办 淘宝评论视频审核不通过怎么办 京东票据丢了怎么办