Batch containing 11 record(s) expired due to timeout while requesting metadata

简介: 背景: Kafka集群在一个192.168.0.x网段的,而我们的生产者在192.168.17.x网段的一台机器上,故当生产者发送消息给Kafka时, 无法将消息发送过去。
背景:
Kafka集群在一个192.168.0.x网段的,而我们的生产者在192.168.17.x网段的一台机器上,故当生产者发送消息给Kafka时,
无法将消息发送过去。

错误:
11:21:13,936 ERROR KafkaProducer - Batch containing 11 record(s) expired due to timeout while requesting metadata from brokers for onlinelogs-1

分析:
1.做Kafka集群的demo测试是OK的,详情参考:
http://blog.itpub.net/30089851/viewspace-2132049/

2.在生产者机器上 telnet kafka节点ip 9092 ,也是通的,甚是奇怪。

3.谷歌了几下:
需要配置 advertised.host.name 参数,将Kafka各个节点,该参数配置为当前机器的IP即可,重启生效配置,测试OK。

目录
相关文章
|
9月前
|
消息中间件 中间件 Kafka
Kafka - TimeoutException: Expiring 1 record(s) for art-0:120001 ms has passed since batch creation
Kafka - TimeoutException: Expiring 1 record(s) for art-0:120001 ms has passed since batch creation
1063 0
|
数据安全/隐私保护
Do Sync Disk 0 Part 0 Failed, code=S3_F42, msg=Sync Failed after retry 5 times
Do Sync Disk 0 Part 0 Failed, code=S3_F42, msg=Sync Failed after retry 5 times
204 1
|
存储 Java
A timeout exceeded while waiting to proceed with the request, please reduce your request rate【已解决】
A timeout exceeded while waiting to proceed with the request, please reduce your request rate【已解决】
756 0
|
Java Spring
Spring上传文件报错the request was rejected because its size (15920203) exceeds the configured maximum (104...
Spring上传文件报错the request was rejected because its size (15920203) exceeds the configured maximum (104...
1263 0
|
索引
ES报错:“type“=>“cluster_block_exception“, “reason“=>“blocked by: [FORBIDDEN/12/index read-only / allow
ES报错:“type“=>“cluster_block_exception“, “reason“=>“blocked by: [FORBIDDEN/12/index read-only / allow
421 0
ES报错:“type“=>“cluster_block_exception“, “reason“=>“blocked by: [FORBIDDEN/12/index read-only / allow
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
345 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
|
缓存
AS项目一直Indexing paused due to batch updated
AS项目一直Indexing paused due to batch updated
152 0
|
关系型数据库 MySQL 数据安全/隐私保护
Could not obtain connection to query metadata : Public Key Retrieval is not allowed
Could not obtain connection to query metadata : Public Key Retrieval is not allowed
593 0
|
关系型数据库 MySQL Java
Connection is read-only. Queries leading to data modification are not allowed
看了下mysql-connector-5.1.40版本中,如果设置failoverReadOnly=true (即默认值,参考链接),当mysql连接failover时,会根据jdbc连接串将当前连接的readOnly值设置为true (第8行代码) 1 2 3 4 ...
3450 0