confluentinc / schema-registry

Confluent Schema Registry for Kafka
https://docs.confluent.io/current/schema-registry/docs/index.html
Other
2.2k stars 1.11k forks source link

Unable to upgrade the Schema Registry via yum #783

Open gvdm90 opened 6 years ago

gvdm90 commented 6 years ago

Hi all,

I have a running Confluent 4.0.0 stack and would like to upgrade to the latest (4.1.0). After updating the repository URLs, if I run

yum update confluent-schema-registry

the package is updated to the 4.1.0, but when starting the schema registry daemon I get this classpath error:

at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:43)
at io.confluent.rest.Application.createServer(Application.java:157)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:41)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:59)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.<init>(KafkaSchemaRegistry.java:156)
Exception in thread "main" java.lang.NoSuchMethodError: io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig.getMap(Ljava/lang/String;)Ljava/util/Map;
[2018-04-19 12:50:47,533] INFO Initializing KafkaStore with broker endpoints: PLAINTEXT://broker1:9092,PLAINTEXT://broker2:9092 (io.confluent.ka
[2018-04-19 12:50:47,381] INFO Logging initialized @553ms (org.eclipse.jetty.util.log:186)
(io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig:175)

In fact, if I check the installed confluent versions I find:

yum list installed | grep confluent
confluent-common.noarch            4.0.0-1                        @Confluent
confluent-kafka-2.11.noarch        1.1.0-1                        @Confluent
confluent-rest-utils.noarch        4.0.0-1                        @Confluent
confluent-schema-registry.noarch   4.1.0-1                        @Confluent

So the yum update of the schema registry did not update the dependencies. I checked the dependencies of the package and found that it references the confluent-rest-utils package without a required version

yum deplist confluent-schema-registry
package: confluent-schema-registry.noarch 4.1.0-1
  dependency: confluent-rest-utils
   provider: confluent-rest-utils.noarch 4.1.0-1

This is different by, for example, the kernel yum package, where some dependencies target a specific version

yum deplist kernel
package: kernel.x86_64 3.10.0-693.21.1.el7
  dependency: module-init-tools >= 3.16-2
   provider: kmod.x86_64 20-15.el7_4.7

Do you think that the Confluent's yum packages should point to a specific version of the dependencies in order to let the yum update command update all the dependencies together?

daehokimm commented 4 years ago

In my opinion, this issue is probably similar to issue #534 .