Unassigned shards after node close

I have 6 indices, running 3 clusters. each index has 1 shard. there are total of 10k documents, and total of 20mb.

I index those documents using JAVA API in a process, and during indexing and querying everything works fine. But if I terminate that process after all the indexing and searching is done, some nodes go unassigned and cluster health goes red.
If I let the process keep up and running, nodes are all assigned and cluster health is green.

What could be the reason for that?

Hi,

It seems like you are creating a new node with the Java API and then after
you close that node (terminate the process) your cluster can't locate the
shards. Could you please try initializing Elasticsearch client by using:

Node node = nodeBuilder().client(true).node();

Or you can also use the TransportClient.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/

W dniu niedziela, 15 kwietnia 2012 00:17:20 UTC+2 użytkownik Orcun Simsek
napisał:

I have 6 indices, running 3 clusters. each index has 1 shard. there are
total
of 10k documents, and total of 20mb.

I index those documents using JAVA API in a process, and during indexing
and
querying everything works fine. But if I terminate that process after all
the indexing and searching is done, some nodes go unassigned and cluster
health goes red.
If I let the process keep up and running, nodes are all assigned and
cluster
health is green.

What could be the reason for that?

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/unassigned-shards-after-node-close-tp3910996p3910996.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Initializing with client set to true worked! Thanks!

Now, if i set the node using client = true, i get failed to find analyzer exception in an analyze, which is not being thrown if i dont set client true.

Are you sure the client gets connected to the cluster?

On Sun, Apr 15, 2012 at 6:40 PM, android orcunsimsek@gmail.com wrote:

Now, if i set the node using client = true, i get failed to find analyzer
exception in an analyze, which is not being thrown if i dont set client
true.

builder.java · GitHub

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/unassigned-shards-after-node-close-tp3910996p3912124.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.