Kudu遇到的坑,是真的坑~

您所在的位置:网站首页 java连接kudu Kudu遇到的坑,是真的坑~

Kudu遇到的坑,是真的坑~

2024-04-13 15:50| 来源: 网络整理| 查看: 265

在我使用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:\Windows\System32\drivers\etc

# 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]#


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3