confluentinc / schema-registry

Confluent Schema Registry for Kafka
https://docs.confluent.io/current/schema-registry/docs/index.html
Other
2.22k stars 1.11k forks source link

Multiple Schema Registry Loadbalancing #844

Closed buntyray closed 4 years ago

buntyray commented 6 years ago

I have 3 schema registry in a cluster (Behind Azure L4 Loadbalancer) and all in one Data-center. Should be need to keep "master.eligibility" to TRUE/FALSE

When we run 3 of them we get error

Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Error while forwarding register schema request to the master; error code: 50003

jcustenborder commented 6 years ago

@buntyray Make sure that all of the schema registry nodes can resolve each other by name.

buntyray commented 6 years ago

All schema registry servers are in same subnet and each can resolve each other, I tested via nslookup on each VM

buntyray commented 6 years ago

Again running 2 schema registry also has issues. When access the loadbalancer url we dont see any schema's , when checking on node 01 url directly i see schema but when accessing on node 2 url no schemas.

mageshn commented 6 years ago

@buntyray would be helpful to debug if you could post the configs of the SR nodes here. You would need master.eligibility set to TRUE on at least one of the nodes.

HungUnicorn commented 4 years ago

try set min.insync.replic in topic __schemas to 2. it works in my case explanation: Configure min.insync.replicas on the Kafka server for the schemas topic that stores all registered schemas to be higher than 1. For example, if the kafkastore.topic.replication.factor is 3, then set min.insync.replicas on the Kafka server for the kafkastore.topic to 2. This ensures that the register schema write is considered durable if it gets committed on at least 2 replicas out of 3. Furthermore, it is best to set unclean.leader.election.enable to false so that a replica outside of the isr is never elected leader (potentially resulting in data loss).

https://docs.confluent.io/current/schema-registry/installation/deployment.html#host-name

rayokota commented 4 years ago

Closing this for now. Please reopen if it's still an issue.

ganeshc9c commented 1 year ago

@buntyray Make sure that all of the schema registry nodes can resolve each other by name.

can you please elaborate what does it mean?

ganeshc9c commented 1 year ago

@buntyray would be helpful to debug if you could post the configs of the SR nodes here. You would need master.eligibility set to TRUE on at least one of the nodes.

After making master.eligibility set to TRUE on at least one of the nodes. still we are getting the same error. Can you please help me on this.

ganeshc9c commented 1 year ago

I have 3 schema registry in a cluster (Behind Azure L4 Loadbalancer) and all in one Data-center. Should be need to keep "master.eligibility" to TRUE/FALSE

When we run 3 of them we get error

Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Error while forwarding register schema request to the master; error code: 50003

Hi how You resolved this multiple replica of schema registry can you please provide me any information related to this