I am trying to configure Hadoop on Ubuntu 11.04 and Java 6 sun. I worked with chaos 0.20.203 rc1 build. I have repeatedly encountered the Ubuntu 11.04 issue with java-6-sun. When I try to start hadoop, the datanode does not start due to "Unable to access storage".
2011-12-22 22:09:20,874 INFO org.apache.hadoop.hdfs.server.common.Storage: Cannot lock storage /home/hadoop/work/dfs_blk/hadoop. The directory is already locked. 2011-12-22 22:09:20,896 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Cannot lock storage /home/hadoop/work/dfs_blk/hadoop. The directory is already locked. at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.lock(Storage.java:602) at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.analyzeStorage(Storage.java:455) at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:111) at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:354) at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:268) at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1480) at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1419) at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1437) at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1563) at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1573)
I tried to upgrade and downgrade to a couple of versions in the 0.20 branch from Apache, even cloudera, as well as uninstall and install hadoop again. But still I am facing this problem. Typical workarounds, such as deleting * .pid files in the / tmp directory, also do not work. Can someone point me to a solution?
source share