本文主要是介绍Hadoop分布式时远程Datanode无法启动的解决,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
blog迁移至 :http://www.micmiu.com[color=blue][size=medium]问题的基本现象:[/size][/color]
在测试Hadoop的分布式环境搭建时,在namenode启动时信息如下:
[quote][michael@shnap hadoop]$ [color=blue]bin/start-all.sh [/color]
starting namenode, logging to /home/michael/hadoop/bin/../logs/hadoop-michael-namenode-shnap.out
192.168.8.148: starting datanode, logging to /home/michael/hadoop/bin/../logs/hadoop-michael-datanode-michael-VirtualBox.out
192.168.8.150: starting secondarynamenode, logging to /home/michael/hadoop/bin/../logs/hadoop-michael-secondarynamenode-shnap.out
starting jobtracker, logging to /home/michael/hadoop/bin/../logs/hadoop-michael-jobtracker-shnap.out
192.168.8.148: starting tasktracker, logging to /home/michael/hadoop/bin/../logs/hadoop-michael-tasktracker-michael-VirtualBox.out
[michael@shnap hadoop]$ [color=blue]jps[/color]
[color=red]30045 JobTracker
29973 SecondaryNameNode
29813 NameNode
30136 Jps[/color][/quote]
从上述信息可见namenode中的进程信息正常
在datanode查看的信息如下:
[quote]michael@michael-VirtualBox:~/hadoop$ jps
[color=red]15934 TaskTracker
15978 Jps[/color][/quote]
[color=red]从上述信息可见datanode中的进程就不正常了,明显少了DataNode[/color]
[size=medium][color=blue]解决办法如下:[/color][/size]
[color=red]先检查conf/masters 和conf/slaves文件,确保配置没错。
然后把所有节点的hadoop.tmp.dir指定的文件夹下的内容全部删掉[/color]
重新在master设备上执行启动程序:
$ bin/hadoop namenode -format
$ bin/start-all.sh
再在datanode查看的信息就正常了如下:
[quote]
michael@michael-VirtualBox:~/hadoop$ jps
16467 Jps
[color=red]16289 DataNode[/color]
16429 TaskTracker
[/quote]
转载请注明来自:Michael's blog @ [url=http://sjsky.iteye.com]http://sjsky.iteye.com[/url]
----------------------------- 分 ------------------------------ 隔 ------------------------------ 线 ------------------------------
这篇关于Hadoop分布式时远程Datanode无法启动的解决的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!