# Es spark with local elasticsearch listening on non default ports

**URL:** https://discuss.elastic.co/t/es-spark-with-local-elasticsearch-listening-on-non-default-ports/23498
**Category:** Elasticsearch
**Created:** [April 30, 2015, 3:34pm UTC](https://discuss.elastic.co/t/es-spark-with-local-elasticsearch-listening-on-non-default-ports/23498 "2015-04-30T15:34:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![israel](https://avatars.discourse-cdn.com/v4/letter/i/b77776/32.png) [@israel](https://discuss.elastic.co/u/israel)
#### Post date: [April 30, 2015, 3:34pm UTC](https://discuss.elastic.co/t/es-spark-with-local-elasticsearch-listening-on-non-default-ports/23498/1 "2015-04-30T15:34:44Z")

</div>

Hi,

I am using es-spark\_2.11-2.1.0.Beta4 on Spark 1.3.1 shell against  
elasticsearch 1.4.4.

I have elasticsearch settings:

http.port: 9201

transport.tcp.port: 9301

I am setting the port in conf/spark-defaults.conf:

spark.es.port 9201

creating an esRdd works fine, however, trying an operation on it, like  
esRdd.count, get stuck on recurring timeouts.

Thanks,

Israel

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/41251e78-c2d3-4dc1-a5b2-0d432ea0cdac%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/41251e78-c2d3-4dc1-a5b2-0d432ea0cdac%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)
#### Post date: [April 30, 2015, 7:26pm UTC](https://discuss.elastic.co/t/es-spark-with-local-elasticsearch-listening-on-non-default-ports/23498/2 "2015-04-30T19:26:38Z")

</div>

Since the RDD is created lazily, there's no validation done during its  
declaration - the actual logic behind it is executed when an operation  
(like count) is performed. It looks like the nodes are not properly  
accessed; potentially the port is not being picked up.  
Can you try passing the es.node configuration through the SparkConf  
object and see whether that makes a difference? If that doesn't work,  
please enable logging on the rest package [1] and check whether the  
proper nodes (and ports) are properly accessed.  
If that's not the case, please raise an issue [2]

Cheers,

[1] [Logging | Elasticsearch for Apache Hadoop [master] | Elastic](http://www.elastic.co/guide/en/elasticsearch/hadoop/master/logging.html)  
[2] [Troubleshooting | Elasticsearch for Apache Hadoop [master] | Elastic](http://www.elastic.co/guide/en/elasticsearch/hadoop/master/troubleshooting.html#help)

On Thu, Apr 30, 2015 at 6:34 PM, Israel Klein [israel.klein@gmail.com](mailto:israel.klein@gmail.com) wrote:

> Hi,
> 
> I am using es-spark\_2.11-2.1.0.Beta4 on Spark 1.3.1 shell against  
> elasticsearch 1.4.4.
> 
> I have elasticsearch settings:
> 
> http.port: 9201
> 
> transport.tcp.port: 9301
> 
> I am setting the port in conf/spark-defaults.conf:
> 
> spark.es.port 9201
> 
> creating an esRdd works fine, however, trying an operation on it, like  
> esRdd.count, get stuck on recurring timeouts.
> 
> Thanks,
> 
> Israel
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/41251e78-c2d3-4dc1-a5b2-0d432ea0cdac%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/41251e78-c2d3-4dc1-a5b2-0d432ea0cdac%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAJogdmeNrGmuXx7BAOBpLAC0rFVZND81jy5m6Ez87Yab%2BJLOoQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJogdmeNrGmuXx7BAOBpLAC0rFVZND81jy5m6Ez87Yab%2BJLOoQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 6, 2017, 12:16am UTC](https://discuss.elastic.co/t/es-spark-with-local-elasticsearch-listening-on-non-default-ports/23498/3 "2017-07-06T00:16:34Z")

</div>


