我想用 ruby-kafka
宝石发送信息,但我得到的错误 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
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")
有人知道我为什么会犯这个错误吗?
1条答案
按热度按时间fzwojiic1#
你可能在用Kafka0.10。从版本0.7.x开始,Kafka0.10的支持被删除,以替换Kafka0.11中新的记录批处理格式。因此,请使用0.6.x分支,或升级您的Kafka版本。如下所述:
https://github.com/zendesk/ruby-kafka/issues/672