Docker以及Kubernetes的EventHub连接问题
我有一个使用C#的Confluent Kafka库的代码。
我能够正确从本地系统连接到Azure事件中心。
但是,当我将其放在容器中时。我会收到以下错误。
3|1656401522.469|ERROR|rdkafka#consumer-1| [thrd:app]: rdkafka#consumer-1: sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap: Disconnected (after 148ms in state UP)
%6|1656401522.626|FAIL|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap: Disconnected (after 124ms in state UP, 1 identical error(s) suppressed)
%3|1656399913.942|ERROR|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: 1/1 brokers are down
%3|1656399922.791|ERROR|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: 1/1 brokers are down
fail: Microsoft.Extensions.Hosting.Internal.Host[9]
BackgroundService failed
Confluent.Kafka.ConsumeException: Broker: Topic authorization failed
这里有什么建议吗?有人吗?
新错误
Disconnected while requesting ApiVersion: might be caused by incorrect security.protocol configuration (connecting to a SSL listener?) or broker version is < 0.10 (see api.version.request) (after 0ms in state APIVERSION_QUERY, 4 identical error(s) suppressed)
我的配置
EnableAutoOffsetStore = false,
BootstrapServers = _configuration["KAFKA_SERVER"],
GroupId = consumerGroup,
AutoOffsetReset = AutoOffsetReset.Earliest,
SecurityProtocol = SecurityProtocol.SaslSsl,
SaslMechanism = SaslMechanism.Plain,
SaslUsername = "$ConnectionString",
SaslPassword = _configuration["EVENTHUB_CONNSTR"],
SslCaLocation = _configuration["EVENTHUB_CA_CERT_LOCATION"]
I have a code, which uses the Confluent Kafka library, written in C#.
I Am able to connect to the Azure event hub from my local system properly.
However, when I put the same in the container. I get the following error.
3|1656401522.469|ERROR|rdkafka#consumer-1| [thrd:app]: rdkafka#consumer-1: sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap: Disconnected (after 148ms in state UP)
%6|1656401522.626|FAIL|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap: Disconnected (after 124ms in state UP, 1 identical error(s) suppressed)
%3|1656399913.942|ERROR|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: 1/1 brokers are down
%3|1656399922.791|ERROR|rdkafka#consumer-1| [thrd:sasl_ssl://xyz.servicebus.windows.net:9093/bootstrap]: 1/1 brokers are down
fail: Microsoft.Extensions.Hosting.Internal.Host[9]
BackgroundService failed
Confluent.Kafka.ConsumeException: Broker: Topic authorization failed
Any suggestions here ? Anyone ?
New Error
Disconnected while requesting ApiVersion: might be caused by incorrect security.protocol configuration (connecting to a SSL listener?) or broker version is < 0.10 (see api.version.request) (after 0ms in state APIVERSION_QUERY, 4 identical error(s) suppressed)
Any my configuration
EnableAutoOffsetStore = false,
BootstrapServers = _configuration["KAFKA_SERVER"],
GroupId = consumerGroup,
AutoOffsetReset = AutoOffsetReset.Earliest,
SecurityProtocol = SecurityProtocol.SaslSsl,
SaslMechanism = SaslMechanism.Plain,
SaslUsername = "$ConnectionString",
SaslPassword = _configuration["EVENTHUB_CONNSTR"],
SslCaLocation = _configuration["EVENTHUB_CA_CERT_LOCATION"]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论