confluentinc / confluentinc/schema-registry

Got "ERROR The retention policy of the schema topic _schemas is incorrect"?

Open
#698 15 comments 17 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.5k
Forks
1.2k
Avg merge
23h 27m
Merged PRs (30d)
65

Description

Hi,

I have 4 machines among this 3 brokers have installed both zookeeper and kafka and in remain one machine installed kafka-rest and schema-registry. Below is the schema registry properties.

listeners=http://0.0.0.0:8081
kafkastore.connection.url=zookeeper1:2181,zookeeper2:2181,zookeeper3:2181/kafka
kafkastore.topic=_schemas
debug=false

But when i try to start schema registry

$CONFLUENT_HOME/bin/schema-registry-start $CONFLUENT_HOME/etc/schema-registry/schema-registry.properties
i am getting the following error.

ERROR The retention policy of the schema topic _schemas is incorrect. You must configure the topic to 'compact' cleanup policy to avoid Kafka deleting your schemas after a week. Refer to Kafka documentation for more details on cleanup policies (io.confluent.kafka.schemaregistry.storage.KafkaStore:388)
[2017-12-28 05:04:48,102] ERROR Server died unexpectedly: (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:52)
java.lang.IllegalStateException: The retention policy of the schema topic _schemas is incorrect. Expected cleanup.policy to be 'compact' but it is null
at io.confluent.kafka.schemaregistry.storage.KafkaStore.verifySchemaTopic(KafkaStore.java:393)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.createSchemaTopic(KafkaStore.java:283)
at io.confluent.kafka.schemaregistry.storage.KafkaStore.init(KafkaStore.java:152)
at io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.init(KafkaSchemaRegistry.java:212)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:56)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryRestApplication.setupResources(SchemaRegistryRestApplication.java:38)
at io.confluent.rest.Application.createServer(Application.java:157)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:44)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with KafkaStore.verifySchemaTopic and KafkaStore.createSchemaTopic, the entry points named in the stack trace, then review the schema-registry.properties settings and Kafka topic cleanup-policy documentation. Reproduce the schema registry startup against the listed broker setup; done means the registry starts without reporting an invalid _schemas retention policy.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kafka
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.