zoukankan      html  css  js  c++  java
  • (转)无法启动namenode

    (转)无法启动namenode

    (1)hadoop集群我维护有一段时间了,今天忽然出现了一个问题,当我stop-all.sh后hadoop的web页面无法显示,分析应该是namenode没有启动,检查后果然namenode没有启动,凭借经验,我猜想应该是配置文件的问题,于是仔细检查了conf下的每一个文件,但是配置文件配置无误,namenode依旧无法启动,这个问题困扰了我一天的时间,查看log日志后,发现时pid的问题,在网上查了相关资料后才知道原来我先前的03服务器搁置了一段时间没有添加到datanode,而后我添加后会有一个PID不匹配的问题,于是我着手开始做:

    日志中显示的错误:

    2010-02-09 21:52:49,343 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: STARTUP_MSG:
    /************************************************************
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG: host = yijian/192.168.0.13
    STARTUP_MSG: args = []
    STARTUP_MSG: version = 0.20.1
    STARTUP_MSG: build =http://svn.apache.org/repos/asf/ ... /release-0.20.1-rc1-r 810220; compiled by 'oom' on Tue Sep 1 20:55:56 UTC 2009
    ************************************************************/
    2010-02-09 21:52:49,531 INFO org.apache.hadoop.ipc.metrics.RpcMetrics: Initializing RPC Metrics with hostName=NameNode, port=8888
    2010-02-09 21:52:49,531 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Namenode up at: 127.0.0.1/127.0.0.1:8888
    2010-02-09 21:52:49,546 INFO org.apache.hadoop.metrics.jvm.JvmMetrics: Initializing JVM Metrics with processName=NameNode, sessionId=null
    2010-02-09 21:52:49,546 INFO org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics: Initializing NameNodeMeterics using context object:org.apache.hadoop.metrics.spi.NullContext
    2010-02-09 21:52:50,250 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: fsOwner=jian,None,root,Administrators,Users
    2010-02-09 21:52:50,250 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: supergroup=supergroup
    2010-02-09 21:52:50,250 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: isPermissionEnabled=true
    2010-02-09 21:52:50,265 INFO org.apache.hadoop.hdfs.server.namenode.metrics.FSNamesystemMetrics: Initializing FSNamesystemMetrics using context object:org.apache.hadoop.metrics.spi.NullContext
    2010-02-09 21:52:50,265 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Registered FSNamesystemStatusMBean
    2010-02-09 21:52:50,359 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:317)
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:87)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:311)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:292)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:201)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:279)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)
    2010-02-09 21:52:50,359 INFO org.apache.hadoop.ipc.Server: Stopping server on 8888
    2010-02-09 21:52:50,359 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:317)
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:87)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:311)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:292)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:201)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:279)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:956)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)
    2010-02-09 21:52:50,359 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:
    /************************************************************
    SHUTDOWN_MSG: Shutting down NameNode at yijian/192.168.0.13
    ************************************************************/

    处理错误:

    将集群中每个datanode的/hdfs/data/current中的VERSION删掉,然后执行hadoop namenode -format

    重启集群,错误消失。

    link:http://hi.baidu.com/ren2200857/blog/item/3e14048ac30870e8503d9270.html

  • 相关阅读:
    put 创建索引
    post创建一个空索引
    elasticsearch 安装marvel
    elasticsearch 安装bigdesk插件
    perl 播放windows文件
    如何在十分钟内插入1亿条记录到Oracle数据库?
    常见地址说明
    如何做出实用而强大的数据地图?
    如何利用jqGrid表格方法重新设置caption属性值
    如何给jqGrid表格按照字段进行分组
  • 原文地址:https://www.cnblogs.com/tangtianfly/p/2411605.html
Copyright © 2011-2022 走看看