kafka插入失败

org.springframework.kafka.core.KafkaProducerException: Failed to send; nested exception is org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for zhaochaotest-0: 30031 ms has passed since batch creation plus linger time
    at org.springframework.kafka.core.KafkaTemplate$1.onCompletion(KafkaTemplate.java:365)
    at org.apache.kafka.clients.producer.internals.ProducerBatch.completeFutureAndFireCallbacks(ProducerBatch.java:204)
    at org.apache.kafka.clients.producer.internals.ProducerBatch.done(ProducerBatch.java:187)
    at org.apache.kafka.clients.producer.internals.Sender.failBatch(Sender.java:627)
    at org.apache.kafka.clients.producer.internals.Sender.sendProducerData(Sender.java:287)
    at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:238)
    at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for zhaochaotest-0: 30031 ms has passed since batch creation plus linger time

 

2018-11-07 14:11:32.625  INFO 13932 --- [ntainer#0-8-C-1] o.a.k.c.c.internals.AbstractCoordinator  : [Consumer clientId=consumer-9, groupId=zhaochaotest] Discovered group coordinator hdp166.tmtgeo.com:6667 (id: 2147482646 rack: null)
2018-11-07 14:11:32.625  INFO 13932 --- [ntainer#0-5-C-1] o.a.k.c.c.internals.AbstractCoordinator  : [Consumer clientId=consumer-6, groupId=zhaochaotest] Discovered group coordinator hdp166.tmtgeo.com:6667 (id: 2147482646 rack: null)
2018-11-07 14:11:32.626  INFO 13932 --- [ntainer#0-7-C-1] o.a.k.c.c.internals.AbstractCoordinator  : [Consumer clientId=consumer-8, groupId=zhaochaotest] Discovered group coordinator hdp166.tmtgeo.com:6667 (id: 2147482646 rack: null)

 

问题日志中很明显写着域名和IP的问题,在hosts中设置一下就好。

C:\Windows\System32\Drivers\etc

你可能感兴趣的:(遇见的异常)