我正在从控制台生产者向ec2示例上的kafka0.9代理发送一个简单的hello消息到vpc中的内部ip地址。
我得到的错误是批处理过期(org.apache.kafka.clients.producer.internals.errorloggingcallback)
./bin/kafka-console-producer --broker-list kafka1.acme.local:9092 -topic misc-verify
hello from laptop
[2016-08-11 09:57:39,126] ERROR Error when sending message to topic misc-verify with key: null, value: 17 bytes with error: Batch Expired (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
两台机器都在专用网络上。服务器可以通过ping、ssh等访问。
我在生产机器上安装了相同版本的confluent(confluent-2.0.1)
代理服务器kafka1.acme.local上的控制台生成器正常工作,消息按预期接收。只有来自其他机器的生产商因批次过期错误而失败。
代理服务器kafka1.acme.local上的主题日志从未接收到该消息
我安装了kafkacat,它看起来是这样的(代理主机为0.0.0.0)
> kafkacat -L -b kafka1.acme.local:9092
Metadata for all topics (from broker -1: kafka1.acme.local:9092/bootstrap):
1 brokers:
broker 0 at 0.0.0.0:9092
1 topics:
topic "misc-verify" with 1 partitions:
partition 0, leader 0, replicas: 0, isrs: 0
%3|1470930115.688|FAIL|rdkafka#producer-0| 0.0.0.0:9092/0: Failed to connect to broker at 0.0.0.0:9092: Undefined error: 0
%3|1470930115.688|ERROR|rdkafka#producer-0| 0.0.0.0:9092/0: Failed to connect to broker at 0.0.0.0:9092: Undefined error: 0
kafka1.acme.local(非生产服务器)上kafka server.properties文件中的设置
broker.id=0
listeners=PLAINTEXT://0.0.0.0:9092
port=9092
host.name=10.10.1.74
# advertised.host.name=<hostname routable by clients>
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/tmp/kafka-logs
num.partitions=1
num.recovery.threads.per.data.dir=1
# log.flush.interval.messages=10000
# log.flush.interval.ms=1000
log.retention.hours=168
# log.retention.bytes=1073741824
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
zookeeper.connect=kafka1.acme.local:2181
zookeeper.connection.timeout.ms=6000
confluent.support.metrics.enable=true
confluent.support.customer.id=anonymous
谢谢!
暂无答案!
目前还没有任何答案,快来回答吧!