I am implementing the Hadoop Single Node Cluster on my machine by following Michael Noll\'s tutorial and have come across data replication error:
Here\'s the full error
I had the same problem, I took a look at the datanode logs and there was a warning saying that the dfs.data.dir had incorrect permissions... so I just changed them and everything worked, which is kind of weird.
Specifically, my "dfs.data.dir" was set to "/home/hadoop/hd_tmp", and the error I got was:
...
...
WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Invalid directory in dfs.data.dir: Incorrect permission for /home/hadoop/hd_tmp/dfs/data, expected: rwxr-xr-x, while actual: rwxrwxr-x
ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: All directories in dfs.data.dir are invalid.
...
...
So I simply executed these commands:
And then everything worked fine.