Is there a way to use TransportClient that will use all available servers in the cluster without specifically specifying them?

Hi,

I have several environments (test & production) that have elasticsearch
clusters.
I would like to use the TransportClient and give it the cluster name and
have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I
get an exception:

org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?

I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,

Ron

--

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,
Ron

--

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically
use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't
hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch
clusters.
I would like to use the TransportClient and give it the cluster name and
have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress)
I get an exception:

org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?

I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,

Ron

--

--

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:
You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,
Ron

--

--

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more nodes
if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the
TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically
use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't
hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch
clusters.
I would like to use the TransportClient and give it the cluster name and
have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress)
I get an exception:

org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?

I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,

Ron

--

--

--

Imagine you have a webapp with a transport client to your cluster of 20 nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will fail. Your webapp does not know other nodes yet as you did not give another node address.

So you have a cluster with 19 nodes working but you won't be able to provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,
Ron

--

--

--

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group, send email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other servers?

What exactly does the sniff option do?

Thanks again for your help,
Ron

On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:

Imagine you have a webapp with a transport client to your cluster of 20
nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will
fail. Your webapp does not know other nodes yet as you did not give another
node address.

So you have a cluster with 19 nodes working but you won't be able to
provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more nodes
if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the
TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically
use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't
hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch
clusters.
I would like to use the TransportClient and give it the cluster name and
have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using
addTransportAddress) I get an exception:

org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?

I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,

Ron

--

--

--

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Yes. So the more nodes your transport client is aware of, the more chance you will have to be able to start your app.
Sniff option let the user decide if your app will only work with given addresses (default to false) or if once started, the TransportClient will ask to the master node information about other nodes and will connect then to them.

If you need auto discovering without giving nodes address, only using the cluster name, you have to use a NodeClient.

Documentation here explain that: Elasticsearch Platform — Find real-time answers at scale | Elastic

Does it help?

Le 29 janv. 2013 à 09:16, Ron Sher ron.sher@gmail.com a écrit :

yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other servers?

What exactly does the sniff option do?

Thanks again for your help,
Ron

On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:
Imagine you have a webapp with a transport client to your cluster of 20 nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will fail. Your webapp does not know other nodes yet as you did not give another node address.

So you have a cluster with 19 nodes working but you won't be able to provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:
Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:
You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,
Ron

--

--

--

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

The document isn't clear enough for me (you explain it much better, thanks
:slight_smile: )

If I don't specify the sniff option, will it automatically get information
on all nodes and be able to use nodes that I don't explicitly specify?
Do I need to do .put("client.transport.sniff", true) for the client to use
other nodes I didn't specify?

Thanks again,
Ron

On Tue, Jan 29, 2013 at 10:24 AM, David Pilato david@pilato.fr wrote:

Yes. So the more nodes your transport client is aware of, the more chance
you will have to be able to start your app.
Sniff option let the user decide if your app will only work with given
addresses (default to false) or if once started, the TransportClient will
ask to the master node information about other nodes and will connect then
to them.

If you need auto discovering without giving nodes address, only using the
cluster name, you have to use a NodeClient.

Documentation here explain that:
Elasticsearch Platform — Find real-time answers at scale | Elastic

Does it help?

Le 29 janv. 2013 à 09:16, Ron Sher ron.sher@gmail.com a écrit :

yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other
servers?

What exactly does the sniff option do?

Thanks again for your help,
Ron

On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:

Imagine you have a webapp with a transport client to your cluster of 20
nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will
fail. Your webapp does not know other nodes yet as you did not give another
node address.

So you have a cluster with 19 nodes working but you won't be able to
provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more
nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the
TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically
use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't
hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch
clusters.
I would like to use the TransportClient and give it the cluster name
and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using
addTransportAddress) I get an exception:

org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?

I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,

Ron

--

--

--

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

You have to specify .put("client.transport.sniff", true) if you want that your embedded TransportClient connect also to other nodes you did not specify.

Le 29 janv. 2013 à 09:53, Ron Sher ron.sher@gmail.com a écrit :

The document isn't clear enough for me (you explain it much better, thanks :slight_smile: )

If I don't specify the sniff option, will it automatically get information on all nodes and be able to use nodes that I don't explicitly specify?
Do I need to do .put("client.transport.sniff", true) for the client to use other nodes I didn't specify?

Thanks again,
Ron

On Tue, Jan 29, 2013 at 10:24 AM, David Pilato david@pilato.fr wrote:
Yes. So the more nodes your transport client is aware of, the more chance you will have to be able to start your app.
Sniff option let the user decide if your app will only work with given addresses (default to false) or if once started, the TransportClient will ask to the master node information about other nodes and will connect then to them.

If you need auto discovering without giving nodes address, only using the cluster name, you have to use a NodeClient.

Documentation here explain that: Elasticsearch Platform — Find real-time answers at scale | Elastic

Does it help?

Le 29 janv. 2013 à 09:16, Ron Sher ron.sher@gmail.com a écrit :

yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other servers?

What exactly does the sniff option do?

Thanks again for your help,
Ron

On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:
Imagine you have a webapp with a transport client to your cluster of 20 nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will fail. Your webapp does not know other nodes yet as you did not give another node address.

So you have a cluster with 19 nodes working but you won't be able to provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:
Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:
You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,
Ron

--

--

--

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Are there any implications (like performance hit or others) that I should
consider to not use sniff?
I wandering why this is not the default behavior

Thanks,
Ron

On Tue, Jan 29, 2013 at 10:56 AM, David Pilato david@pilato.fr wrote:

You have to specify .put("client.transport.sniff", true) if you want that
your embedded TransportClient connect also to other nodes you did not
specify.

Le 29 janv. 2013 à 09:53, Ron Sher ron.sher@gmail.com a écrit :

The document isn't clear enough for me (you explain it much better, thanks
:slight_smile: )

If I don't specify the sniff option, will it automatically get information
on all nodes and be able to use nodes that I don't explicitly specify?
Do I need to do .put("client.transport.sniff", true) for the client to
use other nodes I didn't specify?

Thanks again,
Ron

On Tue, Jan 29, 2013 at 10:24 AM, David Pilato david@pilato.fr wrote:

Yes. So the more nodes your transport client is aware of, the more chance
you will have to be able to start your app.
Sniff option let the user decide if your app will only work with given
addresses (default to false) or if once started, the TransportClient will
ask to the master node information about other nodes and will connect then
to them.

If you need auto discovering without giving nodes address, only using the
cluster name, you have to use a NodeClient.

Documentation here explain that:
Elasticsearch Platform — Find real-time answers at scale | Elastic

Does it help?

Le 29 janv. 2013 à 09:16, Ron Sher ron.sher@gmail.com a écrit :

yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other
servers?

What exactly does the sniff option do?

Thanks again for your help,
Ron

On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:

Imagine you have a webapp with a transport client to your cluster of 20
nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will
fail. Your webapp does not know other nodes yet as you did not give another
node address.

So you have a cluster with 19 nodes working but you won't be able to
provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more
nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the
TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client
automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only
node.
Just start a client only node. It will be part of the cluster but
won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have
elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name
and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using
addTransportAddress) I get an exception:

org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?

I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,

Ron

--

--

--

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

No. I don't see any bad side effect.

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

Le 30 janv. 2013 à 07:49, Ron Sher ron.sher@gmail.com a écrit :

Are there any implications (like performance hit or others) that I should consider to not use sniff?
I wandering why this is not the default behavior

Thanks,
Ron

On Tue, Jan 29, 2013 at 10:56 AM, David Pilato david@pilato.fr wrote:

You have to specify .put("client.transport.sniff", true) if you want that your embedded TransportClient connect also to other nodes you did not specify.

Le 29 janv. 2013 à 09:53, Ron Sher ron.sher@gmail.com a écrit :

The document isn't clear enough for me (you explain it much better, thanks :slight_smile: )

If I don't specify the sniff option, will it automatically get information on all nodes and be able to use nodes that I don't explicitly specify?
Do I need to do .put("client.transport.sniff", true) for the client to use other nodes I didn't specify?

Thanks again,
Ron

On Tue, Jan 29, 2013 at 10:24 AM, David Pilato david@pilato.fr wrote:

Yes. So the more nodes your transport client is aware of, the more chance you will have to be able to start your app.
Sniff option let the user decide if your app will only work with given addresses (default to false) or if once started, the TransportClient will ask to the master node information about other nodes and will connect then to them.

If you need auto discovering without giving nodes address, only using the cluster name, you have to use a NodeClient.

Documentation here explain that: Elasticsearch Platform — Find real-time answers at scale | Elastic

Does it help?

Le 29 janv. 2013 à 09:16, Ron Sher ron.sher@gmail.com a écrit :

yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other servers?

What exactly does the sniff option do?

Thanks again for your help,
Ron

On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:

Imagine you have a webapp with a transport client to your cluster of 20 nodes.

You shutdown the web app for maintenance and restart it.

But, in your cluster, your node 1 is not working.

When you restart your webapp, it will try to connect to node1 but will fail. Your webapp does not know other nodes yet as you did not give another node address.

So you have a cluster with 19 nodes working but you won't be able to provide search for your users.

Make sense?

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

Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :

Thanks again for your quick reply.

Could you please elaborate a bit? Why would you recommend using more nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?

Thanks,
Ron

On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:

Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the TransportClient.

David.

Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :

Thanks for the quick reply.

What happens when I supply only 1 address? Will the client automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?

Thanks again,
Ron

On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:

You have to know at least one address when using transport client.

What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.

HTH

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

Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :

Hi,

I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.

When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available

Tried setting .put("discovery.enabled", true), but that didn't seem to help.

Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)

Thanks for you help,
Ron

--

--

--

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

If you disable "sniffing", you can't have failover (in case the node the
transport client is connected to leaves the cluster for example). So
"sniffing" is better OOTB experience - it works more reliable.

Jörg

Am 30.01.13 07:49, schrieb Ron Sher:

Are there any implications (like performance hit or others) that I
should consider to not use sniff?
I wandering why this is not the default behavior

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

I think I'm missing something. Sniffing isn't enabled oob. I need to enable
it
בתאריך 30 בינו 2013 11:14, מאת "Jörg Prante" joergprante@gmail.com:

If you disable "sniffing", you can't have failover (in case the node the
transport client is connected to leaves the cluster for example). So
"sniffing" is better OOTB experience - it works more reliable.

Jörg

Am 30.01.13 07:49, schrieb Ron Sher:

Are there any implications (like performance hit or others) that I should
consider to not use sniff?
I wandering why this is not the default behavior

--
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.comelasticsearch%2Bunsubscribe@googlegroups.com
.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.