您好,我在尝试从cloudera
安装hadoop时遇到此问题请帮助....
另外我做了ssh-keygen -t rsa
现在提供以下结果
Sanjanas-MacBook-Pro:conf sanjanaagarwal$ /usr/local/hadoop/bin/hadoop namenode -format
13/11/11 17:47:13 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = //
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 0.20.2-cdh3u5
STARTUP_MSG: build = git://ubuntu-slave02/var/lib/jenkins/workspace/CDH3u5-Full-RC/build/cdh3/hadoop20/0.20.2-cdh3u5/source -r 30233064aaf5f2492bc687d61d72956876102109; compiled by 'jenkins' on Fri Oct 5 17:21:34 PDT 2012
************************************************************/
Re-format filesystem in /usr/local/tmp/hadoop/hadoop-sanjanaagarwal/dfs/name ? (Y or N) Y
13/11/11 17:47:16 INFO util.GSet: VM type = 64-bit
13/11/11 17:47:16 INFO util.GSet: 2% max memory = 35.56 MB
13/11/11 17:47:16 INFO util.GSet: capacity = 2^22 = 4194304 entries
13/11/11 17:47:16 INFO util.GSet: recommended=4194304, actual=4194304
2013-11-11 17:47:16.620 java[11929:1903] Unable to load realm info from SCDynamicStore
13/11/11 17:47:16 INFO namenode.FSNamesystem: fsOwner=sanjanaagarwal (auth:SIMPLE)
13/11/11 17:47:17 INFO namenode.FSNamesystem: supergroup=supergroup
13/11/11 17:47:17 INFO namenode.FSNamesystem: isPermissionEnabled=true
13/11/11 17:47:17 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=1000
13/11/11 17:47:17 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
13/11/11 17:47:17 INFO common.Storage: Cannot lock storage /usr/local/tmp/hadoop/hadoop-sanjanaagarwal/dfs/name. The directory is already locked.
13/11/11 17:47:17 ERROR namenode.NameNode: java.io.IOException: Cannot lock storage /usr/local/tmp/hadoop/hadoop-sanjanaagarwal/dfs/name. The directory is already locked.
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.lock(Storage.java:596)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1259)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1277)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1243)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1434)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1453)
答案 0 :(得分:0)
通过添加这些步骤很好地解决了这个问题
rm -rf /usr/local/tmp/hadoop/hadoop-sanjanaagarwal/dfs/name
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa.pub >> ~/.ssh/known_hosts
ssh localhost