# \[ERROR\]\[discovery.ec2 \] \[host\] unexpected error while joining cluster, trying again org.elasticsearch.ElasticsearchException: Ping execution failed

**URL:** <https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690>\
**Category:** Elasticsearch\
**Created:** [February 6, 2024, 11:33pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690 "2024-02-06T23:33:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnunez87](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jnunez87](https://discuss.elastic.co/u/jnunez87)\
**Post date:** [February 6, 2024, 11:33pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/1 "2024-02-06T23:33:35Z")

</div>

Hello all

Today we had a very strange error appear today in our cluster that is preventing the node from connecting. Below is our errors

```auto

[2024-02-06 23:18:11,590][ERROR][discovery.ec2] [Windeagle] unexpected error while joining cluster, trying again
org.elasticsearch.ElasticsearchException: Ping execution failed
        at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.ping(UnicastZenPing.java:260)
        at org.elasticsearch.discovery.zen.ping.ZenPingService.ping(ZenPingService.java:146)
        at org.elasticsearch.discovery.zen.ping.ZenPingService.pingAndWait(ZenPingService.java:124)
        at org.elasticsearch.discovery.zen.ZenDiscovery.findMaster(ZenDiscovery.java:1007)
        at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:361)
        at org.elasticsearch.discovery.zen.ZenDiscovery.access$6100(ZenDiscovery.java:86)
        at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1384)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.SecurityException: Invalid SSL master secret
        at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.verifyMasterSecret(SdkTLSSocketFactory.java:193)
        at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.connectSocket(SdkTLSSocketFactory.java:128)
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
        at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
        at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:728)
        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
        at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11783)
        at com.amazonaws.services.ec2.AmazonEC2Client.describeInstances(AmazonEC2Client.java:5905)
        at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.buildDynamicNodes(AwsEc2UnicastHostsProvider.java:110)
        at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:313)
        at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.ping(UnicastZenPing.java:219)
        ... 9 more

```

We have made no changes to the servers and where working earlier today. However, this errors keeps occurring even after yaml changes, service restarts, and server restarts. I even built a new EC2 instance and it is receiving the same error.

The odd thing is we have never used SSL and even added the SSL requirement to false in the yaml.

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [February 7, 2024, 5:01am UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/2 "2024-02-07T05:01:45Z")

</div>

What version of Elasticsearch is this? It appears to be very old and running a very old version of the AWK SDK.

---

<div class="post-metadata">

**Author:** ![jnunez87](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jnunez87](https://discuss.elastic.co/u/jnunez87)\
**Post date:** [February 7, 2024, 3:08pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/3 "2024-02-07T15:08:36Z")

</div>

We are on a very old version of elasticsearch. We are running Elasticsearch 1.7.6.

This is the AWS version installed -

````auto
aws-cli/1.18.147 Python/2.7.18 Linux/5.10.198-187.748.amzn2.x86_64 botocore/1.18.6```
````

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [February 8, 2024, 3:59am UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/4 "2024-02-08T03:59:59Z")

</div>

That's so old that I doubt you're going to find anyone to help.

From the error, it looks like the Java AWS SDK that ES is using for EC2 discovery has some sort of issue handshaking with some URL - perhaps the EC2 metadata service.

It doesn't appear to be an Elasticsearch specific issue

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 8, 2024, 6:41am UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/5 "2024-02-08T06:41:53Z")

</div>

Yeah. From the top of my head, I remember that upgrading the AWS SDK was mandatory at some point because it was not compatible anymore with their APIS.

The only chance is to upgrade.  
Ideally to 8.12 but I know this is a huge step as so many things changed, like the mapping, the way the ec2 plugin works and is configured....

---

<div class="post-metadata">

**Author:** ![jnunez87](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jnunez87](https://discuss.elastic.co/u/jnunez87)\
**Post date:** [February 8, 2024, 2:42pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/6 "2024-02-08T14:42:35Z")

</div>

Thanks. That is what I figured but was hoping it wasn't. As a bandaid for now, what version do I upgrade the sdk?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 8, 2024, 3:00pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/7 "2024-02-08T15:00:26Z")

</div>

I can't tell but the last update I can see is from 2 years ago with 1.12.270.

> <https://github.com/elastic/elasticsearch/pull/89034>
>
> Resolves https://github.com/aws/aws-sdk-java/security/advisories/GHSA-c28r-hw5m-…5gv3
> 
> See https://github.com/elastic/elasticsearch/pull/88932

Not sure it will be compatible with the 1.x version though.

---

<div class="post-metadata">

**Author:** ![jnunez87](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jnunez87](https://discuss.elastic.co/u/jnunez87)\
**Post date:** [February 8, 2024, 4:22pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/8 "2024-02-08T16:22:45Z")

</div>

Okay thank you for all this help. I'll try some things

---

<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 7, 2024, 4:23pm UTC](https://discuss.elastic.co/t/error-discovery-ec2-host-unexpected-error-while-joining-cluster-trying-again-org-elasticsearch-elasticsearchexception-ping-execution-failed/352690/9 "2024-03-07T16:23:25Z")

</div>

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