2
回答
Name node is in safe mode. Is no working!
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

[hadoop@master ~]$ start-all.sh
Warning: $HADOOP_HOME is deprecated.

starting namenode, logging to /home/wqj/opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-namenode-master.out
master: Warning: $HADOOP_HOME is deprecated.
master:
master: starting datanode, logging to /home/wqj/opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-datanode-master.out
node1: datanode running as process 2101. Stop it first.
node1: Warning: $HADOOP_HOME is deprecated.
node1:
node1: Warning: $HADOOP_HOME is deprecated.
node1:
node1: starting secondarynamenode, logging to /home/wqj/opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-secondarynamenode-master.out
starting jobtracker, logging to /home/wqj/opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-jobtracker-master.out
master: Warning: $HADOOP_HOME is deprecated.
master:
master: starting tasktracker, logging to /home/wqj/opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-tasktracker-master.out
node1: Warning: $HADOOP_HOME is deprecated.
node1:
node1: tasktracker running as process 2604. Stop it first.
[hadoop@master ~]$ jps
1939 NameNode
2101 DataNode
2419 JobTracker
2315 SecondaryNameNode
2604 TaskTracker
2720 Jps
[hadoop@master ~]$ tail -50f /home/wqj/opt/modules/hadoop/hadoop-1.0.3/libexec/../logs/hadoop-hadoop-namenode-master.log
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
 at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
 at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:415)
 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
 at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)
2013-12-28 15:36:32,102 INFO org.apache.hadoop.hdfs.StateChange: STATE* Safe mode ON.
The ratio of reported blocks 1.0000 has reached the threshold 0.9990. Safe mode will be turned off automatically in 9 seconds.
2013-12-28 15:36:36,083 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hadoop cause:org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot delete /home/wqj/opt/data/hadoop/mapred/mrsystem. Name node is in safe mode.
The ratio of reported blocks 1.0000 has reached the threshold 0.9990. Safe mode will be turned off automatically in 5 seconds.
2013-12-28 15:36:36,083 INFO org.apache.hadoop.ipc.Server: IPC Server handler 9 on 9000, call delete(/home/wqj/opt/data/hadoop/mapred/mrsystem, true) from 192.168.1.171:48970: error: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot delete /home/wqj/opt/data/hadoop/mapred/mrsystem. Name node is in safe mode.
The ratio of reported blocks 1.0000 has reached the threshold 0.9990. Safe mode will be turned off automatically in 5 seconds.
org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot delete /home/wqj/opt/data/hadoop/mapred/mrsystem. Name node is in safe mode.
The ratio of reported blocks 1.0000 has reached the threshold 0.9990. Safe mode will be turned off automatically in 5 seconds.
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.deleteInternal(FSNamesystem.java:1994)
 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.delete(FSNamesystem.java:1974)
 at org.apache.hadoop.hdfs.server.namenode.NameNode.delete(NameNode.java:792)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
 at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
 at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:415)
 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
 at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)
2013-12-28 15:36:42,144 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Total number of blocks = 2
2013-12-28 15:36:42,144 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of invalid blocks = 0
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of under-replicated blocks = 2
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of  over-replicated blocks = 0
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.StateChange: STATE* Safe mode termination scan for invalid, over- and under-replicated blocks completed in 20 msec
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.StateChange: STATE* Leaving safe mode after 34 secs.
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.StateChange: STATE* Safe mode is OFF.
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.StateChange: STATE* Network topology has 1 racks and 1 datanodes
2013-12-28 15:36:42,145 INFO org.apache.hadoop.hdfs.StateChange: STATE* UnderReplicatedBlocks has 2 blocks
2013-12-28 15:36:44,108 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: ReplicateQueue QueueProcessingStatistics: First cycle completed 0 blocks in 2 msec
2013-12-28 15:36:44,108 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: ReplicateQueue QueueProcessingStatistics: Queue flush completed 0 blocks in 2 msec processing time, 2 msec clock time, 1 cycles
2013-12-28 15:36:44,108 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: InvalidateQueue QueueProcessingStatistics: First cycle completed 0 blocks in 0 msec
2013-12-28 15:36:44,109 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: InvalidateQueue QueueProcessingStatistics: Queue flush completed 0 blocks in 0 msec processing time, 0 msec clock time, 1 cycles
2013-12-28 15:36:46,096 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* NameSystem.addToInvalidates: blk_-4064735418121736076 is added to invalidSet of 192.168.1.171:50010
2013-12-28 15:36:46,244 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* NameSystem.allocateBlock: /home/wqj/opt/data/hadoop/mapred/mrsystem/jobtracker.info. blk_-1475948516064562161_5701
2013-12-28 15:36:46,353 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* NameSystem.addStoredBlock: blockMap updated: 192.168.1.171:50010 is added to blk_-1475948516064562161_5701 size 4
2013-12-28 15:36:46,355 INFO org.apache.hadoop.hdfs.StateChange: Removing lease on  file /home/wqj/opt/data/hadoop/mapred/mrsystem/jobtracker.info from client DFSClient_-521661125
2013-12-28 15:36:46,356 INFO org.apache.hadoop.hdfs.StateChange: DIR* NameSystem.completeFile: file /home/wqj/opt/data/hadoop/mapred/mrsystem/jobtracker.info is closed by DFSClient_-521661125
2013-12-28 15:36:47,112 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* ask 192.168.1.171:50010 to delete  blk_-4064735418121736076_5700
2013-12-28 15:41:12,063 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 192.168.1.171
2013-12-28 15:41:12,063 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of transactions: 7 Total time for transactions(ms): 2Number of transactions batched in Syncs: 0 Number of syncs: 6 SyncTimes(ms): 7
2013-12-28 15:41:12,740 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll FSImage from 192.168.1.171
2013-12-28 15:41:12,740 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of transactions: 0 Total time for transactions(ms): 0Number of transactions batched in Syncs: 0 Number of syncs: 1 SyncTimes(ms): 1

------------------------------------------------------------------------------

哪个大神帮我看看?!网上说执行:hadoop dfs -safemode leave

这个执行时有没有什么讲究,为什么我做这个没反应?

举报
hiqj
发帖于4年前 2回/470阅
共有2个答案 最后回答: 4年前

引用来自“Captain-0413”的答案

退出安全模式即可,执行当前代码: bin/hadoop dfsadmin -safemode leave
我执行bin/hadoop dfsadmin -safemode get 得到的结果为:OFF 然后我也bin/hadoop dfsadmin -safemode leave了,但是还是不行。后来我想,可能是因为我在配集群的时候master和node1为同一个IP的缘故吧!因为事实可能是我只有一台电脑,但是我想模拟集群情况。可能这样子不可以吧!现在单机上配置能成功,所以我就暂且将上边那个问题搁置了。我也不知道是不是因为那个原因~~~~~~~
顶部