# Connect to standalone node using TransportClient

**URL:** <https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894>\
**Category:** Elasticsearch\
**Created:** [January 29, 2015, 8:05am UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894 "2015-01-29T08:05:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [January 29, 2015, 8:05am UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/1 "2015-01-29T08:05:15Z")

</div>

Hi all,

I'm running a standalone node (by using _node.local: true_ in  
elasticsearch.yml) and want to connect to this node via TransportClient  
which fails.

Connecting to the node via Sense succeeds.

I didn't change the cluster.name property in elasticsearch.yml.

My Code is:  
Client client = new TransportClient().addTransportAddress(new  
InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));

Result is:  
_Exception in thread "main"  
org.elasticsearch.client.transport.NoNodeAvailableException: None of the  
configured nodes are available: []_

Using  
Settings settings = ImmutableSettings.settingsBuilder().put("node.local",  
"true").build();  
Client client = new TransportClient().addTransportAddress(new  
InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
doesn't help (results in same Exception).

Any ideas what I can do? Is it possible at all to use TransportClient for  
setting up a connection to a standalone node?

Regards,

Abid

--  
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/8cb2153c-a168-4c0e-bbf4-da75c4e8df39%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8cb2153c-a168-4c0e-bbf4-da75c4e8df39%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [January 29, 2015, 1:18pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/2 "2015-01-29T13:18:39Z")

</div>

After doing some research, It seems to me that it is not possible to  
connect to a node configured as _node.local: true_ using TransportClient.

... which leads me to the question:  
What is the recommended way to setup a single node instance and to connect  
to it via Java API?

Regards,

Abid

Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:

> Hi all,
> 
> I'm running a standalone node (by using _node.local: true_ in  
> elasticsearch.yml) and want to connect to this node via TransportClient  
> which fails.
> 
> Connecting to the node via Sense succeeds.
> 
> I didn't change the cluster.name property in elasticsearch.yml.
> 
> My Code is:  
> Client client = new TransportClient().addTransportAddress(new  
> InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> 
> Result is:  
> _Exception in thread "main"  
> org.elasticsearch.client.transport.NoNodeAvailableException: None of the  
> configured nodes are available: []_
> 
> Using  
> Settings settings = ImmutableSettings.settingsBuilder().put("node.local",  
> "true").build();  
> Client client = new TransportClient().addTransportAddress(new  
> InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> doesn't help (results in same Exception).
> 
> Any ideas what I can do? Is it possible at all to use TransportClient for  
> setting up a connection to a standalone node?
> 
> Regards,
> 
> Abid

--  
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/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 29, 2015, 1:35pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/3 "2015-01-29T13:35:33Z")

</div>

What about not setting node.local: true?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 29 janv. 2015 à 14:18, Abid Hussain [hussain@novacom.mygbiz.com](mailto:hussain@novacom.mygbiz.com) a écrit :
> 
> After doing some research, It seems to me that it is not possible to connect to a node configured as node.local: true using TransportClient.
> 
> ... which leads me to the question:  
> What is the recommended way to setup a single node instance and to connect to it via Java API?
> 
> Regards,
> 
> Abid
> 
> Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:
> 
> > Hi all,
> > 
> > I'm running a standalone node (by using node.local: true in elasticsearch.yml) and want to connect to this node via TransportClient which fails.
> > 
> > Connecting to the node via Sense succeeds.
> > 
> > I didn't change the cluster.name property in elasticsearch.yml.
> > 
> > My Code is:  
> > Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> > 
> > Result is:  
> > Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available:
> > 
> > Using  
> > Settings settings = ImmutableSettings.settingsBuilder().put("node.local", "true").build();  
> > Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> > doesn't help (results in same Exception).
> > 
> > Any ideas what I can do? Is it possible at all to use TransportClient for setting up a connection to a standalone node?
> > 
> > Regards,
> > 
> > Abid
> 
> --  
> 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/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%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/044F797E-1C21-4FC6-AFBA-FEF58D7D3A67%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/044F797E-1C21-4FC6-AFBA-FEF58D7D3A67%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [January 29, 2015, 1:43pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/4 "2015-01-29T13:43:47Z")

</div>

Thanks for help. As you can see in the original quesion above, I already  
tried setting node.local: true.

This works on server side, but I'm not able to connect to the node via  
TransportClient using the Java API.

My requirements are:

- run elasticsearch as single node
- Use Java API to perform requests

And my question is: what is the recommend way to fullfill these  
requirements?

Regards,

Abid

Am Donnerstag, 29. Januar 2015 14:36:01 UTC+1 schrieb David Pilato:

> What about not setting node.local: true?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 29 janv. 2015 à 14:18, Abid Hussain \<[hus...@novacom.mygbiz.com](mailto:hus...@novacom.mygbiz.com)  
> \<javascript:\>\> a écrit :
> 
> After doing some research, It seems to me that it is not possible to  
> connect to a node configured as _node.local: true_ using TransportClient.
> 
> ... which leads me to the question:  
> What is the recommended way to setup a single node instance and to connect  
> to it via Java API?
> 
> Regards,
> 
> Abid
> 
> Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:
> 
> > Hi all,
> > 
> > I'm running a standalone node (by using _node.local: true_ in  
> > elasticsearch.yml) and want to connect to this node via TransportClient  
> > which fails.
> > 
> > Connecting to the node via Sense succeeds.
> > 
> > I didn't change the cluster.name property in elasticsearch.yml.
> > 
> > My Code is:  
> > Client client = new TransportClient().addTransportAddress(new  
> > InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> > 
> > Result is:  
> > _Exception in thread "main"  
> > org.elasticsearch.client.transport.NoNodeAvailableException: None of the  
> > configured nodes are available: []_
> > 
> > Using  
> > Settings settings = ImmutableSettings.settingsBuilder().put("node.local",  
> > "true").build();  
> > Client client = new TransportClient().addTransportAddress(new  
> > InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> > doesn't help (results in same Exception).
> > 
> > Any ideas what I can do? Is it possible at all to use TransportClient for  
> > setting up a connection to a standalone node?
> > 
> > Regards,
> > 
> > Abid
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> 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/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 29, 2015, 1:48pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/5 "2015-01-29T13:48:38Z")

</div>

You can also run a Node in your application. But that's another story I guess.

I said "remove node.local".  
Does this work?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 29 janv. 2015 à 14:43, Abid Hussain [hussain@novacom.mygbiz.com](mailto:hussain@novacom.mygbiz.com) a écrit :
> 
> Thanks for help. As you can see in the original quesion above, I already tried setting node.local: true.
> 
> This works on server side, but I'm not able to connect to the node via TransportClient using the Java API.
> 
> My requirements are:
> 
> - run elasticsearch as single node
> - Use Java API to perform requests
> 
> And my question is: what is the recommend way to fullfill these requirements?
> 
> Regards,
> 
> Abid
> 
> Am Donnerstag, 29. Januar 2015 14:36:01 UTC+1 schrieb David Pilato:
> 
> > What about not setting node.local: true?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > > Le 29 janv. 2015 à 14:18, Abid Hussain [hus...@novacom.mygbiz.com](mailto:hus...@novacom.mygbiz.com) a écrit :
> > > 
> > > After doing some research, It seems to me that it is not possible to connect to a node configured as node.local: true using TransportClient.
> > > 
> > > ... which leads me to the question:  
> > > What is the recommended way to setup a single node instance and to connect to it via Java API?
> > > 
> > > Regards,
> > > 
> > > Abid
> > > 
> > > Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:
> > > 
> > > > Hi all,
> > > > 
> > > > I'm running a standalone node (by using node.local: true in elasticsearch.yml) and want to connect to this node via TransportClient which fails.
> > > > 
> > > > Connecting to the node via Sense succeeds.
> > > > 
> > > > I didn't change the cluster.name property in elasticsearch.yml.
> > > > 
> > > > My Code is:  
> > > > Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> > > > 
> > > > Result is:  
> > > > Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available:
> > > > 
> > > > Using  
> > > > Settings settings = ImmutableSettings.settingsBuilder().put("node.local", "true").build();  
> > > > Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> > > > doesn't help (results in same Exception).
> > > > 
> > > > Any ideas what I can do? Is it possible at all to use TransportClient for setting up a connection to a standalone node?
> > > > 
> > > > Regards,
> > > > 
> > > > Abid
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%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/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%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/1AA08330-285A-4FCB-BAB2-43AEF2D12E6D%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/1AA08330-285A-4FCB-BAB2-43AEF2D12E6D%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [January 29, 2015, 1:56pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/6 "2015-01-29T13:56:03Z")

</div>

Sorry, I overread the "not" in you post 😉

Removing _node.local:true_ works in terms that I am then able to connect to  
node via TransportClient.

The reason for using \*node:local:true \*is that _I want to run several  
independent nodes in my network that do not communicate with each other._

...?

Regards,

Abid

Am Donnerstag, 29. Januar 2015 14:49:03 UTC+1 schrieb David Pilato:

> You can also run a Node in your application. But that's another story I  
> guess.
> 
> I said "remove node.local".  
> Does this work?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 29 janv. 2015 à 14:43, Abid Hussain \<[hus...@novacom.mygbiz.com](mailto:hus...@novacom.mygbiz.com)  
> \<javascript:\>\> a écrit :
> 
> Thanks for help. As you can see in the original quesion above, I already  
> tried setting node.local: true.
> 
> This works on server side, but I'm not able to connect to the node via  
> TransportClient using the Java API.
> 
> My requirements are:
> 
> - run elasticsearch as single node
> - Use Java API to perform requests
> 
> And my question is: what is the recommend way to fullfill these  
> requirements?
> 
> Regards,
> 
> Abid
> 
> Am Donnerstag, 29. Januar 2015 14:36:01 UTC+1 schrieb David Pilato:
> 
> > What about not setting node.local: true?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 29 janv. 2015 à 14:18, Abid Hussain [hus...@novacom.mygbiz.com](mailto:hus...@novacom.mygbiz.com) a  
> > écrit :
> > 
> > After doing some research, It seems to me that it is not possible to  
> > connect to a node configured as _node.local: true_ using TransportClient.
> > 
> > ... which leads me to the question:  
> > What is the recommended way to setup a single node instance and to  
> > connect to it via Java API?
> > 
> > Regards,
> > 
> > Abid
> > 
> > Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:
> > 
> > > Hi all,
> > > 
> > > I'm running a standalone node (by using _node.local: true_ in  
> > > elasticsearch.yml) and want to connect to this node via TransportClient  
> > > which fails.
> > > 
> > > Connecting to the node via Sense succeeds.
> > > 
> > > I didn't change the cluster.name property in elasticsearch.yml.
> > > 
> > > My Code is:  
> > > Client client = new TransportClient().addTransportAddress(new  
> > > InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> > > 
> > > Result is:  
> > > _Exception in thread "main"  
> > > org.elasticsearch.client.transport.NoNodeAvailableException: None of the  
> > > configured nodes are available: []_
> > > 
> > > Using  
> > > Settings settings =  
> > > ImmutableSettings.settingsBuilder().put("node.local", "true").build();  
> > > Client client = new TransportClient().addTransportAddress(new  
> > > InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> > > doesn't help (results in same Exception).
> > > 
> > > Any ideas what I can do? Is it possible at all to use TransportClient  
> > > for setting up a connection to a standalone node?
> > > 
> > > Regards,
> > > 
> > > Abid
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > 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/0b3caa38-6c11-45b0-ab6d-d5436d125726%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b3caa38-6c11-45b0-ab6d-d5436d125726%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 29, 2015, 2:07pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/7 "2015-01-29T14:07:57Z")

</div>

So disable multicast and you are done.  
See elasticsearch.yml file comments.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 29 janv. 2015 à 14:56, Abid Hussain [hussain@novacom.mygbiz.com](mailto:hussain@novacom.mygbiz.com) a écrit :
> 
> Sorry, I overread the "not" in you post 😉
> 
> Removing node.local:true works in terms that I am then able to connect to node via TransportClient.
> 
> The reason for using node:local:true is that I want to run several independent nodes in my network that do not communicate with each other.
> 
> ...?
> 
> Regards,
> 
> Abid
> 
> Am Donnerstag, 29. Januar 2015 14:49:03 UTC+1 schrieb David Pilato:
> 
> > You can also run a Node in your application. But that's another story I guess.
> > 
> > I said "remove node.local".  
> > Does this work?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > > Le 29 janv. 2015 à 14:43, Abid Hussain [hus...@novacom.mygbiz.com](mailto:hus...@novacom.mygbiz.com) a écrit :
> > > 
> > > Thanks for help. As you can see in the original quesion above, I already tried setting node.local: true.
> > > 
> > > This works on server side, but I'm not able to connect to the node via TransportClient using the Java API.
> > > 
> > > My requirements are:
> > > 
> > > - run elasticsearch as single node
> > > - Use Java API to perform requests
> > > 
> > > And my question is: what is the recommend way to fullfill these requirements?
> > > 
> > > Regards,
> > > 
> > > Abid
> > > 
> > > Am Donnerstag, 29. Januar 2015 14:36:01 UTC+1 schrieb David Pilato:
> > > 
> > > > What about not setting node.local: true?
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > > Le 29 janv. 2015 à 14:18, Abid Hussain [hus...@novacom.mygbiz.com](mailto:hus...@novacom.mygbiz.com) a écrit :
> > > > > 
> > > > > After doing some research, It seems to me that it is not possible to connect to a node configured as node.local: true using TransportClient.
> > > > > 
> > > > > ... which leads me to the question:  
> > > > > What is the recommended way to setup a single node instance and to connect to it via Java API?
> > > > > 
> > > > > Regards,
> > > > > 
> > > > > Abid
> > > > > 
> > > > > Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:
> > > > > 
> > > > > > Hi all,
> > > > > > 
> > > > > > I'm running a standalone node (by using node.local: true in elasticsearch.yml) and want to connect to this node via TransportClient which fails.
> > > > > > 
> > > > > > Connecting to the node via Sense succeeds.
> > > > > > 
> > > > > > I didn't change the cluster.name property in elasticsearch.yml.
> > > > > > 
> > > > > > My Code is:  
> > > > > > Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> > > > > > 
> > > > > > Result is:  
> > > > > > Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available:
> > > > > > 
> > > > > > Using  
> > > > > > Settings settings = ImmutableSettings.settingsBuilder().put("node.local", "true").build();  
> > > > > > Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> > > > > > doesn't help (results in same Exception).
> > > > > > 
> > > > > > Any ideas what I can do? Is it possible at all to use TransportClient for setting up a connection to a standalone node?
> > > > > > 
> > > > > > Regards,
> > > > > > 
> > > > > > Abid
> > > > > 
> > > > > --  
> > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%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/0b3caa38-6c11-45b0-ab6d-d5436d125726%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b3caa38-6c11-45b0-ab6d-d5436d125726%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/B5A92B4C-182D-4411-BAAC-B7FCDA36F8AD%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/B5A92B4C-182D-4411-BAAC-B7FCDA36F8AD%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jurgen\_Wagner\_DVT](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Jurgen\_Wagner\_DVT](https://discuss.elastic.co/u/Jurgen_Wagner_DVT)\
**Post date:** [January 29, 2015, 2:25pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/8 "2015-01-29T14:25:32Z")

</div>

Hello Abid,  
you may bind the Elasticsearch network/transport interface to  
127.0.0.1, prohibiting any connections from outside the local machine.  
This will effectively give you a fully-functional local node with  
transport connections enabled locally - not over the network from other  
machines. This is a desirable configuration if you have, e.g., a single  
node Elasticsearch co-located with an application using it, and the  
search instance may only be accessed through that application (the  
"application" could also be an SSL tunnel).

If you want to run separate clusters with a known master topology, use  
the unicast discovery configuration to restrict which nodes will talk  
to which others. This won't prohibit, howver, any node from opening  
transports to any one of these clusters as the Elasticsearch instances  
will be fully visible on the network (in contrast to the situation when  
you use 127.0.0.1). This is an optimization of the communication  
overhead in a multi-instance network avoiding multicast.

So, pick your favourite solution.

Best regards,  
--Jürgen

On 29.01.2015 14:43, Abid Hussain wrote:

> Thanks for help. As you can see in the original quesion above, I  
> already tried setting node.local: true.
> 
> This works on server side, but I'm not able to connect to the node via  
> TransportClient using the Java API.
> 
> My requirements are:
> 
> - run elasticsearch as single node
> - Use Java API to perform requests
> 
> And my question is: what is the recommend way to fullfill these  
> requirements?
> 
> Regards,
> 
> Abid

--

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С  
уважением  
_i.A. Jürgen Wagner_  
Head of Competence Center "Intelligence"  
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany  
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543  
E-Mail: [juergen.wagner@devoteam.com](mailto:juergen.wagner@devoteam.com)  
[mailto:juergen.wagner@devoteam.com](mailto:juergen.wagner@devoteam.com), URL: [www.devoteam.de](http://www.devoteam.de)  
[http://www.devoteam.de/](http://www.devoteam.de/)

* * *

Managing Board: Jürgen Hatzipantelis (CEO)  
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:  
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071

--  
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/54CA42DC.80609%40devoteam.com](https://groups.google.com/d/msgid/elasticsearch/54CA42DC.80609%40devoteam.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Abid\_Hussain](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abid\_Hussain](https://discuss.elastic.co/u/Abid_Hussain)\
**Post date:** [January 29, 2015, 2:48pm UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/9 "2015-01-29T14:48:55Z")

</div>

Thanks to both, David and Jürgen.

I used Davids solution which works well for know and keep in mind Jürgens  
proposal for production installation.

Best regards,

Abid

Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:

> Hi all,
> 
> I'm running a standalone node (by using _node.local: true_ in  
> elasticsearch.yml) and want to connect to this node via TransportClient  
> which fails.
> 
> Connecting to the node via Sense succeeds.
> 
> I didn't change the cluster.name property in elasticsearch.yml.
> 
> My Code is:  
> Client client = new TransportClient().addTransportAddress(new  
> InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> 
> Result is:  
> _Exception in thread "main"  
> org.elasticsearch.client.transport.NoNodeAvailableException: None of the  
> configured nodes are available: []_
> 
> Using  
> Settings settings = ImmutableSettings.settingsBuilder().put("node.local",  
> "true").build();  
> Client client = new TransportClient().addTransportAddress(new  
> InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));  
> doesn't help (results in same Exception).
> 
> Any ideas what I can do? Is it possible at all to use TransportClient for  
> setting up a connection to a standalone node?
> 
> Regards,
> 
> Abid

--  
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/93d984c6-410a-4099-801f-1da4addd5d8f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/93d984c6-410a-4099-801f-1da4addd5d8f%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, 12:35am UTC](https://discuss.elastic.co/t/connect-to-standalone-node-using-transportclient/21894/10 "2017-07-06T00:35:55Z")

</div>


