1

I have installed Cloudera 3.0.0 so I have Apache Kafka version 0.11.0. I want to do a rolling upgrade from 0.11.0 to 1.0.0. I have read the documentation and I follow the next instructions:

  1. Repeat for each broker:

1.1.shut down the broker

1.2.update the code

1.2.1.Add to server.properties:

inter.broker.protocol.version = 0.11.0

1.3 Restart the broker

  1. Bump the protocol version in each server setting:

    inter.broker.protocol.version = 1.0
    
  2. Restart the brokers one by one.

When I do the step 3 I obtain the following error:

java.lang.IllegalArgumentException: Version `1.0` is not a valid version
    at kafka.api.ApiVersion$.$anonfun$apply$1(ApiVersion.scala:79)
    at scala.collection.MapLike.getOrElse(MapLike.scala:128)
    at scala.collection.MapLike.getOrElse$(MapLike.scala:126)
    at scala.collection.AbstractMap.getOrElse(Map.scala:59)
    at kafka.api.ApiVersion$.apply(ApiVersion.scala:79)
    at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:994)
    at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:867)
    at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:864)
    at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:28)
    at kafka.Kafka$.main(Kafka.scala:58)
    at kafka.Kafka.main(Kafka.scala)

Then, I tried writing:

inter.broker.protocol.version=1.0.0
inter.broker.protocol.version=1.0-IV0

But I obtain the same error. Why this is happening?

adamista
  • 205
  • 2
  • 12
  • Are you sure that you are running version 1.0? According to the stack-trace it looks like you are running version 0.11.0. But the way you do your updates looks right. Also the version 1.0 should be OK (not 1.0.0 or anything else) – TobiSH Jan 12 '18 at 09:17
  • I am running version 0.11.0 and I want to do a rolling upgrade without accept downtime. – adamista Jan 12 '18 at 09:25

2 Answers2

0

It seems like Cloudera 3.0.0 comes along with kafka 0.11.x instead of 1.0. At least according to this information: https://www.cloudera.com/documentation/kafka/latest/topics/kafka_packaging.html

That would also fit to your error message and to the call-stack you provided: In kafka 0.11. the exception is thrown at line 79: https://github.com/apache/kafka/blob/0.11.0/core/src/main/scala/kafka/api/ApiVersion.scala while in kafka 1.0 invalid version exceptions while occur in line 84 as you can see here: https://github.com/apache/kafka/blob/1.0/core/src/main/scala/kafka/api/ApiVersion.scala

Could your please double check the kafka versions you are running? Maybe you don't even have to update anything. In general the way you want to do the rolling update looks right.

TobiSH
  • 2,833
  • 3
  • 23
  • 33
  • How can I know with version I am running? – adamista Jan 12 '18 at 09:26
  • I have installed Cloudera distribution 3.0.0. https://www.cloudera.com/documentation/kafka/latest/topics/kafka_packaging.html#concept_fzg_phl_br – adamista Jan 12 '18 at 09:32
  • According to this document you should have kafkaVersion: "0.11.0+kafka3.0.0+50". The version should be listed in the server log. See also: https://stackoverflow.com/questions/27606065/how-to-find-the-kafka-version-in-linux – TobiSH Jan 12 '18 at 09:35
0

I doubt you have both 0.11.0.0 and 1.0.0 libraries inside libs. Remove older lib files and try. By default newer version will be picked even if you don't mentioninter.broker.protocol.version = 1.0.