Hadoop Installation



0
Hi,
I tried to give a shot at hadoop installation and used the following link as I am using MAC OS. http://amodernstory.com/2014/09/23/installing-hadoop-on-mac-osx-yosemite/

Things seemed to be going well until few errors came across as below. Does anybody know what went wrong?

[Fatal Error] core­site.xml:24:4: The markup in the document following the root element must be well-
formed.

15/10/26 17:10:49 FATAL conf.Configuration: error parsing conf core­site.xml

org.xml.sax.SAXParseException; systemId:

file:/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop/core­site.xml; lineNumber: 24; columnNumber: 4;

The markup in the document following the root element must be well­formed.

at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2468)

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2539)

at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2492)

at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1143)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1115)

at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1451)

at

org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:321)

at

org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:170)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:153)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

at org.apache.hadoop.hdfs.tools.GetConf.main(GetConf.java:332)

Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId:

file:/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop/core­site.xml; lineNumber: 24; columnNumber: 4;

The markup in the document following the root element must be well­formed.

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2645)

at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2492)

at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1143)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1115)

at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1451)

at

org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:321)

at

org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:170)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:153)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

at org.apache.hadoop.hdfs.tools.GetConf.main(GetConf.java:332)

Caused by: org.xml.sax.SAXParseException; systemId:

file:/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop/core­site.xml; lineNumber: 24; columnNumber: 4;

The markup in the document following the root element must be well­formed.

at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2468)

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2539)

... 12 more

Starting namenodes on []

localhost: starting namenode, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/hadoop-
mudassir495ece­namenode­Mudassirs­MacBook­Pro.local.out

localhost: [Fatal Error] core­site.xml:24:4: The markup in the document following the root element

must be well­formed.

localhost: starting datanode, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/hadoop-
mudassir495ece­datanode­Mudassirs­MacBook­Pro.local.out

localhost: [Fatal Error] core­site.xml:24:4: The markup in the document following the root element

must be well­formed.

[Fatal Error] core­site.xml:24:4: The markup in the document following the root element must be well-
formed.

15/10/26 17:10:58 FATAL conf.Configuration: error parsing conf core­site.xml

org.xml.sax.SAXParseException; systemId:

file:/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop/core­site.xml; lineNumber: 24; columnNumber: 4;

The markup in the document following the root element must be well­formed.

at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2468)

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2539)

at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2492)

at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1143)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1115)

at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1451)

at

org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:321)

at

org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:170)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:153)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

at org.apache.hadoop.hdfs.tools.GetConf.main(GetConf.java:332)

Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId:

file:/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop/core­site.xml; lineNumber: 24; columnNumber: 4;

The markup in the document following the root element must be well­formed.

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2645)

at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2492)

at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1143)

at org.apache.hadoop.conf.Configuration.set(Configuration.java:1115)

at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1451)

at

org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:321)

at

org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:487)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:170)

at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:153)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

at org.apache.hadoop.hdfs.tools.GetConf.main(GetConf.java:332)

Caused by: org.xml.sax.SAXParseException; systemId:

file:/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop/core­site.xml; lineNumber: 24; columnNumber: 4;

The markup in the document following the root element must be well­formed.

at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)

at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2468)

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2539)

... 12 more

starting yarn daemons

starting resourcemanager, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/yarn-
mudassir495ece­resourcemanager­Mudassirs­MacBook­Pro.local.out

[Fatal Error] core­site.xml:24:4: The markup in the document following the root element must be well-
formed.

localhost: starting nodemanager, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/yarn-
mudassir495ece­nodemanager­Mudassirs­MacBook­Pro.local.out

localhost: [Fatal Error] core­site.xml:24:4: The markup in the document following the root element

must be well­formed.

5 Answer(s)


0

Hi Mudassir,

Are error is because of bad scripting in core-site.xml file. Please make sure the user has full access to the hadoop directories and core-site.xml is correct.

Thank you.

0

thanks guys for the feedback.

can you please send me the correct content that needs to go in core-site.xml, and if there is anything dynamic like my username that needs to change please point that out and I will change that, otherwise I'm hoping it will be pretty standard. I mean i just need something like a template I can just copy and paste and make this work. Sorry I'ma noob and appreciate your help

0

Hi,
Below are the core-site.xml code, just copy and paste.


hadoop.tmp.dir
/usr/local/Cellar/hadoop/hdfs/tmp
A base for other temporary directories.


fs.default.name
hdfs://localhost:9000


Please also check whether permission are granted to user.

0

Thanks guys. It helped a lot but not completely though. Its throwing the following error? Any suggestions please? Thanks in advance.

$ hstart
15/10/28 11:55:47 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: starting namenode, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/hadoop-mudassir495ece-namenode-Mudassirs-MacBook-Pro.local.out
localhost: datanode running as process 1918. Stop it first.
Starting secondary namenodes [0.0.0.0]
0.0.0.0: secondarynamenode running as process 2023. Stop it first.
15/10/28 11:55:53 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
resourcemanager running as process 2146. Stop it first.
localhost: nodemanager running as process 2245. Stop it first.

0

Hi Mudassir,
Everything looks fine. You have to stop services first using hstop command before restart them.