Failed to execute phase [initial]


(vlagorce) #1

Hello ES-folks,

I get a strange behavior with my embeded ES.

In my development environment with the following configuration (see
gist) when I start my application I create the index (if it doesn't
exist). When tomcat is started I run a search in my empty index and
get no error.

I stop tomcat (cleanly) and restart it. I run the same research and I
get " Failed to execute phase [initial], No indices / shards to search
on, requested indices are []"

What's wrong ? If I delete the data folder and restart I get
nothing....and again after restarting.

Regards,

gist : https://gist.github.com/1364233


(vlagorce) #2

I found something but I don't understand the behavior.

In my servletListener when my server stopped I was running two
method.

-> admin.close(Requests.closeIndexRequest(indexName)); // admin is
an instance of IndicesAdminClient
-> node.close();

After removing the first method I don't have the error anymore. When
should I need to use a closeIndexRequest ?

On Nov 14, 4:51 pm, vlag vlago...@gmail.com wrote:

Hello ES-folks,

I get a strange behavior with my embeded ES.

In my development environment with the following configuration (see
gist) when I start my application I create the index (if it doesn't
exist). When tomcat is started I run a search in my empty index and
get no error.

I stop tomcat (cleanly) and restart it. I run the same research and I
get " Failed to execute phase [initial], No indices / shards to search
on, requested indices are []"

What's wrong ? If I delete the data folder and restart I get
nothing....and again after restarting.

Regards,

gist :https://gist.github.com/1364233


(Shay Banon) #3

If you close the index, then you can't really search on it, so what happens
is that the search says that it has no indices to search on. You don't need
to close the index on shutdown, the idea of a closed index is to keep the
index around in the cluster (date wise), but nothing much more (can't do
any operation against it).

The message is a bit misleading, mainly stemming from the fact to try and
support searching over several indices, and not breaking over when some of
them are closed.

On Mon, Nov 14, 2011 at 7:06 PM, vlag vlagorce@gmail.com wrote:

I found something but I don't understand the behavior.

In my servletListener when my server stopped I was running two
method.

-> admin.close(Requests.closeIndexRequest(indexName)); // admin is
an instance of IndicesAdminClient
-> node.close();

After removing the first method I don't have the error anymore. When
should I need to use a closeIndexRequest ?

On Nov 14, 4:51 pm, vlag vlago...@gmail.com wrote:

Hello ES-folks,

I get a strange behavior with my embeded ES.

In my development environment with the following configuration (see
gist) when I start my application I create the index (if it doesn't
exist). When tomcat is started I run a search in my empty index and
get no error.

I stop tomcat (cleanly) and restart it. I run the same research and I
get " Failed to execute phase [initial], No indices / shards to search
on, requested indices are []"

What's wrong ? If I delete the data folder and restart I get
nothing....and again after restarting.

Regards,

gist :https://gist.github.com/1364233


(vlagorce) #4

Thanks for the explanation.

On Nov 15, 1:02 pm, Shay Banon kim...@gmail.com wrote:

If you close the index, then you can't really search on it, so what happens
is that the search says that it has no indices to search on. You don't need
to close the index on shutdown, the idea of a closed index is to keep the
index around in the cluster (date wise), but nothing much more (can't do
any operation against it).

The message is a bit misleading, mainly stemming from the fact to try and
support searching over several indices, and not breaking over when some of
them are closed.

On Mon, Nov 14, 2011 at 7:06 PM, vlag vlago...@gmail.com wrote:

I found something but I don't understand the behavior.

In my servletListener when my server stopped I was running two
method.

-> admin.close(Requests.closeIndexRequest(indexName)); // admin is
an instance of IndicesAdminClient
-> node.close();

After removing the first method I don't have the error anymore. When
should I need to use a closeIndexRequest ?

On Nov 14, 4:51 pm, vlag vlago...@gmail.com wrote:

Hello ES-folks,

I get a strange behavior with my embeded ES.

In my development environment with the following configuration (see
gist) when I start my application I create the index (if it doesn't
exist). When tomcat is started I run a search in my empty index and
get no error.

I stop tomcat (cleanly) and restart it. I run the same research and I
get " Failed to execute phase [initial], No indices / shards to search
on, requested indices are []"

What's wrong ? If I delete the data folder and restart I get
nothing....and again after restarting.

Regards,

gist :https://gist.github.com/1364233


(system) #5