新搭建的4节点HADOOP集群,启动DATANODE失败,但是NAMENODE可以正常启动。
查询了一下DATANODE启动日志发现时由于权限位导致的。
[grid@sxzyxntest02 logs]$ view hadoop-grid-datanode-sxzyxntest02.log
2013-04-09 18:46:52,032 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting DataNode
STARTUP_MSG: host = sxzyxntest02/10.192.37.44
STARTUP_MSG: args = []
STARTUP_MSG: version = 1.0.4
STARTUP_MSG: build = -r 1393290; compiled by 'hortonfo' on Wed Oct 3 05:13:58 UTC 2012
************************************************************/
2013-04-09 18:46:52,291 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2013-04-09 18:46:52,309 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
2013-04-09 18:46:52,310 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2013-04-09 18:46:52,310 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
2013-04-09 18:46:52,412 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2013-04-09 18:46:52,476 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Invalid directory in dfs.data.dir: Incorrect permission for /cpic/grid/hadoop/data, expected: rwxr-xr-x, while actual: rwxrwxr-x
2013-04-09 18:46:52,476 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: All directories in dfs.data.dir are invalid.
2013-04-09 18:46:52,476 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Exiting Datanode
2013-04-09 18:46:52,477 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at sxzyxntest02/10.192.37.44
************************************************************/
[grid@sxzyxntest02 ~]$ ls -ld /cpic/grid/hadoop/data
drwxrwxr-x 2 grid grid 4096 Apr 9 17:37 /cpic/grid/hadoop/data
[grid@sxzyxntest02 ~]$ chmod 755 /cpic/grid/hadoop/data
[grid@sxzyxntest03 ~]$ ls -ld /cpic/grid/hadoop/data
drwxrwxr-x 2 grid grid 4096 Apr 9 17:37 /cpic/grid/hadoop/data
[grid@sxzyxntest03 ~]$ chmod 755 /cpic/grid/hadoop/data
[grid@sxzyxntest04 ~]$ ls -ld /cpic/grid/hadoop/data
drwxrwxr-x 2 grid grid 4096 Apr 9 17:37 /cpic/grid/hadoop/data
[grid@sxzyxntest04 ~]$ chmod 755 /cpic/grid/hadoop/data
重启HADOOP集群,问题搞定。
不过这个目录是HADOOP自动生成的,并没有事先创建好,很奇怪为何自动生成不顺便把权限位改了。
阅读(7207) | 评论(0) | 转发(1) |