Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2018-05-15 18:38:15 ERROR NetworkClient:144 - Node [127.0.0.1:9200] failed (Connection refused: con ect); selected next node [17.13.50.21:9200] 2018-05-15 18:38:19 ERROR NetworkClient:144 - Node [127.0.0.1:9200] failed (Connection refused: con ect); no other nodes left - aborting... #42

Closed
LunaLuan opened this issue May 15, 2018 · 4 comments

Comments

@LunaLuan
Copy link

LunaLuan commented May 15, 2018

Hello there, I can not connect ES-Spark from local to Elasticsearch in server. I think services need dependencces, so I connect Spark to Elasticsearch in servers. This is my code:

es_read_conf = { 
    # specify the node that we are sending data to (this should be the master)    
    "es.nodes" : '17.13.50.21:9200',
            
        # specify the port in case it is not the default port
    "es.port" : '9200',
    
    # specify the read resource in the format 'index/doc-type'
    "es.resource" : "stream-test/sample"
    }

es_rdd = sc.newAPIHadoopRDD(
    inputFormatClass="org.elasticsearch.hadoop.mr.EsInputFormat",
    keyClass="org.apache.hadoop.io.NullWritable", 
    valueClass="org.elasticsearch.hadoop.mr.LinkedMapWritable", 
    conf=es_read_conf)

And I met error:
2018-05-15 18:38:15 ERROR NetworkClient:144 - Node [127.0.0.1:9200] failed (Connection refused: con ect); selected next node [17.13.50.21:9200] 2018-05-15 18:38:19 ERROR NetworkClient:144 - Node [127.0.0.1:9200] failed (Connection refused: con ect); no other nodes left - aborting...

Can you help me? Thank you.

@hemangakbari
Copy link

It is not getting proper jar files

@LunaLuan
Copy link
Author

Thank you. I resolved the problem. I forgot "pyspark --jars ..."

@stevemar
Copy link

closing as the OP said it's resolved.

@pradeep0306
Copy link

I had added to spark submit
libraryDependencies += "org.elasticsearch" %% "elasticsearch-spark-20" % "8.1.1"

and even in spark submit script as --jars elasticsearch-spark-20_2.11-8.1.1.jar

but I am still getting same issue.

22/04/01 01:46:44 ERROR rest.NetworkClient: Node [127.0.0.1:9200] failed (Connection refused (Connection refused)); no other nodes left - aborting...
Exception in thread "main" org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot detect ES version - typically this happens if the network/Elasticsearch cluster is not accessible or when targeting a WAN/Cloud instance without the proper setting 'es.nodes.wan.only'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants