我正在尝试使用2个单独的ec2实例设置两个节点hadoop(1.1.1)群集。当我启动./start-all.sh时,所有守护进程在主节点上除namenode之外的两个节点上运行正常。我对其进行了配置,使得一个节点既充当主节点又充当从节点,其他节点仅充当从节点。我检查了名称节点日志,我看到下面的消息:我运行完美./hadoop namenode -format甚至然后我收到此错误说FSNameSystem初始化失败并且namenode未格式化。请帮忙。
2015-07-21 14:18:24,374 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2015-07-21 14:18:24,384 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
2015-07-21 14:18:24,387 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2015-07-21 14:18:24,387 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: NameNode metrics system started
2015-07-21 14:18:24,595 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2015-07-21 14:18:24,598 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Source name ugi already exists!
2015-07-21 14:18:24,602 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source jvm registered.
2015-07-21 14:18:24,602 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source NameNode registered.
2015-07-21 14:18:24,616 INFO org.apache.hadoop.hdfs.util.GSet: VM type = 64-bit
2015-07-21 14:18:24,616 INFO org.apache.hadoop.hdfs.util.GSet: 2% max memory = 17.78 MB
2015-07-21 14:18:24,616 INFO org.apache.hadoop.hdfs.util.GSet: capacity = 2^21 = 2097152 entries
2015-07-21 14:18:24,616 INFO org.apache.hadoop.hdfs.util.GSet: recommended=2097152, actual=2097152
2015-07-21 14:18:24,631 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: fsOwner=ubuntu
2015-07-21 14:18:24,631 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: supergroup=supergroup
2015-07-21 14:18:24,631 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isPermissionEnabled=true
2015-07-21 14:18:24,635 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: dfs.block.invalidate.limit=100
2015-07-21 14:18:24,635 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
2015-07-21 14:18:24,662 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Registered FSNamesystemStateMBean and NameNodeMXBean
2015-07-21 14:18:24,692 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Caching file names occuring more than 10 times
2015-07-21 14:18:24,701 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
java.io.IOException: NameNode is not formatted.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:330)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:100)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:411)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:379)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:277)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:529)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1403)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1412)
2015-07-21 14:18:24,702 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: java.io.IOException: NameNode is not formatted.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:330)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:100)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:411)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:379)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:277)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:529)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1403)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1412)
2015-07-21 14:18:24,702 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:
答案 0 :(得分:0)
停止所有守护进程..尝试定义这两个属性dfs.data.dir&amp; hdfs-site.xml文件中的dfs.name.dir。
启动所有守护进程
答案 1 :(得分:0)
日志显示namenode未格式化。 尝试格式化namenode $ sudo hdfs namenode format