# Elasticsearch always leaves unassigned shards on startup

**URL:** <https://discuss.elastic.co/t/elasticsearch-always-leaves-unassigned-shards-on-startup/17594>\
**Category:** Elasticsearch\
**Created:** [May 19, 2014, 4:07pm UTC](https://discuss.elastic.co/t/elasticsearch-always-leaves-unassigned-shards-on-startup/17594 "2014-05-19T16:07:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![f13ts](https://avatars.discourse-cdn.com/v4/letter/f/13edae/32.png) [@f13ts](https://discuss.elastic.co/u/f13ts)\
**Post date:** [May 19, 2014, 4:07pm UTC](https://discuss.elastic.co/t/elasticsearch-always-leaves-unassigned-shards-on-startup/17594/1 "2014-05-19T16:07:39Z")

</div>

Hi,

Just getting started with ES. I'm integrating it into my Play! 2  
application using the scalastic scala wrapper for the java API.

I can happily index & retrieve documents, but ONLY if I delete and recreate  
my index every time the application starts, which is pretty useless.

I have a Gist showing how I start and stop a node when my application boots  
up/shuts down:

> <https://gist.github.com/anonymous/cb60c8b5ad9d777c31ec>

and here is what my Elasticsearch-head page looks like after starting up  
the app without recreating the index:

[http://imgur.com/eA6AF4u](http://imgur.com/eA6AF4u)

Which shows yellow status, however curl -XGET  
'[http://localhost:9200/\_cluster/health](http://localhost:9200/_cluster/health) returns RED status, and that's also  
what my application reports!

Many thanks for any help/advice,

A

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2ccab4a0-6529-40eb-9f12-fc7abf10b313%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ccab4a0-6529-40eb-9f12-fc7abf10b313%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:28am UTC](https://discuss.elastic.co/t/elasticsearch-always-leaves-unassigned-shards-on-startup/17594/2 "2017-07-06T01:28:26Z")

</div>

Closed on July 6, 2017, 1:28am UTC


