Connect to standalone node using TransportClient

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8cb2153c-a168-4c0e-bbf4-da75c4e8df39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

What about not setting node.local: true?

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

Le 29 janv. 2015 à 14:18, Abid Hussain 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/044F797E-1C21-4FC6-AFBA-FEF58D7D3A67%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:18, Abid Hussain <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 <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?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:43, Abid Hussain 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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:18, Abid Hussain 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1AA08330-285A-4FCB-BAB2-43AEF2D12E6D%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Sorry, I overread the "not" in you post :wink:

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:43, Abid Hussain <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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:18, Abid Hussain 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.
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?utm_medium=email&utm_source=footer
.
For more options, visit 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 <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?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0b3caa38-6c11-45b0-ab6d-d5436d125726%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

Le 29 janv. 2015 à 14:56, Abid Hussain hussain@novacom.mygbiz.com a écrit :

Sorry, I overread the "not" in you post :wink:

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:43, Abid Hussain 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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 29 janv. 2015 à 14:18, Abid Hussain 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/851a2596-b9ef-459d-aab0-9884e46b3870%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0b3caa38-6c11-45b0-ab6d-d5436d125726%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/B5A92B4C-182D-4411-BAAC-B7FCDA36F8AD%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

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, URL: 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/54CA42DC.80609%40devoteam.com.
For more options, visit https://groups.google.com/d/optout.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/93d984c6-410a-4099-801f-1da4addd5d8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.