Kafka topic Schema version mismatch error - org.apache.kafka.common.protocol.types.SchemaException
Problem description:
There is error messge when run spark app using spark streaming Kafka version 0.10.0.1(https://spark.apache.org/docs/latest/streaming-kafka-0-10-integration.html) to send message to version 0.9 or 0.8 of Kafka broker.
2019-04-08 01:08:04,211 [ERROR] [kafka-producer-network-thread | producer-1] Uncaught error in kafka producer I/O thread:
org.apache.kafka.common.protocol.types.SchemaException: Error reading field 'brokers': Error reading field 'host': Error reading string of length 25394, only 543 bytes available
at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:73)
at org.apache.kafka.clients.NetworkClient.parseResponse(NetworkClient.java:380)
at org.apache.kafka.clients.NetworkClient.handleCompletedReceives(NetworkClient.java:449)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:269)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:229)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:134)
at java.lang.Thread.run(Thread.java:745)
Root cause:
The Kafka broker version is still using version less than 0.10. Since there is big change after 0.10 that timestamp added in Schema. https://kafka.apache.org/documentation/
"
Soution:
Kafka broker should be upgrade and compatible to low version Schema format.
"1.5 Upgrading From Previous Versions
Upgrading from 0.8.x or 0.9.x to 0.10.0.0
0.10.0.0 has potential breaking changes (please review before upgrading) and possible performance impact following the upgrade. By following the recommended rolling upgrade plan below, you guarantee no downtime and no performance impact during and following the upgrade.
Note: Because new protocols are introduced, it is important to upgrade your Kafka clusters before upgrading your clients.
Notes to clients with version 0.9.0.0: Due to a bug introduced in 0.9.0.0, clients that depend on ZooKeeper (old Scala high-level Consumer and MirrorMaker if used with the old consumer) will not work with 0.10.0.x brokers. Therefore, 0.9.0.0 clients should be upgraded to 0.9.0.1 beforebrokers are upgraded to 0.10.0.x. This step is not necessary for 0.8.X or 0.9.0.1 clients.
For a rolling upgrade:
- Update server.properties file on all brokers and add the following properties:Upgrade the brokers. This can be done a broker at a time by simply bringing it down, updating the code, and restarting it.
- inter.broker.protocol.version=CURRENT_KAFKA_VERSION (e.g. 0.8.2 or 0.9.0.0).
- log.message.format.version=CURRENT_KAFKA_VERSION (See potential performance impact following the upgrade for the details on what this configuration does.)
- Once the entire cluster is upgraded, bump the protocol version by editing inter.broker.protocol.version and setting it to 0.10.0.0. NOTE: You shouldn't touch log.message.format.version yet - this parameter should only change once all consumers have been upgraded to 0.10.0.0
- Restart the brokers one by one for the new protocol version to take effect.
- Once all consumers have been upgraded to 0.10.0, change log.message.format.version to 0.10.0 on each broker and restart them one by one.
Note: If you are willing to accept downtime, you can simply take all the brokers down, update the code and start all of them. They will start with the new protocol by default.
Note: Bumping the protocol version and restarting can be done any time after the brokers were upgraded. It does not have to be immediately after."
Kafka topic Schema version mismatch error - org.apache.kafka.common.protocol.types.SchemaException的更多相关文章
- kafka删除topic后再创建同名的topic报错(ERROR org.apache.kafka.common.errors.TopicExistsException)
[hadoop@datanode3 logs]$ kafka-topics.sh --delete --zookeeper datanode1:2181 --topic firstTopic firs ...
- Error when sending message to topic test with key: null, value: 2 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
windows下使用kafka遇到这个问题: Error when sending message to topic test with key: null, value: 2 bytes with ...
- libtool: Version mismatch error 解决
在编译一个软件的时候,在 ./configure 和 make 之后可能会出现如下错误: libtool: Version mismatch error. This is libtool 2.4. ...
- libtool: Version mismatch error. 解决方法
在编译一个软件的时候,在 ./configure 和 make 之后可能会出现如下错误: libtool: Version mismatch error. This is libtool 2.4. ...
- DataPipeline |《Apache Kafka实战》作者胡夕:Apache Kafka监控与调优
胡夕 <Apache Kafka实战>作者,北航计算机硕士毕业,现任某互金公司计算平台总监,曾就职于IBM.搜狗.微博等公司.国内活跃的Kafka代码贡献者. 前言 虽然目前Apache ...
- 实践部署与使用apache kafka框架技术博文资料汇总
前一篇Kafka框架设计来自英文原文(Kafka Architecture Design)的翻译及整理文章,非常有借鉴性,本文是从一个企业使用Kafka框架的角度来记录及整理的Kafka框架的技术资料 ...
- Apache Kafka® is a distributed streaming platform
Kafka Connect简介 我们知道过去对于Kafka的定义是分布式,分区化的,带备份机制的日志提交服务.也就是一个分布式的消息队列,这也是他最常见的用法.但是Kafka不止于此,打开最新的官网. ...
- Spring for Apache Kafka
官方文档详见:http://docs.spring.io/spring-kafka/docs/1.0.2.RELEASE/reference/htmlsingle/ Authors Gary Russ ...
- kafka的api操作(官网http://kafka.apache.org/documentation/#producerapi)
Kafka API 简单用法 本篇会用到以下依赖:(本人包和这个不同,去maven里查找) <dependency><groupId>org.apache.kafka</ ...
随机推荐
- 宋宝华:关于Ftrace的一个完整案例
本文系转载,著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 作者: 宋宝华 来源: 微信公众号linux阅码场(id: linuxdev) Ftrace简介 Ftrace是Lin ...
- 学习笔记32_EF查询优化
*如果有 var temp = from m in dbContext.Model1 where m.属性1 == value select m; foreach(var m1 in temp)//这 ...
- Kong03-Nginx、OpenResty、Kong 的基本概念和区别联系
Nginx.OpenRestry.Kong 这三个项目关系比较紧密: Nginx 是模块化设计的反向代理软件,C语言开发: OpenResty 是以 Nginx 为核心的 Web 开发平台,可以解析执 ...
- Java学习总结之方法重载和方法重写
在学习方法的阶段我学习了方法重载(Overload),而在学习面向对象三大特性之继承的时候我又学习了方法重写(Override). 概念: 方法重载:在同一个类中,允许存在一个以上的同名方法,只要 ...
- 8*8LED点阵
基础认识 1.5英寸LED点阵管数码管8*8红色16pin 有如下两种型号: 共阳1588BS 共阴1588AS 共阴1588AS 共阳1588BS 编程导向 共阴和共阳其编程思路基本类似,只是对应I ...
- 百度艾尼ERNIE专场再入魔都,11月23日线下开讲!
这个十一月,是属于深度学习开发者们的秋季盛宴.『WAVE Summit+』2019 深度学习开发者秋季峰会刚刚落下帷幕,基于ERNIE的语义理解工具套件也在此次峰会上全新发布,旨在为企业级开发者提供更 ...
- Linux | 性能分析系列学习 (1)
学习重点: 把观察到的性能问题跟系统原理关联起来,特别是把系统从应用程序.库函数.系统调用.再到内核和硬件等不同的层级贯穿起来. 主要是四个方面:CPU 性能.磁盘 I/O 性能.内存性能以及网络性能 ...
- javascript 字符串转化成函数执行
javascript 字符串转化成函数执行<pre>function func_abc(){ alert('a');}var str = "func_abc";eval ...
- HTML——基础知识点1
- pssh系列工具
一.pssh简介及安装 首先我们来了解下什么是pssh,它是干嘛用的?pssh是一个python编写可以在多台服务器上执行命令的工具,也可以实现文件复制.换而言之就是一个批量管理多台服务器的一个小工具 ...