kafka Exception thrown when sending a message with key='null'

  • 关于一次部署kafka出现异常(key=’null’)的记录,环境为阿里云服务器
  • 先贴异常:
  • org.springframework.kafka.support.LoggingProducerListener [76] - Exception thrown when sending a message with key=’null’ and payload=’2017-11-14 15:36:53|iZbp1115ogry6vyp418vplZ|192.168.3.1|{“token”:”708037c594e04850bfd48f82fa862dd…’ to topic
  • kafka启动日志报错如下
Could not initialize class kafka.network.RequestChannel
  • kafka我采用三节点部署,配置如下:
broker.id=0 # 1,2
delete.topic.enable=true
auto.create.topics.enable=false
listeners=PLAINTEXT://192.168.4.1:9092
advertised.listeners=PLAINTEXT://192.168.4.1:9092
num.network.threads=3
num.io.threads=6
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/opt/kafka-logs
num.partitions=6
num.recovery.threads.per.data.dir=1
default.replication.factor=2
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
zookeeper.connect=192.168.4.1:2181,192.168.4.2:2181,192.168.4.3:2181
zookeeper.connection.timeout.ms=6000
group.initial.rebalance.delay.ms=0
  • 到生产环境总是有一台机网络有问题,经过查看日志,发现该台机没有做主机名ip映射,坑啊:
  • 然后改/etc/hosts文件加上以下一段,一切正常,在此做一下记录:
127.0.0.1 iZbp1iazbfd949z016r62zZ
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值