AWS Ec2实例上的Kafka 0.9,向主题发送消息时出错...批处理已过期

时间:2016-08-11 16:59:41

标签: apache-kafka confluent

我从控制台生产者向Ec2实例上的kafka 0.9代理发送一条简单的hello消息,发送到VPC中的内部ip地址。

我得到的错误是Batch Expired(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

谢谢!

0 个答案:

没有答案