Can't start schemaregistry
See original GitHub issueI am trying to start the schema registry docker image with the following configs:
schema-registry:
image: confluentinc/cp-schema-registry:5.1.3
network_mode: "host"
environment:
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: "localhost:2181"
SCHEMA_REGISTRY_HOST_NAME: localhost
SCHEMA_REGISTRY_LISTENERS: "http://localhost:8081"
depends_on:
- kafka
ports:
- "8081:8081"
Although I am facing the following error:
Exception in thread "main" java.lang.ExceptionInInitializerError
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain.main(SchemaRegistryMain.java:41)
Caused by: io.confluent.common.config.ConfigException: Invalid value java.net.UnknownHostException: linuxkit-025000000001: linuxkit-025000000001: Name or service not known for configuration Unknown local hostname
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig.getDefaultHost(SchemaRegistryConfig.java:405)
at io.confluent.kafka.schemaregistry.rest.SchemaRegistryConfig.<clinit>(SchemaRegistryConfig.java:259)
Any ideias?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10
Top Results From Across the Web
Unable to start Confluent Schema Registry - Stack Overflow
i have checked the logs of schema registry and found out the below log. ERROR Error starting the schema registry (io.confluent.kafka.
Read more >Error: Schema Registry failed to start · Issue #1708 - GitHub
Stand Alone Schema Registry can not start after maintenance restart, otherwise Cluster where 2+ nodes works properly.
Read more >Getting error in schema-registry start command - Edureka
I am getting error with below command:- "bin/schema-registry-start config/schema-registry.properties" getting error: "could not find or load ...
Read more >error starting schema registry - Google Groups
i cant start the schema registry with the following error. ERROR Error starting the schema registry (io.confluent.kafka.schemaregistry.rest.
Read more >Confluent Platform Quick Start
Start Confluent ZooKeeper, Kafka, and Schema Registry services using the Command Line Interface. Tip. If not already in your PATH, add ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As I’ve pointed out already localhost/127.0.0.1 is almost never the correct address when working with Docker services
https://github.com/zhenik-poc/hashicorp-stacks/blob/master/learn/consul-connect/kafka/kafka.hcl#L18-L21
KAFKA_LISTENERS should be 0.0.0.0
Understand what the advertised listeners are https://www.confluent.io/blog/kafka-listeners-explained/
For Nomad, use the Zookeeper Consul DNS name, not localhost. Use the correct ports, not 9181 (unless you changed it for some reason)
For Schema Registry, I would suggest not using Zookeeper and use the Kafka-based election mode (refer to the documentation)
I was running into issues until I set the
hostname
parameter tolocalhost
, or I guess the same value as theSCHEMA_REGISTRY_HOST_NAME
variable.