# Getting invalid IPv6 address error while connecting Springboot with elasticsearch over ipv4

**URL:** <https://discuss.elastic.co/t/getting-invalid-ipv6-address-error-while-connecting-springboot-with-elasticsearch-over-ipv4/353840>\
**Category:** Elasticsearch\
**Created:** [February 22, 2024, 5:25am UTC](https://discuss.elastic.co/t/getting-invalid-ipv6-address-error-while-connecting-springboot-with-elasticsearch-over-ipv4/353840 "2024-02-22T05:25:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeyakumarKarunanithi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeyakumarkarunanithi/32/123825_2.png) [@JeyakumarKarunanithi](https://discuss.elastic.co/u/JeyakumarKarunanithi)\
**Post date:** [February 22, 2024, 5:25am UTC](https://discuss.elastic.co/t/getting-invalid-ipv6-address-error-while-connecting-springboot-with-elasticsearch-over-ipv4/353840/1 "2024-02-22T05:25:58Z")

</div>

Hello Team ,  
We are using Elasticsearch 7.17.5 docker image and connecting our own java springboot application using IPv4 in docker swarm & Kubernetes.

While deploying the same stack in Openshift, We are getting the following error

```
Caused by: ElasticsearchException[java.util.concurrent.ExecutionException: java.net.UnknownHostException: elasticsearch:tcp://172.30.161.181:9200: invalid IPv6 address]; nested: ExecutionException[java.net.UnknownHostException: elasticsearch:tcp://172.30.161.181:9200: invalid IPv6 address]; nested: UnknownHostException[elasticsearch:tcp://172.30.161.181:9200: invalid IPv6 address];

```

We didnt mention/configure anything related to IPv6 but the query constructing itself for IPv6

But the same stack is working fine in Docker Swarm & Kubernetes, Need to know whether this issue is related to Elasticsearch or with Openshift, also looking for the fixes

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 21, 2024, 5:26am UTC](https://discuss.elastic.co/t/getting-invalid-ipv6-address-error-while-connecting-springboot-with-elasticsearch-over-ipv4/353840/2 "2024-03-21T05:26:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
