# Failed to execute phase \[initial\]

**URL:** <https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867>\
**Category:** Elasticsearch\
**Created:** [November 14, 2011, 3:51pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867 "2011-11-14T15:51:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlagorce](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vlagorce/32/2764_2.png) [@vlagorce](https://discuss.elastic.co/u/vlagorce)\
**Post date:** [November 14, 2011, 3:51pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867/1 "2011-11-14T15:51:56Z")

</div>

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](https://gist.github.com/1364233)

---

<div class="post-metadata">

**Author:** ![vlagorce](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vlagorce/32/2764_2.png) [@vlagorce](https://discuss.elastic.co/u/vlagorce)\
**Post date:** [November 14, 2011, 5:06pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867/2 "2011-11-14T17:06:03Z")

</div>

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](mailto: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](https://gist.github.com/1364233)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 15, 2011, 12:02pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867/3 "2011-11-15T12:02:07Z")

</div>

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](mailto: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](mailto: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](https://gist.github.com/1364233)

---

<div class="post-metadata">

**Author:** ![vlagorce](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vlagorce/32/2764_2.png) [@vlagorce](https://discuss.elastic.co/u/vlagorce)\
**Post date:** [November 21, 2011, 12:12pm UTC](https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867/4 "2011-11-21T12:12:35Z")

</div>

Thanks for the explanation.

On Nov 15, 1:02 pm, Shay Banon [kim...@gmail.com](mailto: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](mailto: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](mailto: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](https://gist.github.com/1364233)

---

<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, 3:48am UTC](https://discuss.elastic.co/t/failed-to-execute-phase-initial/5867/5 "2017-07-06T03:48:05Z")

</div>


