Hadoop的namenode无法启动问题(50070无法访问,50030可以访问)


 2013-08-31 10:29:31,241 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.java.io.FileNotFoundException: /opt/data/hadoop/hdfs/name/current/VERSION (Permission denied) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.(RandomAccessFile.java:212) at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.read(Storage.java:237) at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.read(Storage.java:233) at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:418) at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:110) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:291) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.(FSNamesystem.java:270) at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:271) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:303) at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.java:433) at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.java:421) at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.read(Storage.java:237) at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.read(Storage.java:233) at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:418) at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:110) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:291) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.(FSNamesystem.java:270) at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:271) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:303) at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.java:433) at org.apache.hadoop.hdfs.server.namenode.NameNode.(NameNode.java:421) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1359) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1368)




处理方式:

[root@master bin]# cd /opt/data/hadoop/hdfs/name/current/
[root@master current]# ls
edits  fsimage  fstime  VERSION
[root@master current]# ll
total 32
-rw-r--r--  1 root root    4 Aug 31 10:07 edits
-rw-r--r--  1 root root 1753 Aug 31 10:07 fsimage
-rw-r--r--  1 root root    8 Aug 31 10:07 fstime
-rw-r--r--  1 root root  101 Aug 31 10:07 VERSION
[root@master current]# pwd
/opt/data/hadoop/hdfs/name/current
[root@master current]# chown hadoop:hadoop -R /opt/data/hadoop/hdfs/name/current/

 

切换到hadoop用户,start-all.sh 问题解决。
[hadoop@master bin]$ cd /opt/modules/hadoop/hadoop-0.21.0/bin
[hadoop@master bin]$ ls
hadoop            hadoop-daemons.sh  mapred            slaves.sh          start-dfs.sh     stop-balancer.sh
hadoop-config.sh  hdfs               mapred-config.sh  start-all.sh       start-mapred.sh  stop-dfs.sh
hadoop-daemon.sh  hdfs-config.sh     rcc               start-balancer.sh  stop-all.sh      stop-mapred.sh
[hadoop@master bin]$ sh start-all.sh 
This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh
starting namenode, logging to /opt/modules/hadoop/hadoop-0.21.0/bin/../logs/hadoop-hadoop-namenode-master.out
datanode2: datanode running as process 5909. Stop it first.
master: datanode running as process 10204. Stop it first.
datanode1: datanode running as process 5805. Stop it first.
master: starting secondarynamenode, logging to /opt/modules/hadoop/hadoop-0.21.0/bin/../logs/hadoop-hadoop-secondarynamenode-master.out
jobtracker running as process 10450. Stop it first.
datanode2: tasktracker running as process 6007. Stop it first.
master: tasktracker running as process 10602. Stop it first.
datanode1: tasktracker running as process 5903. Stop it first.




 

展开阅读全文

没有更多推荐了,返回首页