# Connection error (check network and/or proxy settings)- all nodes failed

**URL:** <https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965>\
**Category:** Elasticsearch\
**Created:** [August 12, 2025, 1:36pm UTC](https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965 "2025-08-12T13:36:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shifen\_luo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shifen_luo/32/142297_2.png) [@shifen\_luo](https://discuss.elastic.co/u/shifen_luo)\
**Post date:** [August 12, 2025, 1:36pm UTC](https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965/1 "2025-08-12T13:36:12Z")

</div>

**Subject:​** ​ Connection error "all nodes failed" writing Hive to ES 7.7.1 via Spark UPSERT

​ **​Body:​** ​

Hi Elastic community,

We're encountering persistent `Connection error (check network and/or proxy settings) - all nodes failed`when UPSERTing Hive data to Elasticsearch through Spark. Both clusters are verified operational.

​ **​Environment Details:​** ​

- ​ **​Elasticsearch​** ​: v7.7.1 (27 data nodes + 3 dedicated masters)

- ​ **​Network​** ​: Corporate internal network with domain resolution to 3 master nodes

- ​ **​Write Mode​** ​: Spark UPSERT operations

- ​ **​Data Volume​** ​: Batch size = 10k records/write

​ **​Current Configuration:​** ​

```auto
properties

```

**复制**

```auto
# Connectivity
target.es.nodes.wan.only = true # Access via domain

# Write Tuning
target.es.batch.write.refresh = false
batchSize = 10000

# Spark Resources
ndi.spark.spark-argument.executor-cores = 2
ndi.spark.spark-argument.num-executors = 2
ndi.spark.spark-conf.spark.dynamicAllocation.maxExecutors = 4

```

​ **​Troubleshooting Done:​** ​

✓ Validated cluster health (Green status)

✓ Confirmed DNS resolution to master nodes

✓ Tested basic curl connectivity to ES masters

✓ Reduced batch size & executors to limit load

​ **​Critical Questions:​** ​

1. ​ **​Domain Configuration​** ​:

2. ​ **​UPSERT-Specific Issues​** ​:

3. ​ **​Node Failure Diagnostics​** ​:

4. ​ **​Proxy Pitfalls​** ​:

Thanks for your expertise!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 12, 2025, 1:45pm UTC](https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965/2 "2025-08-12T13:45:09Z")

</div>

It would help if you formatted the post bnetter as it is hard to read.

> [@shifen\_luo](#):
>
> l. ​​Environment Details:​​ ​​Elasticsearch​​: v7.7.1 (27 data nodes + 3 dedicated masters)

This is a very old version that has been EOL a long time. I would recommend upgrading at least to the latest 7.17 release, but ideally to a version that is still supported.

> [@shifen\_luo](#):
>
> Network​​: Corporate internal network with domain resolution to 3 master nodes

Dedicated master nodes should NOT serve traffic. In a cluster like this all traffic should go directly to the data nodes, not the master nodes.

In addition to this it would be great if you could answer the following questions:

- What is the hardware specification of the different nodes in the cluster? What type of storage are you using?
- What is the average document size?
- Do you have any complex or advnaced mapping features in use that could affect performance or resource usage, e.g. parent-child, nested documents or complex analysers?
- How many indices and shards are you actively indexing into? Are these evently spread across the cluster?

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [August 12, 2025, 2:48pm UTC](https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965/3 "2025-08-12T14:48:33Z")

</div>

The answer is likely in your spark executor log. But as the first reply said, it would be really helpful if you could format your post to make it more readable. And it would be wise to upgrade Elasticsearch.

---

<div class="post-metadata">

**Author:** ![shifen\_luo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shifen_luo/32/142297_2.png) [@shifen\_luo](https://discuss.elastic.co/u/shifen_luo)\
**Post date:** [August 13, 2025, 1:52am UTC](https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965/6 "2025-08-13T01:52:26Z")

</div>

Is there any way to fix this without upgrading? This problem only started happening in August and never occurred before. Is there any parameter that can solve this problem?

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [August 13, 2025, 1:39pm UTC](https://discuss.elastic.co/t/connection-error-check-network-and-or-proxy-settings-all-nodes-failed/380965/7 "2025-08-13T13:39:22Z")

</div>

We don’t know what the problem is. You need to look in the spark executor log. If there is nothing there, look in the spark task logs. If there is nothing there, look in the elasticsearch logs.
