我正在尝试使用ruby-kafka
gem发送消息,但出现错误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")
有人知道我为什么收到这个错误吗?
答案 0 :(得分:0)
您可能正在使用Kafka 0.10。从版本0.7.x开始,不再支持Kafka 0.10,而替换为kafka 0.11中的新Record Batch格式。因此,请使用0.6.x分支,或升级您的kafka版本。如此处所述: