datanode启动报UnknownHostException错误原因
2010-09-30 16:36:28,471 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:/************************************************************
STARTUP_MSG: Starting DataNode
STARTUP_MSG: host = java.net.UnknownHostException: MM_11_33_test: MM_11_33_test
STARTUP_MSG: args = []
STARTUP_MSG: version = 0.20.1
STARTUP_MSG: build = http://svn.apache.org/repos/asf/ ... /release-0.20.1-rc1 -r 810220; compiled by 'oom' on Tue Sep1 20:55:56 UTC 2009
************************************************************/
2010-09-30 16:36:28,626 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.net.
UnknownHostException
: MM_11_33_test: MM_11_33_test
at java.net.InetAddress.getLocalHost(Unknown Source)
at org.apache.hadoop.net.DNS.getDefaultHost(DNS.java:185)
at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:242)
at org.apache.hadoop.hdfs.server.datanode.DataNode.(DataNode.java:216)
at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1283)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1238)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1246)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1368)
2010-09-30 16:36:28,626 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at java.net.UnknownHostException: MM_11_33_test: MM_11_33_test
************************************************************/
这个的原因之一可能是没有在/etc/hosts中配置主机名MM_11_33_test,另外主名机中不能包含下划线,但可以有横线,修改主机名可以使用hostname命令。 2010-09-30 16:36:28,471 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:
/****** ...
eyjian 发表于 2010-9-30 16:59
http://www.hadoopor.com/images/common/back.gif
改下代码,让它支持下划线不就可以了么,呵呵 该如何改代码吗? 我使用java客户端去连接Hbase,也是报这个错误,但是shell下没有,请问是什么呢吗?
页:
[1]