akshay naidu akshay naidu - 5 months ago 34
Java Question

NodeManager NameNode ResourceManager DataNode SecondaryNameNode not running

i followed this link to install hadoop http://thepowerofdata.io/setting-up-a-apache-hadoop-2-7-single-node-on-ubuntu-14-04/

at the end when i run

jps


the o/p i get is

12815 JPS


while according to the link i should be getting

Jps
NodeManager
NameNode
ResourceManager
DataNode
SecondaryNameNode


i also tried to run the daemons manually by commands

hadoop-daemon.sh start namenode
hadoop-daemon.sh start datanode
yarn-daemon.sh start resourcemanager
yarn-daemon.sh start nodemanager
mr-jobhistory-daemon.sh start historyserver


but i get [fatal error] like this

starting namenode, logging to /usr/local/lib/hadoop-2.7.0/logs/hadoop-hadoop-namenode-akshay-300E4Z-300E5Z-300E7Z.out
[Fatal Error] core-site.xml:21:2: The markup in the document following the root element must be well-formed.


please help.

Answer

In core-site.xml I changed "fs.default.name" to "fs.defaultFS" but yet it was showing errors at some line number. I gone through the hadoop configuration files in editor where I found out that I have used the tag "<configuration>...</configuration>" twice in cases of all 4 .xml files (core-site,mapred-site,yarn-site,hdfs-site)(as I had just copy pasted from online source)

after removing it I ran the commands

hadoop namenode -format
start-dfs.sh
start-yarn.sh
jps

and finally i got the required response

4098 DataNode
4660 SecondaryNameNode
5271 Jps
4968 NodeManager
4829 ResourceManager
3933 NameNode