schema registry
streamsend-io opened this issue · 1 comments
streamsend-io commented
The SR container starts, connects & creates the __schemas topic.
On subsequent start, server startup validates the __schemas topic and then fails with
schema-registry | [2024-09-25 07:18:13,444] ERROR Server died unexpectedly: (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain)
schema-registry | java.lang.NullPointerException: Cannot invoke "org.apache.kafka.clients.admin.ConfigEntry.value()" because the return value of "org.apache.kafka.clients.admin.Config.get(String)" is null
This is the docker-override.yml to recreate this issue:
---
services:
schema-registry:
image: confluentinc/cp-schema-registry:latest
ports:
- 8081:8081
container_name: schema-registry
depends_on:
- tansu
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "tansu:9092"
SCHEMA_REGISTRY_CUB_KAFKA_TIMEOUT: 300
SCHEMA_REGISTRY_KAFKASTORE_TOPIC_REPLICATION_FACTOR: 1
shortishly commented
The NullPointerException was being caused by Tansu returning a config value of null, which is allowed by the protocol but the Java client doesn't like, so the fix was to return "" instead. SR starts up, and is running fetches, but I've not checked beyond that. I've updated the justfile
to incorporate the SR compose, and will merge this onto main shortly.