Hadoop的datanode新建异常处理

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重新加载失败 无法启动解决步骤

Hadoop中的datanode起不起来

Hadoop中datanode与NameNode之间的心跳机制

HJadoop分布式环境部署之namenode或datanode启动失败

Hadoop 1.0.0的分布式配置(一个namenode 两个个datanode)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/7a4df808be115bdc93efa33a3c904dbe.html