I use Windows 8 with a cloudera-quickstart-vm-5.4.2-0 virtual box. I am wanting to put a "words.txt" file in the HDFS. I got a connection exception.
I checked other StackOverflow threads/solutions and tried the following:
I checked the status of the namenode
and datanode.
It seems that the namenode
is dead while the datanode is running.
I restarted the namenode
, but it is still not running.
Here is a screenshot of the terminal using showing all the steps: terminal.png
I have no clue what to do next in order to solve the problem I have.
Note: I am new to Hadoop, so I am not familiar with most of the technical terms associated with it. A descriptive solution is very much appreciated.
Fixed my own problem
Check status of all services: for service in /etc/init.d/hadoop-hdfs-*; do $service status; done;
for service in /etc/init.d/hadoop-hdfs-*; do $service status; done;
, output should be:
Hadoop datanode is running [ OK ]
Hadoop namenode is dead and pid file exists [FAILED]
Hadoop secondarynamenode is running [ OK ]
To get the namenode running do the following:
for service in /etc/init.d/hadoop-hdfs-*; do $service stop; done;
for service in /etc/init.d/hadoop-hdfs-*; do $service stop; done;
sudo rm -rf /var/lib/hadoop-hdfs/cache/*
sudo -u hdfs hdfs namenode -format
for service in /etc/init.d/hadoop-hdfs-*; do $service start; done;
for service in /etc/init.d/hadoop-hdfs-*; do $service start; done;
for service in /etc/init.d/hadoop-hdfs-*; do $service status; done;
for service in /etc/init.d/hadoop-hdfs-*; do $service status; done;
Result should be:
Hadoop datanode is running [ OK ]
Hadoop namenode is running [ OK ]
Hadoop secondarynamenode is running [ OK ]
As described in the following link:
http://kshitish-bigdata.blogspot.nl/2015/02/hadoop-namenode-is-dead-and-pid-file.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.