关于zoonkeep链接服务端报错Will not attempt to authenticate using SASL (unknown error的问题...

今天一直报Zookeeper报错Will not attempt to authenticate using SASL 这个错误,后来网上查找了很多,终于发现是客户端的zookeeper的jar包和zookerper的服务端的版本不一致造成的。

原文如下:


先需要说的是,这个问题出现的原因很多,报的错误与实际可能相差比较远。总结如下:
一、调用端和服务器端版本不统一造成的!
二、这个问题的出现,会伴随一个非常奇怪的现象。在master所在的pc上启动start-all时,内容提示所有的regionserver已经全部启动。但是,如果你去查看masterIP:60010时 会发现其他的regionserver并没有启动,regionserver的数量只有一台。因为已经有一台regionserver是活着的,所以 hbase还是能继续使用的,这会迷惑你。查看别的机器的日志后,你就会发现上述错误。zookeeper的定位居然定位到127.0.0.1去了,这个 不科学。最后,查阅资料才发现hbase.zookeeper.quorum这个属性设置时,默认本机即为zookeeper服务器(单机使用)。这就很 简单了,只需要增加这个属性就可以了。

  <property>
<name>hbase.zookeeper.quorum</name>
<value>10.82.58.213</value>
</property>


同时,也发现如果/etc/hosts设置错误也会发生类似问题。/etc/hosts中,localhost和本机PC名都需要为127.0.0.1,因为本机PC名默认是127.0.1.1。

三、hbase的参数设置问题 hbase-site.xml
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/hadoop/zookeeper</value>
<description>Property from ZooKeeper's config zoo.cfg.
The directory where the snapshot is stored.
</description>
</property>
这个错误消息"Opening socket connection to server :2181. Will not attempt to authenticate using SASL (unknown error)"通常与ZooKeeper连接时身份认证相关的问题有关。根据提供的引用内容,可以看出用户在连接ZooKeeper服务时遇到了这个错误。 该错误消息中的"Will not attempt to authenticate using SASL (unknown error)"表明身份验证过程出现了未知错误。可能的原因之一是在连接ZooKeeper时配置的身份验证机制不正确或存在问题。这可能导致ZooKeeper无法通过SASL进行身份认证。 另外,从引用中可以看出,用户在尝试连接ZooKeeper时使用了默认的主机IP和端口号(localhost:2181)。这可能是导致连接失败的另一个原因。请确保您正在尝试连接的ZooKeeper服务的主机IP和端口号是正确的。 为解决这个问题,您可以采取以下步骤: 1. 确保您正在连接的ZooKeeper服务的主机IP和端口号是正确的。您可以检查ZooKeeper服务的配置文件(如zoo.cfg)以获取正确的主机IP和端口号。 2. 检查身份验证机制的配置。确保在连接ZooKeeper时使用的身份验证机制是正确的,并且相应的配置也正确。您可以参考ZooKeeper的文档和配置文件来了解正确的身份验证配置。 3. 如果问题仍然存在,您可以尝试重新启动ZooKeeper服务并检查日志文件以获取更多详细信息。日志文件通常位于ZooKeeper安装目录的logs目录下。 总结:当连接ZooKeeper服务时遇到"Opening socket connection to server :2181. Will not attempt to authenticate using SASL (unknown error)"错误消息时,可能是由于身份验证机制的配置问题或连接信息(主机IP和端口号)不正确导致的。您可以通过检查配置文件和重新启动服务来解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Kafka 使用](https://download.csdn.net/download/weixin_38735987/14038995)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [zkCli localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)](https://blog.csdn.net/lantianlu3/article/details/126302174)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值