小编joh*_*ons的帖子

无法连接到任何种子代理

我正在尝试使用ruby-kafkagem 发送消息,但出现错误Could not connect to any of the seed brokers

kafka::ConnectionError: Could not connect to any of the seed brokers:
- kafka:broker1: Connection error EOFError: EOFError
- kafka:broker2: Connection error EOFError: EOFError
- kafka:broker3: Connection error EOFError: EOFError
- kafka:broker4: Connection error EOFError: EOFError
Run Code Online (Sandbox Code Playgroud)

https://github.com/zendesk/ruby-kafka

我创建了krb5.keytab用于身份验证的文件。

kafka = Kafka.new(["broker1",
                   "broker2",
                   "broker3",
                   "broker4"
                      ],
    sasl_gssapi_keytab: '/etc/krb5.keytab')
    kafka.deliver_message("Hello, World!", topic: "TestTopic")
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么我会收到这个错误?

apache-kafka ruby-kafka

5
推荐指数
1
解决办法
3211
查看次数

标签 统计

apache-kafka ×1

ruby-kafka ×1