# Confluent schema registry 7.6.0 issue with multiple instances while publishing schemas

**URL:** <https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995>\
**Category:** Schema Registry\
**Created:** [3 July 2024 14:46 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995 "2024-07-03T14:46:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bijoy.computers](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bijoy.computers](https://forum.confluent.io/u/bijoy.computers)\
**Post date:** [3 July 2024 14:46 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/1 "2024-07-03T14:46:02Z")

</div>

I have installed confluent schema registry based on “[packages.confluent.io/archive/7.6/confluent-7.6.0.zip](http://packages.confluent.io/archive/7.6/confluent-7.6.0.zip)” on my on-premise  
Kubernetes cluster,and pointing it to \_schemas topic in Confluent Cloud Kafka.

When I run a single pod instance of schema registry (SR), I am able to publish new schemas to the SR consistently.  
But when I run more than one pod instance, and the request hits the follower instance,the request fails with the error message like below,complaining about the follower instance unable to forward the request to leader due to "Unknown host " exception.

* * *

Error logs:  
_org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)\n\tat java.base/java.lang.Thread.run(Thread.java:840)\nCaused by: io.confluent.kafka.schemaregistry.exceptions.SchemaRegistryRequestForwardingException: **Unexpected error while forwarding the registering schema request to [https://dp-schema-registry-7dc6cbdb5-kr2rk:1443](https://dp-schema-registry-7dc6cbdb5-kr2rk:1443)**\n\tat io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.forwardRegisterRequestToLeader(KafkaSchemaRegistry.java:1248)\n\tat io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry.registerOrForward(KafkaSchemaRegistry.java:880)\n\tat io.confluent.kafka.schemaregistry.rest.resources.SubjectVersionsResource.register(SubjectVersionsResource.java:412)\n\t… 73 more\nCaused by: **java.net.UnknownHostException: dp-schema-registry-7dc6cbdb5-kr2rk** _

* * *

Basically the pods corresponding to the different SR instances in the same cluster are trying to reach each other using pod name and hence unable to resolve the target pod.If I manually try to connect to one pod from the other using the pod IP,they are able to connect.

My question is how do I let the pods interact with each other using pod Ip instead of pod name? I tried setting SCHEMA\_REGISTRY\_HOST\_NAME to status.podIP in env variable section of pod,and it is able to set the variable to pod IP,but looks like the SR is unable to understand this property and assign it to the pod host names.

Below are some of my settings in the schema registry properties:  
listeners–\> I have set it to “0.0.0.0:1443”  
host.name → I have not set this

Please suggest how do I let the follower pod connect/forward to leader pod of SR in above scenario.

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [4 July 2024 12:17 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/2 "2024-07-04T12:17:57Z")

</div>

hey @bijoy.computers

I assume you’re not using Confluent for Kubernetes?  
how did you create the pods?

in general I think you have to set `host.name` to the pods IP.

best,  
michael

---

<div class="post-metadata">

**Author:** ![bijoy.computers](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bijoy.computers](https://forum.confluent.io/u/bijoy.computers)\
**Post date:** [4 July 2024 12:57 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/3 "2024-07-04T12:57:22Z")

</div>

Hi @mmuehlbeyer

Thanks for your response.

I created a docker image using the confluent schema registry code available under [https://packages.confluent.io/archive/7.6/confluent-7.6.0.zip](https://packages.confluent.io/archive/7.6/confluent-7.6.0.zip) and used it to instantiate pods on my onpremise K8 cluster.

By setting host.name to podIP,I assume you are referring to host.name property in schema-registry.properties file.That will not work for me because podIP may change if the existing pod gets killed and a new one is spinned up. So, I would ideally need a way to dynamically fetch the podIP and assign as host.name during the pod start up.

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [4 July 2024 13:13 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/4 "2024-07-04T13:13:50Z")

</div>

I see  
why not using CfK or a similar operator which would take care such things?

> **[GitHub - confluentinc/confluent-kubernetes-examples: Example scenario workflows...](https://github.com/confluentinc/confluent-kubernetes-examples/tree/master)**
>
> master

[https://bitnami.com/stack/schema-registry/helm](https://bitnami.com/stack/schema-registry/helm)

best,  
michael

---

<div class="post-metadata">

**Author:** ![bijoy.computers](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bijoy.computers](https://forum.confluent.io/u/bijoy.computers)\
**Post date:** [4 July 2024 15:32 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/5 "2024-07-04T15:32:40Z")

</div>

Hi,

We did not explore that option yet.However,currently it may be bit late for us to explore alternative options as we are in user testing phase.

Thanks

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [5 July 2024 05:38 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/6 "2024-07-05T05:38:58Z")

</div>

Hi,

I see.  
I assume you’re looking for something like this

> **[Expose Pod Information to Containers Through Environment Variables](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)**
>
> This page shows how a Pod can use environment variables to expose information about itself to containers running in the Pod, using the downward API. You can use environment variables to expose Pod fields, container fields, or both.
> In Kubernetes,...

Best,  
Michael

---

<div class="post-metadata">

**Author:** ![bijoy.computers](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bijoy.computers](https://forum.confluent.io/u/bijoy.computers)\
**Post date:** [5 July 2024 06:36 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/7 "2024-07-05T06:36:52Z")

</div>

Hi,

Yes,I used code like below to set an env variable SCHEMA\_REGISTRY\_HOST\_NAME to the pod IP dynamically:

```auto
- name: SCHEMA_REGISTRY_HOST_NAME
          valueFrom:
            fieldRef:
              fieldPath: status.podIP

```

But looks like though the above variable is being set to pod IP,but the pods are still using the pod names to communicate with one another and failing with error I mentioned in the logs snippet.

So,I am looking for either:

1. a way for pods to communicate with each other using IP addresses instead of pod names.  
or
2. A way for pods to be able to reach each other using pod names (via some DNS settings,etc.).

Thanks,  
Bijoy

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [5 July 2024 06:57 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/8 "2024-07-05T06:57:25Z")

</div>

Hi @bijoy.computers

thanks for letting us know.

`host.name` in schema. registry.properties is not set, right?

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [5 July 2024 07:08 UTC](https://forum.confluent.io/t/confluent-schema-registry-7-6-0-issue-with-multiple-instances-while-publishing-schemas/10995/9 "2024-07-05T07:08:46Z")

</div>

I think your looking for something similar to this

> **[GitHub - manoj8928/kafka-schema-registry: Deploying Kakfa schema registry in...](https://github.com/manoj8928/kafka-schema-registry)**
>
> Deploying Kakfa schema registry in Kubernetes. Contribute to manoj8928/kafka-schema-registry development by creating an account on GitHub.

though I would highly recommend to use an operator or similar to  
run such things.  
it will ease your pain to get this things up and running.

there are some archived helm charts available as well

> **[GitHub - confluentinc/cp-helm-charts: The Confluent Platform Helm charts enable...](https://github.com/confluentinc/cp-helm-charts/tree/master)**
>
> master

disclaimer: not recommend for production usage

nevertheless I won’t recommend your current setup for prod usage 😉

> **[GitHub - confluentinc/cp-helm-charts: The Confluent Platform Helm charts enable...](https://github.com/confluentinc/cp-helm-charts/tree/master)**
>
> master
