hadoop namenode无法在Ubuntu上启动/格式化 [英] hadoop namenode not starting/formatting on Ubuntu

查看:664
本文介绍了hadoop namenode无法在Ubuntu上启动/格式化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Ubuntu上设置一个hadoop实例。 namenode没有启动。当我做 jps 命令时,我可以看到除 namenode 之外的所有内容。这是我的hdfs-site.xml文件。

 < configuration> 
<属性>
< name> dfs.datanode.data.dir< / name>
<值> / home / ac / hadoop / dfs< / value>
< / property>
<属性>
<名称> dfs.namenode.name.dir< /名称>
<值> / home / ac / hadoop / dfs< / value>
< / property>
<属性>
< name> dfs.replication< / name>
<值> 1< /值>
< / property>
< / configuration>

和继承人my core-site.xml

 <结构> 
<属性>
<名称> fs.default.name< /名称>
< value> hdfs:// localhost:9000< / value>
< / property>
< / configuration>

我得到的错误是

  ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem:FSNamesystem初始化失败。 
java.io.IOException:NameNode未格式化。

当我格式化namenode时,我在提示符后得到了这个

  STARTUP_MSG:启动NameNode 
STARTUP_MSG:host = hanu / 127.0.1.1
STARTUP_MSG:args = [-format]
STARTUP_MSG:version = 1.2 .1
STARTUP_MSG:build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152;由'mattf'编译于星期一7月22日15:23:09 PDT 2013
STARTUP_MSG:java = 1.8.0_31
******************* ***************************************** /
用法:java NameNode [-format [-force] [-nonInteractive]] | [ - 升级] | [-rollback] | [-finalize] | [-importCheckpoint] | [-recover [-force]]
15/02/03 15:03:41信息namenode.NameNode:SHUTDOWN_MSG:
/ **************** ********************************************
SHUTDOWN_MSG:关闭Namenode在hanu / 127.0.1.1

我试图根据各种建议更改文件在那里,但没有任何工作。我认为namenode格式不正确。
我的设置有什么问题,我怎样才能纠正它。任何帮助表示赞赏。谢谢

解决方案

您看到错误消息的原因是因为命令错字,这就是为什么namenode类显示 Usage 错误,可能是您发布的命令选项不当。



请确保正确输入命令:

  bin / hadoop namenode -format 

,然后尝试启动NameNode,您可以在前台启动NameNode服务,以查看是否所有内容都正常工作,并且如果您没有看到任何错误,则可以终止该进程并启动所有服务 start-all.sh 脚本。



以下是您可以如何在前台启动NameNode进程:

  bin / hadoop namenode 



<

  15/02/04 10:42 :44 INFO http.HttpServer:Jetty绑定到端口50070 
15/02/04 10:42:44 INFO mortbay.log:jetty-6.1.26
15/02/04 10:42:45信息mortbay.log:已启动SelectChannelConnector@0.0.0.0:50070
15/02/04 10:42:45信息namenode.NameNode:Web服务器up:0.0.0.0:50070
15/02/04 10:42:45信息ipc.Server:IPC Server Responder :启动
15/02/04 10:42:45信息ipc.Server:8020上的IPC服务器侦听器:启动
15/02/04 10:42:45信息ipc.Server:IPC服务器处理程序8020上的0:启动
15/02/04 10:42:45信息ipc.Server:8020上的IPC服务器处理程序1:启动
15/02/04 10:42:45 INFO ipc.Server :8020上的IPC服务器处理程序2:启动
15/02/04 10:42:45信息ipc.Server:8020上的IPC服务器处理程序3:启动
15/02/04 10:42:45 INFO ipc.Server:8020上的IPC服务器处理程序4:启动
15/02/04 10:42:45 INFO ipc.Server:8020上的IPC服务器处理程序5:启动
15/02/04 10 :42:45信息ipc.Server:8020上的IPC服务器处理程序6:启动
15/02/04 10:42:45信息ipc.Server:8020上的IPC服务器处理程序7:启动
15/02/04 10:42:45信息ipc.Server:8020上的IPC服务器处理程序8:启动
15/02/04 10:42:45信息ipc.Server:8020上的IPC服务器处理程序9:开始

您可以通过发送< Ctrl + C> 进程。


am trying to set up a hadoop instance on Ubuntu. The namenode is not starting up. When i do jps command I can see all but namenode . Here is my hdfs-site.xml file.

<configuration>
    <property>
        <name>dfs.datanode.data.dir</name>
        <value>/home/ac/hadoop/dfs</value>
    </property>
    <property>
        <name>dfs.namenode.name.dir</name>
        <value>/home/ac/hadoop/dfs</value>
    </property>
    <property>
        <name>dfs.replication</name>
        <value>1</value>    
    </property>
</configuration>

and heres my core-site.xml

<configuration>
       <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>    
    </property>
</configuration>

The error that i got is

ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
java.io.IOException: NameNode is not formatted.

When I formatted namenode I got this on prompt

STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = hanu/127.0.1.1
STARTUP_MSG:   args = [–format]
STARTUP_MSG:   version = 1.2.1
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152; compiled by 'mattf' on Mon Jul 22 15:23:09 PDT 2013
STARTUP_MSG:   java = 1.8.0_31
************************************************************/
Usage: java NameNode [-format [-force ] [-nonInteractive]] | [-upgrade] | [-rollback] | [-finalize] | [-importCheckpoint] | [-recover [ -force ] ]
15/02/03 15:03:41 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at hanu/127.0.1.1

I've tried to to change files as per various suggestions out there but nothing is working. I think namenode is not formatting properly. Whats wrong in my setup and how can I get it corrected.Any help is appreciated. Thanks

解决方案

The reason you are seeing the error message is because of command typo, that is why namenode class is showing the Usage error, may be you have issued the command option improperly.

Make sure you type the command properly:

bin/hadoop namenode -format

and then try to start the NameNode, you could start NameNode service on foreground just to see if everything is working out properly and if you don't see any errors you could kill the process and start all the services using start-all.sh script.

Here's how you could start NameNode process on foreground:

bin/hadoop namenode

once started these are the log messages to look for to validate a proper startup:

15/02/04 10:42:44 INFO http.HttpServer: Jetty bound to port 50070
15/02/04 10:42:44 INFO mortbay.log: jetty-6.1.26
15/02/04 10:42:45 INFO mortbay.log: Started SelectChannelConnector@0.0.0.0:50070
15/02/04 10:42:45 INFO namenode.NameNode: Web-server up at: 0.0.0.0:50070
15/02/04 10:42:45 INFO ipc.Server: IPC Server Responder: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server listener on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 0 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 1 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 2 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 3 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 4 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 5 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 6 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 7 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 8 on 8020: starting
15/02/04 10:42:45 INFO ipc.Server: IPC Server handler 9 on 8020: starting

you could kill the service by sending <Ctrl+C> to the process.

这篇关于hadoop namenode无法在Ubuntu上启动/格式化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆