question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't start schemaregistry

See original GitHub issue

I 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:open
  • Created 4 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

1reaction
OneCricketeercommented, Feb 20, 2020

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)

0reactions
Victoremepuntocommented, Jul 13, 2020

I was running into issues until I set the hostname parameter to localhost, or I guess the same value as the SCHEMA_REGISTRY_HOST_NAME variable.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found