# IndexMissingException when indexing document on non-existent index

**URL:** <https://discuss.elastic.co/t/indexmissingexception-when-indexing-document-on-non-existent-index/23446>\
**Category:** Elasticsearch\
**Created:** [April 28, 2015, 5:50pm UTC](https://discuss.elastic.co/t/indexmissingexception-when-indexing-document-on-non-existent-index/23446 "2015-04-28T17:50:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbakarcic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakarcic/32/728_2.png) [@dbakarcic](https://discuss.elastic.co/u/dbakarcic)\
**Post date:** [April 28, 2015, 5:50pm UTC](https://discuss.elastic.co/t/indexmissingexception-when-indexing-document-on-non-existent-index/23446/1 "2015-04-28T17:50:26Z")

</div>

Hello,

I'm running into an IndexMissingException when indexing a document on a  
non-existent index on my application tests. I'm using elasticsearch 1.4.1  
running as a local node for testing purposes as following:

private lazy val node =  
nodeBuilder().clusterName(clusterName).local(true).settings(settings).build

The index is supposed to be auto created when indexing a document for the  
first time. The curious thing is that I can reproduce this issue  
systematically only on our jenkins server, which rans the application  
tests. On my local development environment, the exception is rarely  
reproduced. This makes me think about a race condition somewhere between  
the index creation and the actual document indexing.

Below is the complete exception stack trace:

org.elasticsearch.indices.IndexMissingException: [index-name] missing  
at  
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.doStart(TransportShardReplicationOperationAction.java:361)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.start(TransportShardReplicationOperationAction.java:342)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction.doExecute(TransportShardReplicationOperationAction.java:97)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.index.TransportIndexAction.innerExecute(TransportIndexAction.java:134)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.index.TransportIndexAction.access$000(TransportIndexAction.java:60)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.index.TransportIndexAction$1.onResponse(TransportIndexAction.java:94)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.index.TransportIndexAction$1.onResponse(TransportIndexAction.java:91)  
~[elasticsearch-1.4.1.jar:na]  
at  
org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:113)  
~[elasticsearch-1.4.1.jar:na]  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
~[na:1.7.0\_40]  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
~[na:1.7.0\_40]  
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0\_40]

¿Does anyone ran into this issue before? ¿Can you help me figure out what  
might be the problem?

Thanks in advance,  
Damián.

--  
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/5bcd5922-7991-4897-8c70-ed780dcff7b6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5bcd5922-7991-4897-8c70-ed780dcff7b6%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, 12:17am UTC](https://discuss.elastic.co/t/indexmissingexception-when-indexing-document-on-non-existent-index/23446/2 "2017-07-06T00:17:18Z")

</div>


