centos7部署hadoop3.3.4 启动datanode报错
2024-08-08 10:51:39,550 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
java.lang.RuntimeException: Although a UNIX domain socket path is configured as /var/run/hadoop-hdfs/dn._PORT, we cannot start a localDataXceiverServer because libhadoop cannot be loaded.
at org.apache.hadoop.hdfs.server.datanode.DataNode.getDomainPeerServer(DataNode.java:1202)
at org.apache.hadoop.hdfs.server.datanode.DataNode.initDataXceiver(DataNode.java:1171)
at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:1411)
at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:507)
at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:2828)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:2734)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:2778)
at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:2922)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2946)
2024-08-08 10:51:39,553 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1: java.lang.RuntimeException: Although a UNIX domain socket path is configured as /var/run/hadoop-hdfs/dn._PORT, we cannot start a localDataXceiverServer because libhadoop cannot be loaded.
排查:,
1,查看libhadoop是否有
查看hadoop的home目录下的lib下有native
2,查看hadoop识别的glibc版本
设置debug模式
export HADOOP_ROOT_LOGGER=DEBUG,console
hadoop checknative -a
缺少GLIBC_2.34
下载路径
http://ftp.gnu.org/gnu/glibc/
例如
yum install gcc-c++
tar -zxvf glibc-2.34.tar.gz
cd glibc-2.34
mkdir build
cd build
../configure --prefix=/usr/local/glibc-2.34 --with-headers=/usr/include
make j4
make install
3,执行过程中报错是依赖python3不是python2,centos7默认是python2.7
下载python3 直接在华为镜像下载
https://mirrors.huaweicloud.com/python/3.11.2/
安装修改python的环境
https://blog.csdn.net/Misaka_S/article/details/89509859
安装中报错
These critical programs are missing or too old: make compiler
*** Check the INSTALL file for required versions. 这里需要升级make和gcc版本到最新
具体操作参考: 参考:https://blog.csdn.net/qq_42761569/article/details/130140876