# Specifying cluster name from pig

**URL:** <https://discuss.elastic.co/t/specifying-cluster-name-from-pig/18874>\
**Category:** Elasticsearch\
**Created:** [July 24, 2014, 5:34pm UTC](https://discuss.elastic.co/t/specifying-cluster-name-from-pig/18874 "2014-07-24T17:34:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajeis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajeis/32/3489_2.png) [@ajeis](https://discuss.elastic.co/u/ajeis)\
**Post date:** [July 24, 2014, 5:34pm UTC](https://discuss.elastic.co/t/specifying-cluster-name-from-pig/18874/1 "2014-07-24T17:34:43Z")

</div>

Hi,

I'm trying to insert data into elasticsearch from pig. I can insert into ES  
on the same node as Pig just fine, but when I try to insert it into ES on  
another node, I'm running into errors. I'm using the following command -

STORE result INTO 'medi/hps\_with\_prev' USING  
org.elasticsearch.hadoop.pig.EsStorage ('es.http.timeout = 5m',  
'es.index.auto.create = true', 'es.nodes=es-name:9210');

My cluster and node name is 'es-name' and http port is 9210. I'm running  
into the following error -

Connection error (check network and/or proxy settings)- all nodes failed;  
tried [[es-name:9210]]

What am I missing?

--  
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/ab7cb546-4d07-4465-9ff9-6532f829ee01%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ab7cb546-4d07-4465-9ff9-6532f829ee01%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![ajeis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajeis/32/3489_2.png) [@ajeis](https://discuss.elastic.co/u/ajeis)\
**Post date:** [July 28, 2014, 6:52pm UTC](https://discuss.elastic.co/t/specifying-cluster-name-from-pig/18874/2 "2014-07-28T18:52:06Z")

</div>

Can anyone help me on this? How do I specify the settings in  
elasticsearch-hadoop when ES node and Hadoop node are not co-located?

On Thursday, July 24, 2014 10:34:43 AM UTC-7, ashish jain wrote:

> Hi,
> 
> I'm trying to insert data into elasticsearch from pig. I can insert into  
> ES on the same node as Pig just fine, but when I try to insert it into ES  
> on another node, I'm running into errors. I'm using the following command -
> 
> STORE result INTO 'medi/hps\_with\_prev' USING  
> org.elasticsearch.hadoop.pig.EsStorage ('es.http.timeout = 5m',  
> 'es.index.auto.create = true', 'es.nodes=es-name:9210');
> 
> My cluster and node name is 'es-name' and http port is 9210. I'm running  
> into the following error -
> 
> Connection error (check network and/or proxy settings)- all nodes failed;  
> tried [[es-name:9210]]
> 
> What am I missing?

--  
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/708c85e2-2b90-4319-9e69-9e3fd5151acd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/708c85e2-2b90-4319-9e69-9e3fd5151acd%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:** [July 29, 2014, 7:45am UTC](https://discuss.elastic.co/t/specifying-cluster-name-from-pig/18874/3 "2014-07-29T07:45:35Z")

</div>

You need to specify the nodes IP not cluster name. In other words, take  
some nodes (you don't need all) from your Elasticsearch cluster, identify  
their IP and port and specify those within es.nodes. You can also use host  
names but in general, IPs are recommended since they tend to last longer  
(and avoids misconfigured DNSs).

So your es.nodes would look something like: 10.0.0.1, 192.168.1.1, etc....

Cheers,

On Monday, July 28, 2014 9:52:06 PM UTC+3, ashish jain wrote:

> Can anyone help me on this? How do I specify the settings in  
> elasticsearch-hadoop when ES node and Hadoop node are not co-located?
> 
> On Thursday, July 24, 2014 10:34:43 AM UTC-7, ashish jain wrote:
> 
> > Hi,
> > 
> > I'm trying to insert data into elasticsearch from pig. I can insert into  
> > ES on the same node as Pig just fine, but when I try to insert it into ES  
> > on another node, I'm running into errors. I'm using the following command -
> > 
> > STORE result INTO 'medi/hps\_with\_prev' USING  
> > org.elasticsearch.hadoop.pig.EsStorage ('es.http.timeout = 5m',  
> > 'es.index.auto.create = true', 'es.nodes=es-name:9210');
> > 
> > My cluster and node name is 'es-name' and http port is 9210. I'm running  
> > into the following error -
> > 
> > Connection error (check network and/or proxy settings)- all nodes failed;  
> > tried [[es-name:9210]]
> > 
> > What am I missing?

--  
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/924ec110-f026-407b-8fb7-882a2f598fe1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/924ec110-f026-407b-8fb7-882a2f598fe1%40googlegroups.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, 1:12am UTC](https://discuss.elastic.co/t/specifying-cluster-name-from-pig/18874/4 "2017-07-06T01:12:37Z")

</div>


