Joe
Joe

Reputation: 13131

Kafka - Schema Registry unavailable

I downloaded Confluent Platform (on local laptop MacOS) and followed instructions for starting kafka: https://docs.confluent.io/current/schema-registry/docs/intro.html

~/kafka/confluent-4.0.0/bin » confluent start schema-registry                                                                                                                                                                                               dnk306@9801a7a5b33d
Starting zookeeper
zookeeper is [UP]
Starting kafka
kafka is [UP]
Starting schema-registry
schema-registry is [UP]

Schema-registry by looking above seems that is up and running. How to check that is really running?

curl http://localhost:8081
curl: (7) Failed to connect to localhost port 8081: Connection refused

Upvotes: 3

Views: 2537

Answers (2)

Giorgos Myrianthous
Giorgos Myrianthous

Reputation: 39930

First you'd need to test if the schema registry is still up and running. To do so, You need to run

confluent status schema-registry

Then, you could check the logs of the service and see whether any ERRORs have been reported (to get the last 100 lines of the log file onwards):

confluent log schema-registry -n 100 -f

If you make sure that the instance is up and running and no errors are reported, try to fetch all the subjects

curl -X GET http://localhost:8081/subjects

Upvotes: 2

Yang Xu
Yang Xu

Reputation: 53

Here's something probably you can try to verify whether you schema-registry is working properly:

1) First you want to make your schema-registry java process is running or not. you can use a simple ps command to look for it. eg. ps ax | grep java | grep schema-registry

2) After you make sure your schema-registry process is running properly, you can see the properties file it use in the output, you can find the listeners, kafkstore.connection.url and kafkaStore.topic there.

3) Now you know what exactly configuration this schema-registry service is using, you can check whether this topic is exist in kafka cluster, or use curl to test connectivity.

4) If something wrong still happen, you can check the -Dschema-registry.log.dir and -Dlog4j.configuration option and by changing the OUTPUT level to DEBUG in log4j config file it use, you may get much more useful information in your log output.

Upvotes: 1

Related Questions