zoukankan      html  css  js  c++  java
  • Kudu遇到的坑,是真的坑~

    在我使用spark对接kudu的过程中,出现如下错误:

    坑1: Caused by: org.apache.kudu.client.NoLeaderFoundException

    Caused by: org.apache.kudu.client.NoLeaderFoundException: Master config (192.168.1.117:7051) has no leader.
    Exceptions received: org.apache.kudu.client.RecoverableException:
    [peer master-192.168.1.117:7051(192.168.1.117:7051)] encountered a read timeout; closing the channel

    重点分析:

    Master config (192.168.1.117:7051) has no leader : 客户端找不到master的leader
    encountered a read timeout : 遭遇读取超时

    因为kudu客户端连接kudu服务器时,服务器返回master的主机名

    要想知道master返回的主机名是什么,可以直接到web-ui上去查看。
    注意是master的web-ui,即8051端口页面:
    在这里插入图片描述

    查看自己master 返回的leader:
    http://192.168.1.117:8051/masters

    rpc_addresses { host: "spark003" port: 7051 } 
    http_addresses { host: "spark003" port: 8051 } 
    software_version: "kudu 1.7.0-cdh5.15.0 (rev 7dd4889729bb5ee0b331a5a6c3cd4427dbf79308)" 
    https_enabled: false
    

    这个rpc_addresses 的 spark003 会返回给你的客户端,这个时候你的客户端就得能够解析才行

    问题就是出在这儿。我本地的hosts 文件并没有这个解析

    我是windows ,hosts文件位置在:

    C:WindowsSystem32driversetc

    # add a record
    192.168.1.117 spark003
    

    最后,问题,完美解决~~

    坑2: Caused by: java.lang.IllegalArgumentException: cannot import authentication data from a different user: old=’’, new=‘liuge’

    在这里插入图片描述

    最终解决:

    [root@spark001 conf]# vim master.gflagfile
    -rpc_encryption=disabled
    -rpc_authentication=disabled
    -trusted_subnets=0.0.0.0/0
    
    # 重启master server
    [root@spark001 conf]# /etc/init.d/kudu-master restart
    Stopped Kudu Master Server:                                [  OK  ]
    Started Kudu Master Server (kudu-master):                  [  OK  ]
    [root@spark001 conf]# 
    
    

    坑3:Exception in thread “main” org.apache.kudu.client.NonRecoverableException: can not complete before timeout: KuduRpc

    我一开始对于这个错误,还真的是很纳闷。各种搜索解决,都无果,
    后来,我尝试把tserver.gflagfile 也添加如上配置就可以了

    [root@spark001 conf]# vim tserver.gflagfile
    -rpc_encryption=disabled
    -rpc_authentication=disabled
    -trusted_subnets=0.0.0.0/0
    
    # 重启master server
    [root@spark001 conf]# /etc/init.d/kudu-master restart
    Stopped Kudu Master Server:                                [  OK  ]
    Started Kudu Master Server (kudu-master):                  [  OK  ]
    [root@spark001 conf]# 
    
    
  • 相关阅读:
    shell编程基础(六): 透彻解析查找命令find
    shell编程基础(五): 正则表达式及其使用
    shell编程基础(三): 位置参数与shell脚本的输入输出
    shell编程基础(二): shell脚本语法之分支语句和循环语句
    shell编程基础(一): 基本变量和基本符号
    SpringCloud学习(一):微服务简介
    ubuntu 安装bazel
    numpy reshape resize用法
    L0、L1及L2范数
    linux常用的搜索命令
  • 原文地址:https://www.cnblogs.com/liuge36/p/12614716.html
Copyright © 2011-2022 走看看