0
我無法啓動namenode。 hadoop版本是hadoop-1.2.1。我已經格式化了名稱節點,清除了/ app/hadoop/tmp中的tmp目錄。下文提到的是在覈心site.xml中配置hadoop單節點:[致命錯誤] core-site.xml:11:17:尾部分內容不允許
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>>
HDFS-site.xml中
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
mapred-site.xml中
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>
這是錯誤越來越顯示
[email protected]:~$ hadoop namenode
16/04/22 19:03:35 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = priyank-Ideapad-Z570/127.0.1.1
STARTUP_MSG: args = []
STARTUP_MSG: version = 1.2.1
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152; compiled by 'mattf' on Mon Jul 22 15:23:09 PDT 2013
STARTUP_MSG: java = 1.7.0_95
************************************************************/
[Fatal Error] core-site.xml:11:17: Content is not allowed in trailing section.
16/04/22 19:03:35 FATAL conf.Configuration: error parsing conf file: org.xml.sax.SAXParseException; systemId: file:/home/priyank/Desktop/Softwares/Hadoop/hadoop-1.2.1/conf/core-site.xml; lineNumber: 11; columnNumber: 17; Content is not allowed in trailing section.
16/04/22 19:03:35 ERROR namenode.NameNode: java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/home/priyank/Desktop/Softwares/Hadoop/hadoop-1.2.1/conf/core-site.xml; lineNumber: 11; columnNumber: 17; Content is not allowed in trailing section.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1249)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1107)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1053)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:420)
at org.apache.hadoop.hdfs.server.namenode.NameNode.setStartupOption(NameNode.java:1374)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1463)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1488)
Caused by: org.xml.sax.SAXParseException; systemId: file:/home/priyank/Desktop/Softwares/Hadoop/hadoop-1.2.1/conf/core-site.xml; lineNumber: 11; columnNumber: 17; Content is not allowed in trailing section.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:338)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:177)