Hadoop安装:namenode无法启动 [英] Hadoop installation: namenode cannot be started

查看:687
本文介绍了Hadoop安装:namenode无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在尝试在我的ubuntu 14.10(32位utopic)上安装hadoop-2.6.0。我遵循了这里的指示:

http://www.itzgeek.com/how-tos/linux/ubuntu-how -tos / install-apache-hadoop -ubuntu-14-10-centos-7-single-node-cluster.html#axzz3X2DuWaxQ 然而,namenode当我尝试格式化namenode时,无法启动。



这是当我尝试使用hdfs或hadoop namenode -format时所收到的内容:

  15/04/11 16:32:13致命namenode.NameNode:开始namenode 
java.lang.IllegalArgumentException:URI有一个授权组件
位于java.io.File。< init>(File.java:423)
位于org.apache.hadoop.hdfs.server.namenode.NNSStorage.getStorageDirectory(NNStorage.java:329 )
at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java:270)
at
org.a pache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:241)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:935)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1379)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1504 )
15/04/11 16:32:13 INFO util.ExitUtil:以状态1退出
15/04/11 16:32:14信息namenode.NameNode:SHUTDOWN_MSG:
/ ************************************************** **********
SHUTDOWN_MSG:在ThinkPad-Edge-E540 / 127.0.1.1上关闭NameNode
***************** ******************************************* /

我是linux和hadoop的新手。请帮我解决这个问题。另外,当我第一次尝试安装hadoop时,我收到如下错误消息:

  java.net.ConnectException:Call From ThinkPad-Edge-E540 / 127.0.1.1到localhost:9000连接失败异常:java.net.ConnectException:连接被拒绝;有关更多详细信息,请参阅:http://wiki.apache.org/hadoop/ConnectionRefused 

稍后,我卸载hadoop 2.6.0,现在正试图按照上述链接中显示的当前指令。



更新



我删除了以前安装的所有先前安装的java(jdk1.7.0)。但是错误消息仍然存在。



更新



这是我在etc / hosts中显示的内容:

  127.0.0.1 localhost 
127.0.1.1 myname-mycomputer(我已将每条建议注释掉)

#对于支持IPv6的主机,以下几行是可取的:
:: 1 ip6-localhost ip6-loopback
fe00 :: 0 ip6-localnet
ff00:0 ip6-mcastprefix
ff02 :: 1 ip6-allnodes
ff02 :: 2 ip6-allrouters


解决方案

这个问题出现时,我错误地指定了错误的路径,在hdfs-site.xml中的namenode和datanode和core-site.xml中的tmp目录路径,
路径应该格式化良好,例如 -

 <属性> 
< name> dfs.namenode.edits.dir< / name>
< value> file:/// home / hadoop / hadoop-content / hdfs / namenode< / value>
< / property>

<属性>
< name> dfs.datanode.data.dir< / name>
< value> file:/// home / hadoop / hadoop-content / hdfs / datanode< / value>
< / property>

以及core-site.xml中的临时目录,就像 -

 < configuration> 
<属性>
<名称> fs.defaultFS< / name>
< value> hdfs:// localhost:9000< / value>
< / property>
<属性>
< name> hadoop.tmp.dir< / name>
<值> / home / hadoop / hadoop-content / tmp< /值>
< / property>





有时我们在指定 - file:///


Currently I am trying to install hadoop-2.6.0 on my ubuntu 14.10 (32 bit utopic). I followed the instruction from here:

http://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-apache-hadoop-ubuntu-14-10-centos-7-single-node-cluster.html#axzz3X2DuWaxQ

However, namenode cannot be started when i try to format namenode.

This is the what I keep receiving when I try to do hdfs or hadoop namenode -format:

15/04/11 16:32:13 FATAL namenode.NameNode: Fialed to start namenode
java.lang.IllegalArgumentException: URI has an authority component
    at java.io.File.<init>(File.java:423)
    at             org.apache.hadoop.hdfs.server.namenode.NNSStorage.getStorageDirectory(NNStorage.java:329)
    at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java: 270)
    at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:241)
    at     org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:935)
    at     org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1379)
    at     org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1504)
15/04/11 16:32:13 INFO util.ExitUtil: Exiting with status 1
15/04/11 16:32:14 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ThinkPad-Edge-E540/127.0.1.1
************************************************************/

I am new to linux and hadoop. Please help me out on this issue. Also, when i first tried to install hadoop, I was receiving error message like this:

    java.net.ConnectException: Call From ThinkPad-Edge-E540/127.0.1.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

Later, I uninstalled hadoop 2.6.0 and now am trying to follow current instruction as shown in above link.

update

I have removed all previous installed java (jdk1.7.0) that I installed in previous version. But the error message is still there.

Update

This is what showing in my etc/hosts:

127.0.0.1 localhost
127.0.1.1 myname-mycomputer (I have commented out this line per suggestion)

#The following lines are desirable for IPv6 capable hosts
::1       ip6-localhost  ip6-loopback
fe00::0   ip6-localnet
ff00:0    ip6-mcastprefix
ff02::1   ip6-allnodes
ff02::2   ip6-allrouters

解决方案

This problem arise when mistaken I specified wrong path for namenode and datanode in hdfs-site.xml and tmp dir path in core-site.xml, Path should be well formatted, for example-

<property>
    <name>dfs.namenode.edits.dir</name>
    <value>file:///home/hadoop/hadoop-content/hdfs/namenode</value>
</property>

<property>
    <name>dfs.datanode.data.dir</name>
    <value>file:///home/hadoop/hadoop-content/hdfs/datanode</value>
</property>

and for temp dir in core-site.xml it is like -

<configuration>
<property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
</property>
<property>
    <name>hadoop.tmp.dir</name>
    <value>/home/hadoop/hadoop-content/tmp</value>
</property>

sometimes we make mistake in specifying - file:///

这篇关于Hadoop安装:namenode无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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