2
獲取致命錯誤,同時運行斌/ Hadoop的NameNode的-format獲取致命錯誤,同時運行斌/ Hadoop的NameNode的-format
使用Windows 7操作系統,在C:\ Cygwin的的\ usr \本地\ Hadoop的0.20.203.0 \ CONF編輯hadoop-env.sh文件,
#export JAVA_HOME=C:/Program Files/Java/jdk1.6.0_24
export JAVA_HOME=C:/jdk1.6.0_24.
我有我的Java類路徑設置爲C:/jdk1.6.0_24
。
致命錯誤hdfs-site.xml:5:2: 之後的文檔中的標記必須是格式良好的根元素。
enter code here
$ bin/hadoop namenode -format
12/02/24 07:15:38 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = -PC/10.0.0.11
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 0.20.203.0
STARTUP_MSG: build = http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203 -r 1099333; compiled by 'oom' on Wed May 4 07:57:50 PDT 2011
************************************************************/
12/02/24 07:15:38 FATAL conf.Configuration: bad conf file: top-level element not <configuration>
12/02/24 07:15:38 WARN conf.Configuration: bad conf file: element not <property>
12/02/24 07:15:38 WARN conf.Configuration: bad conf file: element not <property>
[Fatal Error] hdfs-site.xml:5:2: The markup in the document following the root element must be well-formed.
12/02/24 07:15:38 FATAL conf.Configuration: error parsing conf file: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
12/02/24 07:15:38 ERROR namenode.NameNode: java.lang.RuntimeException: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1237)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1093)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1037)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:438)
at org.apache.hadoop.hdfs.server.namenode.NameNode.setStartupOption(NameNode.java:1124)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1141)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1162)
Caused by: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:1142)
... 6 more
12/02/24 07:15:38 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at asoni-PC/10.0.0.11
************************************************************/
我在下面的教程。http://alans.se/blog/2010/hadoop-hbase-cygwin-windows-7-x64/#hadoop。我把hdfs-site.xml中的 configuration>標記包圍起來,它現在就起作用了。 –
Andy
2012-02-24 16:21:05
嗯,你需要那個。 – 2012-02-24 16:22:34
之前 ------------------ dfs.replication dfs.permissions 假 ------------------ 個dfs.replication dfs.permissions 假 配置> –
Andy
2012-02-24 16:25:43