共计 2524 个字符,预计需要花费 7 分钟才能阅读完成。
Hadoop 新部署一个节点。部署完毕后,启动 datanode, 没起来, 错误如下:
STARTUP_MSG: Starting DataNode
STARTUP_MSG: host = node-128-99/192.168.1.99
STARTUP_MSG: args = []
STARTUP_MSG: version = 1.1.2
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.1 -r 1440782; compiled by ‘hortonfo’ on Thu Jan 31 02:06:43 UTC 2013
************************************************************/
2013-12-06 17:19:20,492 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2013-12-06 17:19:20,508 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
2013-12-06 17:19:20,509 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2013-12-06 17:19:20,509 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
2013-12-06 17:19:20,670 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2013-12-06 17:19:20,736 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Invalid directory in dfs.data.dir: can not create directory: /opt/dfs/data
2013-12-06 17:19:22,183 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: org.apache.hadoop.util.DiskChecker$DiskErrorException: Invalid value for volsFailed : 1 , Volumes tolerated : 0
at org.apache.hadoop.hdfs.server.datanode.FSDataset.<init>(FSDataset.java:974)
at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:403)
at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:309)
at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1651)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1590)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1608)
at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1734)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1751)
2013-12-06 17:19:22,184 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
发现是一个目录权限问题 。
mkdir /opt/dfs/
chown -R hdfs:hadoop /opt/dfs/
搞定 。
相关阅读:
Hadoop datanode 重新加载失败 无法启动解决步骤 http://www.linuxidc.com/Linux/2013-07/87953.htm
Hadoop 中的 datanode 起不起来 http://www.linuxidc.com/Linux/2013-05/83863.htm
Hadoop 中 datanode 与 NameNode 之间的心跳机制 http://www.linuxidc.com/Linux/2013-03/81014.htm
HJadoop 分布式环境部署之 namenode 或 datanode 启动失败 http://www.linuxidc.com/Linux/2012-12/75669.htm
Hadoop 1.0.0 的分布式配置(一个 namenode 两个个 datanode)http://www.linuxidc.com/Linux/2012-12/76535.htm
更多 Hadoop 相关信息见 Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13