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

问题描述/异常栈

User class threw exception: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most recent failure: Lost task 0.0 in stage 0.0 (TID 0, bixin-bigdata028.yppagent.com, executor 1): org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed; tried [[xxx:9200, xxx:9200, xxx:9200, xxx:9200, xxx:9200, 172.17.64.170:9200]]

发现版本

LTS 650 update0.2

解决方案

传输任务设置es.nodes.wan.only=true

FAQ-Connection error (check network and/or proxy x - 图1

问题原因

es.nodes.wan.only:默认为 false,设置为 true 之后,会关闭节点的自动 discovery,只使用es.nodes声明的节点进行数据读写操作;如果你需要通过域名进行数据访问,则设置该选项为 true,否则请务必设置为 false
https://www.jianshu.com/p/930337f5902e

作者:林帅