Getting EsHadoopNoNodesLeftException

Getting the below exception when I submit a Spark job,

org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed; tried

I tried setting es.nodes.wan.only=true. But still I see this error. It fails for only few executors not all. So my elastic search nodes are reachable.

Can you provide the full query ? Did you check your network e.g. ifconfig?

Its a spark job. The query is a simple select * from statement. Yes I did check that.

Can you provide the Spark executor logs?

Also, the ES log.