Hadoop 0.20.2安装启动后 jps找不到NameNode 解决方案单机伪分布式cat hadoop-hadoop-namenode-ubuntu.log
Hadoop 0.20.2安装启动后 jps找不到NameNode 解决方案 单机伪分布式
cat hadoop-hadoop-namenode-ubuntu.log:
2013-01-19 00:34:55,812 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)
2013-01-19 00:34:55,813 INFO org.apache.hadoop.ipc.Server: Stopping server on 9000
2013-01-19 00:34:55,814 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)
单击为分布式安装:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/home/hadoop/collector_3h/hadoop-0.20.2/hdfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/home/hadoop/collector_3h/hadoop-0.20.2/hdfs/data</value>
</property>
</configuration>
解决方案:
直接删除namenode的配置文件目录,在重新format
1,rm -rf ../hdfs/na*
2,./hadoop namenode -format
再次jps
hadoop@ubuntu:~/collector_3h/hadoop-0.20.2/bin$ jps
15742 JobTracker
15662 SecondaryNameNode
15499 DataNode
15895 TaskTracker
15335 NameNode
16127 Jps
hadoop@ubuntu:~/collector_3h/hadoop-0.20.2/bin$