我是靠谱客的博主 痴情翅膀,这篇文章主要介绍start-dfs.sh [Fatal Error] core-site.xml:2:6: The processing instruction target matching问题原因解决办法总结,现在分享给大家,希望可以做个参考。
文章目录
- 问题
- 原因
- 解决办法
- 总结
问题
配置完hadoop各种文件,包括core-site.xml等后,准备启动hadoop:start-dfs.sh,提示错误,如下:
[Fatal Error] core-site.xml:2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
19/03/12 10:38:00 FATAL conf.Configuration: error parsing conf core-site.xml
org.xml.sax.SAXParseException; systemId: file:/usr/local/hadoop/etc/hadoop/core-site.xml; lineNumber: 2; columnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not allowed.
原因
提示的意思是core-site.xml的第2行第六列出错,但感觉我没改动第2行啥啊。
回去看下,我在编辑的时候,在这个文件的第一行不小心增加了一个空行,难道是这个错误?
解决办法
重新编辑core-site.xml,去掉第一行空行。再运行start-dfs.sh,成功。
总结
不要轻易改变hadoop配置文件的一个空行,甚至一个空格。
之前在设置PATH变量的时候,就是因为 = 号前后多了一个空格,然后就导致提示错误。
hadoop对空行和空格的容忍度真心低。
最后
以上就是痴情翅膀最近收集整理的关于start-dfs.sh [Fatal Error] core-site.xml:2:6: The processing instruction target matching问题原因解决办法总结的全部内容,更多相关start-dfs.sh内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复