gpt4 book ai didi

go - 身份验证失败 zk session 超时问题

转载 作者:数据小太阳 更新时间:2023-10-29 03:27:13 26 4
gpt4 key购买 nike

我正在使用 samuel 的 go-zookeeper 并且遇到了“身份验证失败:zk:服务器已过期 session ” 问题。一旦遇到此问题,它会重试重新连接到 zookeeper 并成功连接。但问题是它再次出现“身份验证失败”问题或无法注册消费者。此外,如果它确实成功连接并通过身份验证,则消费者永远不会将消息作为“当前注册的消费者:0”使用,并且除非我手动重新启动客户端,否则此过程将继续。

可能是什么问题及其解决方案??

这是日志:

[Scheduler] 2016/05/15 04:49:20 structs.go:21: Recv loop terminated: err=read tcp 10.244.0.9:41810->10.0.30.4:2181: i/o timeout
[Scheduler] 2016/05/15 04:49:24 structs.go:21: Send loop terminated: err=<nil>
[Scheduler] 2016/05/15 04:49:26 structs.go:21: Connected to 10.0.30.4:2181
[Scheduler] 2016/05/15 04:49:53 structs.go:21: Authentication failed: read tcp 10.244.0.9:43854->10.0.30.4:2181: i/o timeout
[Scheduler] 2016/05/15 04:49:57 structs.go:21: Connected to 10.0.30.4:2181
[Scheduler] 2016/05/15 04:50:25 structs.go:21: Authentication failed: read tcp 10.244.0.9:43863->10.0.30.4:2181: i/o timeout
[Scheduler] 2016/05/15 04:50:32 structs.go:21: Connected to 10.0.30.4:2181
[Scheduler] 2016/05/15 04:51:06 structs.go:21: Authentication failed: read tcp 10.244.0.9:43873->10.0.30.4:2181: i/o timeout
[Scheduler] 2016/05/15 04:51:55 structs.go:21: Connected to 10.0.30.4:2181
[Scheduler] 2016/05/15 04:52:08 structs.go:21: Authentication failed: zk: session has been expired by the server
[Sarama] 2016/05/15 04:52:08 [controller/fa956f688354] Triggering rebalance due to consumer list change
[Scheduler] 2016/05/15 04:52:10 structs.go:21: Connected to 10.0.30.4:2181
[Scheduler] 2016/05/15 04:52:10 structs.go:21: Authenticated: id=95829041879007139, timeout=4000
[Sarama] 2016/05/15 04:52:10 [controller/fa956f688354] Currently registered consumers: 0
[Sarama] 2016/05/15 04:52:10 [controller/fa956f688354] topic :: Started topic consumer
[Sarama] 2016/05/15 04:52:10 [controller/fa956f688354] topic :: Stopped topic consumer
[Sarama] 2016/05/15 04:53:22 client/metadata fetching metadata for all topics from broker 10.0.30.4:9092
[Sarama] 2016/05/15 05:03:23 client/metadata fetching metadata for all topics from broker 10.0.30.4:9092
.
.
.
[Sarama] 2016/05/15 04:53:22 client/metadata fetching metadata for all topics from broker 10.0.30.4:9092

最佳答案

我没有使用过 samuel 的 go-zookeeper。但是,您正在尝试连接到 kafka 服务器并与之建立连接。为此,我使用了 samara 易于使用且可靠。

Here一些例子。

关于go - 身份验证失败 zk session 超时问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37251905/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com