Datanode troubleshooting
In this recipe, we will look at some of the common issues with Datanode and how to resolve them.
Getting ready
The user is expected to complete the previous recipe and must have completed the Setting up multi-node HBase cluster recipe in Chapter 9, HBase Administration. In this recipe, we will be using the already configured Hadoop cluster.
How to do it...
Scenario 1: Datanode not starting due to permission issues on the Datanode
directory specified by dfs.datanode.data.dir
:
- Connect to the
dn1.cyrus.com
master node in the cluster and change to userhadoop
. - Try to write a
test
file to the location using the following command:$ touch /space/dn1/test
If it succeeds, then the permissions are fine.
- Otherwise, make sure the permissions of the directories pointed by
dfs.datanode.data.dir
are owned by the correct user. This is shown in the following screenshot: - The user could be
hadoop
orhdfs
. Also, the directory permission is755
for the top directory, as shown in the following...