Summary of Hadoop error handling methods

1. Error message:

org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /home/maclaren/data/hadoopTempDir/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.
        at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(
        at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(
        at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(
        at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(

Change the hadoop. TMP. Dir value of core-site. XML, or make sure to format the NameNode the first time you initialize it, otherwise an error will be reported.
So, be sure to clear all contents of the directory specified by hadoop.temp.dir, and then run
sh hadoop namenode-format

2. Error message:

org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Not able to place enough replicas, still in need of 1

The size of dfs.block.size must be set to the right size. I ran it on my laptop and set it to 1024. Modify the HDFS – core. XML


3. Error message:

org.apache.hadoop.ipc.RPC$VersionMismatch: Protocol org.apache.hadoop.hdfs.protocol.ClientProtocol version mismatch.


Replace hadoop-core-0.20-append-r1056497.jar in $HBASE_HOME/lib with hadoop-0.20.2-core-jar

4. Error message:

Caused by: Call to / failed on local exception:
	at org.apache.hadoop.ipc.Client.wrapException(
	at org.apache.hadoop.ipc.RPC$Invoker.invoke(
	at $Proxy8.getProtocolVersion(Unknown Source)
	at org.apache.hadoop.ipc.RPC.getProxy(
	at org.apache.hadoop.ipc.RPC.getProxy(
	at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(
	at org.apache.hadoop.hdfs.DFSClient.<init>(
	at org.apache.hadoop.hdfs.DFSClient.<init>(
	at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(
	at org.apache.hadoop.fs.FileSystem.createFileSystem(
	at org.apache.hadoop.fs.FileSystem.access$200(
	at org.apache.hadoop.fs.FileSystem$Cache.get(
	at org.apache.hadoop.fs.FileSystem.get(
	... 21 more


The client Hadoop JAR is not the same as the server JAR. Hdfs-site.xml
Because Eclipse uses Hadoop plug-in to submit jobs, will default to DrWho identity to write the job to the HDFS file system, the corresponding is HDFS /user/hadoop, because DrWho users do not have access to Hadoop directory, so the exception occurs. $hadoop fs-chmod 777 /user/hadoop
$hadoop fs-chmod 777 /user/hadoop

Read More: