我在linux端部署了一个zookeeper和kafka服务,都是单个的服务,不是集群。然后我在网上找的producer例子,向topic放入数据是没有问题的,但是我执行Consumer的时候,总是报错。请大神帮忙。
10:47:19.493 [main] DEBUG org.apache.zookeeper.ClientCnxn - zookeeper.disableAutoWatchReset is false
10:47:19.526 [main-SendThread(vm-vmw674-t:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server vm-vmw674-t/10.6.50.53:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
10:47:19.531 [main-SendThread(vm-vmw674-t:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established to vm-vmw674-t/10.6.50.53:2181, initiating session
10:47:19.533 [main-SendThread(vm-vmw674-t:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Session establishment request sent on vm-vmw674-t/10.6.50.53:2181
10:47:19.534 [main-SendThread(vm-vmw674-t:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置
10:47:19.573 [main-SendThread(vm-vmw674-t:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server vm-vmw674-t/10.6.50.53:2181, sessionid = 0x14ca14ee6d70003, negotiated timeout = 6000
10:47:19.574 [main-SendThread(vm-vmw674-t:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: 无法定位登录配置
修改一下你hosts得映射
回复 @呼啦_小呆:这个怎么看啊。下面第三个答案是我的配置信息,因为太长了,给你发不了。你帮我看下吧,谢谢了回复 @初级屌丝:看一下你zoo.cfg的配置对不对是不是用得机器名我在Windows端中hosts中已经设置了啊。。。如下#Forexample:#localhostnameresolutionishandledwithinDNSitself.#127.0.0.1localhost#::1localhost10.6.50.53vm-vmw674-t这样设置不对吗我在Windows端中hosts中已经设置了啊。。。如下
#Forexample:
#
# 102.54.94.97 rhino.acme.com #sourceserver
# 38.25.63.10 x.acme.com #xclienthost
#localhostnameresolutionishandledwithinDNSitself.
#127.0.0.1 localhost
#::1 localhost
10.6.50.53vm-vmw674-t
这样设置不对吗
2018-02-2717:05:19DEBUG: Gotpingresponseforsessionid:0x161d64b0b380001after3ms
2018-02-2717:05:19DEBUG: Couldnotretrieveloginconfiguration:java.lang.SecurityException:无法定位登录配置;;
我也遇到了,
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。