Hadoop2.6.0错误

错误1:

WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/ha1/input/hadoop/yarn-env.sh._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.

//删除dfs/data/目录所有文件,关闭所有服务重新执行bin/hdfs namenode -format

错误2:

org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot delete /user/root/grep-temp-23493900. Name node is in safe mode.
The reported blocks 188 has reached the threshold 0.9990 of total blocks 188. The number of live datanodes 2 has reached the minimum number 0. In safe mode extension. Safe mode will be turned off automatically in 10 seconds.
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkNameNodeSafeMode(FSNamesystem.java:1364)

操作太快,未退出安全模式,等退出安全模式

错误3:

Could not find any valid local directory for nmPrivate/container

原因是hadoop.tmp.dir目录没有空间了。更换目录或者腾出空间,重启hadoop。

错误4:
mysql错误:can’t read ‘.’
hive显示:DEBUG metastore.HiveMetaStore: admin role already exists InvalidObjectExcept
修改/usr/local/var/mysql的权限

hadoop job -kill job_1447903602796_0001

错误5:
外在表现:
三个机器的集群(虚拟机),分别是master、slave1、slave2,但是在50070中,总显示少一个节点,刷新页面有时是master和slave2,有时是master和slave1。重启在50070中没有起来的节点,可以成功,但先前起来的节点就会停止工作。
log错误:
2015-12-31 09:56:48,003 FATAL org.apache.hadoop.hdfs.StateChange: BLOCK* NameSystem.getDatanode: Data node DatanodeRegistration(192.168.2.165, datanodeUuid=ef44ba45-c5dc-4217-a5c2-88dd01bb6859, infoPort=50075, ipcPort=50020, storageInfo=lv=-56;cid=CID-77e18846-76e4-4bba-b649-4a5d361cc212;nsid=1441170570;c=0) is attempting to report storage ID ef44ba45-c5dc-4217-a5c2-88dd01bb6859. Node 192.168.2.248:50010 is expected to serve this storage.

原因:
两个节点中dfs.data.dir目录下数据是一样的(指hdfs中的元信息和数据都一样),因为这个这两个节点是直接通过克隆虚拟机得到的。清空目录下东西即可。

原文地址:https://www.cnblogs.com/ggzone/p/10121229.html