1.系统环境
CentOS6.4 Hadoop0.20.2 伪分布式
2.问题描述
在执行MapReduce程序时,在控制台出现unable to create new native thread。查看datanode日志其错误信息如下:
ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: DatanodeRegistration(127.0.0.1:50010, storageID=DS-1204083579-127.0.0.1-50010-1395973569073, infoPort=50075, ipcPort=50020):DataXceiver java.io.EOFException: while trying to read 65557 bytes
3.解决方法
In certain recent Linux distributions (like RHEL v6.x/CentOS v6.x), the default value of nproc
is lower than the value required if you are deploying the HBase service. To change this value:
-
Using a text editor, open
/etc/security/limits.d/90-nproc.conf
and change thenproc
limit to approximately 32000. -
Restart the Hadoop.
修改前nproc的值
修改后nproc的值