# Discovery service as endpoint provider not recognised

**URL:** <https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512>\
**Category:** Elasticsearch\
**Created:** [August 10, 2023, 7:00am UTC](https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512 "2023-08-10T07:00:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nealder](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@nealder](https://discuss.elastic.co/u/nealder)\
**Post date:** [August 10, 2023, 7:00am UTC](https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512/1 "2023-08-10T07:00:51Z")

</div>

Hi Everyone,  
I have submitted a bug ticket on github, but I got redirected here. Here is the [ticket](https://github.com/elastic/elasticsearch/issues/98284).  
In short I found that the 'discovery.zen.ping.unicast.host' could resolve IP addresses of nodes in my cluster via discovery service name, but 'discovery.seed\_hosts' could only resolve them if the static IP of the discovery service were given.  
The problem here:

1. Documentation lacks this information
2. Hard coding IP of discovery service could lead to problems as the cluster naturally scales and redistributes between nodes.

I find this a regression, a feature loss therefore a bug. What are you opinions?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 10, 2023, 7:32am UTC](https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512/2 "2023-08-10T07:32:38Z")

</div>

[These docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-settings.html) specifically say that `discovery.seed_hosts` will do DNS lookups:

> The `host` is either a host name to be resolved by DNS, an IPv4 address, or an IPv6 address. IPv6 addresses must be enclosed in square brackets. If a host name resolves via DNS to multiple addresses, Elasticsearch uses all of them. DNS lookups are subject to [JVM DNS caching](https://www.elastic.co/guide/en/elasticsearch/reference/current/networkaddress-cache-ttl.html).

Moreover there really is no difference between the handling of `discovery.zen.ping.unicast.host` and `discovery.seed_hosts`, they both feed into the `configuredHosts` variable in the following code and from then on there is no distinction:

> <https://github.com/elastic/elasticsearch/blob/bcfbf000748b538884087623113682165abcb92d/server/src/main/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProvider.java#L54-L67>

I think the difference in behaviour you're seeing is most likely environmental.

---

<div class="post-metadata">

**Author:** ![nealder](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@nealder](https://discuss.elastic.co/u/nealder)\
**Post date:** [August 10, 2023, 9:10am UTC](https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512/3 "2023-08-10T09:10:41Z")

</div>

Hi David,  
unfortunatelly we already eliminated all environmental changes. It is literally only the elasticsearch image version and this discovery setting as differences.  
Elasticsearch 7.17.0 has a feature which allows to do this and 8.8.1 does not have it under this setting. I tried to dig into the java code, but I'm no expert in that.  
Question: how can one handle a cluster restart, scaling, redistribution or restarting of nodes?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 10, 2023, 10:14am UTC](https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512/4 "2023-08-10T10:14:52Z")

</div>

Apart from the removal of the legacy setting I cannot find any difference in behaviour in ES between 7.17 and 8.x. They both do DNS name lookups just fine.

---

<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:** [September 7, 2023, 10:15am UTC](https://discuss.elastic.co/t/discovery-service-as-endpoint-provider-not-recognised/340512/5 "2023-09-07T10:15:12Z")

</div>

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