After successfully setting up the hadoop environment, all hadoop components work properly. After restarting hadoop several times, it is found that datanode cannot work normally. When hadoop's background http: // localhost: 50030 and http: // localhost: 50070 are enabled, it is found that lives nodes is 0.
View the log information for starting datanode:
Org. Apache. hadoop. IPC. Client: retryingconnect to server: uec-Fe/16.157.63.10: 9000. Already tried 0 time (s ).
View the log information for starting namenode:
Java. Io. ioexception:
File XXXXXXXXX/jobtracker.info cocould only be replicated to 0 nodes, instead of 1
As you can see, hadoop. tmp. dir attributes are also configured in the core-site.xml:
<Property>
<Name> hadoop. tmp. dir </Name>
<Value>/home/hadoop/tmp </value>
<Description> a base for other temporary directories. </description>
</Property>
I tried many methods through online search and found that I had no permissions.
Sudo chown-r hadoop/home/hadoop/tmp
Then stop the hadoop service and reformat the directory. (normally, the system will remind you whether to reformat the directory. This indicates that the directory exists. Delete the Directory and then format it ), finally, start the hadoop service.
Summary:
To solve this problem:
1> Configure the hadoop. tmp. dir attribute;
2> modify sudo chown-r hadoop/home/hadoop/tmp (value of hadoop. tmp. DIR)
Finally, hadoop datanode may not work due to other reasons and is accumulating.
Reprinted please indicate the source: http://blog.csdn.net/johnny901114/article/details/9624873