• FT2000+ arm64服务器 kylin server 虚拟机 编译fuse_dfs 解决挂载目录中的故障


    服务器搭建

    FT2000+ arm64服务器 openEuler 部署hadoop单机伪集群并测试基准性能_hkNaruto的博客-CSDN博客

    编译fuse相关程序

    下载源码

    1. wget https://dlcdn.apache.org/hadoop/common/hadoop-3.3.1/hadoop-3.3.1-src.tar.gz
    2. tar -xvf hadoop-3.3.1-src.tar.gz

    安装工具、编译依赖

    c/c++

    yum install -y gcc gcc-c++ make cmake
    yum install -y openssl-devel  protobuf-devel  protobuf-c-devel cyrus-sasl-devel fuse fuse-devel fuse-libs

    java、maven

    yum install -y java-1.8.0-openjdk-devel
    1. # 下载
    2. wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
    3. # 手动安装
    4. tar -xvf apache-maven-3.8.6-bin.tar.gz -C /usr/local/
    5. # 配置环境变量
    6. echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0" >> /etc/profile
    7. echo "export PATH=\$PATH:/usr/local/apache-maven-3.8.6/bin" >> /etc/profile
    8. source /etc/profile

    配置maven aliyun仓库地址

     vi /usr/local/apache-maven-3.8.6/conf/settings.xml 

    在mirrors中间插入

    1. <mirror>
    2. <id>aliyunmaven</id>
    3. <mirrorOf>*</mirrorOf>
    4. <name>阿里云公共仓库</name>
    5. <url>https://maven.aliyun.com/repository/public</url>
    6. </mirror>

    编译本地库

    hadoop-hdfs-native-client (注意-DskipTests跳过了单元测试,其中部分测试会导致jvm崩溃,暂未解决)

    1. cd /root/hadoop-3.3.1-src/hadoop-hdfs-project/
    2. mvn clean package -T12 -Pnative -Dmaven.test.skip=true -DskipTests=true

    手动安装fuse_dfs以及配套脚本

    1. cd /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client
    2. cp src/main/native/fuse-dfs/fuse_dfs_wrapper.sh /usr/local/bin/
    3. cp target/main/native/fuse-dfs/fuse_dfs /usr/local/bin/
    4. cp -vP target/native/target/usr/local/lib/* /usr/local/lib/
    5. cp /usr/lib/jvm/java-1.8.0/jre/lib/aarch64/server/libjvm.so /usr/local/lib/

    配置ldconfig

    1. echo /usr/local/lib >> /etc/ld.so.conf
    2. ldconfig

    下载hadoop-3.3.1-aarch64

    1. cd ~
    2. wget https://dlcdn.apache.org/hadoop/common/hadoop-3.3.1/hadoop-3.3.1-aarch64.tar.gz
    3. tar -xvf hadoop-3.3.1-aarch64.tar.gz

    压力测试

    挂载

    1. mkdir /mnt/hdfs_mount
    2. export JAVA_HOME=/usr/lib/jvm/java-1.8.0
    3. export HADOOP_HOME=/root/hadoop-3.3.1
    4. export CLASSPATH=$(/root/hadoop-3.3.1/bin/hadoop classpath --glob)
    5. export OS_ARCH=aarch64
    6. fuse_dfs_wrapper.sh hdfs://10.2.1.137:9000 /mnt/hdfs_mount/ -d

     

    故障

    1. fuse_init.c:134 FATAL: dfs_init: fuseConnectInit failed with error -22!

    fuse_init.c:134 FATAL: dfs_init: fuseConnectInit failed with error -22!

    -d参数查看详细日志

    1. [root@10-2-1-171 hadoop-hdfs-project]# fuse_dfs_wrapper.sh dfs://10.2.1.137:9000 /mnt/hdfs_mount -d
    2. find: ‘/root/hadoop-3.3.1-src/hadoop-client’: 没有那个文件或目录
    3. INFO /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_options.c:164 Adding FUSE arg /mnt/hdfs_mount
    4. INFO /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_options.c:115 Ignoring option -d
    5. FUSE library version: 2.9.9
    6. nullpath_ok: 0
    7. nopath: 0
    8. utime_omit_ok: 0
    9. unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
    10. INIT: 7.27
    11. flags=0x003ffffb
    12. max_readahead=0x00200000
    13. INFO /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_init.c:98 Mounting with options: [ protected=(NULL), nn_uri=hdfs://10.2.1.137:9000, nn_port=0, debug=0, read_only=0, initchecks=0, no_permissions=0, usetrash=0, entry_timeout=60, attribute_timeout=60, rdbuffer_size=10485760, direct_io=0 ]
    14. could not find method getRootCauseMessage from class (null) with signature (Ljava/lang/Throwable;)Ljava/lang/String;
    15. could not find method getStackTrace from class (null) with signature (Ljava/lang/Throwable;)Ljava/lang/String;
    16. FileSystem: loadFileSystems failed error:
    17. (unable to get root cause for java.lang.NoClassDefFoundError)
    18. (unable to get stack trace for java.lang.NoClassDefFoundError)
    19. getJNIEnv: getGlobalJNIEnv failed
    20. Unable to determine the configured value for hadoop.fuse.timer.period.ERROR /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_init.c:134 FATAL: dfs_init: fuseConnectInit failed with error -22!
    21. ERROR /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_init.c:34 LD_LIBRARY_PATH=/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/target/usr/local/lib:/usr/lib/jvm/java-1.8.0/jre/lib/aarch64/server
    22. ERROR /root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_init.c:35 CLASSPATH=::/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-native-client/target/hadoop-hdfs-native-client-3.3.1.jar:/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-nfs/target/hadoop-hdfs-nfs-3.3.1.jar:/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-client/target/hadoop-hdfs-client-3.3.1.jar:/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-httpfs/target/hadoop-hdfs-httpfs-3.3.1.jar:/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-3.3.1.jar:/root/hadoop-3.3.1-src/hadoop-hdfs-project/hadoop-hdfs-rbf/target/hadoop-hdfs-rbf-3.3.1.jar

    解决:

    下载hadoop-3.3.1-aarch64,解压后配置

    export CLASSPATH=$(/root/hadoop-3.3.1/bin/hadoop classpath --glob)

    2. ls /mnt/hdfs_mount ls: 无法访问 '/mnt/hdfs_mount': 没有那个文件或目录 没有到主机的路由

    -d 启动时,终端日志输出

    目标机器9000端口状态

     修改目标机namenode配置

    vim etc/hadoop/hdfs-site.xml

    添加配置

    1. <property>
    2. <name>dfs.namenode.rpc-bind-host</name>
    3. <value>0.0.0.0</value>
    4. </property>

    重启

     

    暂时关闭防火墙

    systemctl stop firewalld

    成功

  • 相关阅读:
    小程序添加分享和禁用分享功能
    MyBatis之动态SQL&&分页
    力扣每日一题-第27天-561.数组拆分Ⅰ
    mysql a表like b表的某个字段,mysql一个表的字段like另外一个表的字段
    CentOS 7 安装 Redis 7
    Java-访问控制
    前端js传入Long类型精度丢失解决办法
    Go-Excelize API源码阅读(八)——GroupSheets(sheets []string)、UngroupSheets()
    第 n 小的质数 与 7 无关的数 计算多项式的值 三道水题(深学思维)
    EMC实验中RE理论干扰源的详细分析
  • 原文地址:https://blog.csdn.net/hknaruto/article/details/127957732