hadoop namenode未在两个ec2的2节点群集上运行instances:error fsnamesystem 初始化失败

egdjgwm8  于 2021-05-29  发布在  Hadoop
关注(0)|答案(2)|浏览(313)

我正在尝试用两个单独的ec2示例设置两节点hadoop(1.1.1)集群。当我启动./start-all.sh时,除了主节点上的namenode之外,所有deamons在两个节点上都正常运行。我将其配置为一个节点同时充当主节点和从节点,另一个节点仅充当从节点。我检查了name node日志,看到下面的消息:我运行得很好。/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:
6pp0gazn

6pp0gazn1#

停止所有的守护程序。。尝试在hdfs-site.xml文件中定义这两个属性dfs.data.dir和dfs.name.dir。
启动所有守护程序

irlmq6kh

irlmq6kh2#

显示namenode未格式化的日志。尝试格式化namenode$sudo hdfs namenode格式

相关问题