# Org.elasticsearch.indices.IndexMissingException: \[\_river\] missing

**URL:** <https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827>\
**Category:** Elasticsearch\
**Created:** [October 2, 2013, 2:24pm UTC](https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827 "2013-10-02T14:24:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vozerov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vozerov/32/2073_2.png) [@vozerov](https://discuss.elastic.co/u/vozerov)\
**Post date:** [October 2, 2013, 2:24pm UTC](https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827/1 "2013-10-02T14:24:49Z")

</div>

Good day!

I have a problem... or misconfiguration 🙂

I have installed [https://github.com/sksamuel/elasticsearch-river-redis](https://github.com/sksamuel/elasticsearch-river-redis)  
plugin and add configuration to it:

curl -XPUT '[http://localhost:9200/\_river/redisriver/\_meta](http://localhost:9200/_river/redisriver/_meta)' -d '{  
"type": "redis",  
"redis": {  
"hostname": "localhost",  
"port" : "6379",  
"json" : false,  
"messageField" : "content",  
"channels": "test-channel"  
},  
"index": {  
"name": "test-redis",  
}  
}'

And after stop/start elasticsearch I see the following errors:

1-73:0.90.5 vozerov$ elasticsearch -f  
[2013-10-02 18:18:52,593][INFO][node] [Achebe]  
version[0.90.5], pid[96444], build[c8714e8/2013-09-17T12:50:20Z]  
[2013-10-02 18:18:52,593][INFO][node] [Achebe]  
initializing ...  
[2013-10-02 18:18:52,606][INFO][plugins] [Achebe] loaded  
[river-redis], sites []  
[2013-10-02 18:18:54,968][INFO][node] [Achebe]  
initialized  
[2013-10-02 18:18:54,968][INFO][node] [Achebe]  
starting ...  
[2013-10-02 18:18:55,080][INFO][transport] [Achebe]  
bound\_address {inet[/127.0.0.1:9300]}, publish\_address  
{inet[/127.0.0.1:9300]}  
[2013-10-02 18:18:58,110][INFO][cluster.service] [Achebe]  
new\_master [Achebe][ThLe6gTURWSNcUn6ctixGw][inet[/127.0.0.1:9300]], reason:  
zen-disco-join (elected\_as\_master)  
[2013-10-02 18:18:58,137][INFO][discovery] [Achebe]  
elasticsearch\_vozerov/ThLe6gTURWSNcUn6ctixGw  
[2013-10-02 18:18:58,151][INFO][http] [Achebe]  
bound\_address {inet[/127.0.0.1:9200]}, publish\_address  
{inet[/127.0.0.1:9200]}  
[2013-10-02 18:18:58,151][INFO][node] [Achebe] started  
[2013-10-02 18:18:58,174][DEBUG][action.get] [Achebe]  
[\_river][0]: failed to execute [[\_river][river-redis][\_meta]: routing  
[null]]  
org.elasticsearch.indices.IndexMissingException: [\_river] missing  
at  
org.elasticsearch.indices.InternalIndicesService.indexServiceSafe(InternalIndicesService.java:334)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:96)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:42)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction$1.run(TransportShardSingleOperationAction.java:161)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:722)  
[2013-10-02 18:18:58,705][INFO][gateway] [Achebe]  
recovered [2] indices into cluster\_state  
[2013-10-02 18:18:58,730][DEBUG][action.get] [Achebe]  
[\_river][0]: failed to execute [[\_river][river-redis][\_meta]: routing  
[null]]  
org.elasticsearch.index.shard.IllegalIndexShardStateException: [\_river][0]  
CurrentState[RECOVERING] operations only allowed when started/relocated  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.readAllowed(InternalIndexShard.java:704)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.get(InternalIndexShard.java:415)  
at  
org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:167)  
at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:101)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:103)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:42)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction$1.run(TransportShardSingleOperationAction.java:161)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:722)  
[2013-10-02 18:18:58,732][WARN][river.routing] [Achebe] failed  
to get/parse \_meta for [river-redis]  
org.elasticsearch.index.shard.IllegalIndexShardStateException: [\_river][0]  
CurrentState[RECOVERING] operations only allowed when started/relocated  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.readAllowed(InternalIndexShard.java:704)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.get(InternalIndexShard.java:415)  
at  
org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:167)  
at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:101)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:103)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:42)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction$1.run(TransportShardSingleOperationAction.java:161)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:722)  
[2013-10-02 18:18:58,803][DEBUG][action.get] [Achebe]  
[\_river][0]: failed to execute [[\_river][river-redis][\_meta]: routing  
[null]]  
org.elasticsearch.index.shard.IllegalIndexShardStateException: [\_river][0]  
CurrentState[RECOVERING] operations only allowed when started/relocated  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.readAllowed(InternalIndexShard.java:704)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.get(InternalIndexShard.java:415)  
at  
org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:167)  
at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:101)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:103)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:42)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction$1.run(TransportShardSingleOperationAction.java:161)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:722)  
[2013-10-02 18:18:58,804][WARN][river.routing] [Achebe] failed  
to get/parse \_meta for [river-redis]  
org.elasticsearch.index.shard.IllegalIndexShardStateException: [\_river][0]  
CurrentState[RECOVERING] operations only allowed when started/relocated  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.readAllowed(InternalIndexShard.java:704)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.get(InternalIndexShard.java:415)  
at  
org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:167)  
at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:101)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:103)  
at  
org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:42)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction$1.run(TransportShardSingleOperationAction.java:161)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:722)  
[2013-10-02 18:18:58,932][INFO  
][org.elasticsearch.plugin.river.redis.RedisSubscriber] Starting redis  
subscriber

But river plugin works well... So is it critical errors, or something else?  
Can somebody explain it...

Merci, have a nice day 🙂

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Karol\_Gwaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karol_gwaj/32/1324_2.png) [@Karol\_Gwaj](https://discuss.elastic.co/u/Karol_Gwaj)\
**Post date:** [October 10, 2013, 3:06pm UTC](https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827/2 "2013-10-10T15:06:58Z")

</div>

+1 Im getting this same error

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 10, 2013, 3:47pm UTC](https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827/3 "2013-10-10T15:47:40Z")

</div>

Hey,

dont worry about it too much, the message is not criticial as the river is  
started up anyway (it is just retrying shortly after and then the river  
starts up successfully). Furthermore the stack trace should go away with  
the next release, see

> <https://github.com/elastic/elasticsearch/commit/abcf8fc0f775b701cd3e06656f25a16f75675c92>
>
> Due to a change in 0.90 some exceptions may show up when starting a river,
> even …though this is not a problem as the shard has not been initialized
> yet and a retry is scheduled.

can you test it (maybe the 0.90 branch) and report back?

--Alex

On Thu, Oct 10, 2013 at 5:06 PM, Karol Gwaj [karol@gwaj.me](mailto:karol@gwaj.me) wrote:

> +1 Im getting this same error
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![amorais](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@amorais](https://discuss.elastic.co/u/amorais)\
**Post date:** [October 24, 2013, 3:13pm UTC](https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827/4 "2013-10-24T15:13:35Z")

</div>

Hi Alex,

```
I'm having the same problem and you're right when you say that the river starts up anyway. However, in my case even though it was a oneshot river it fires up a complete set of bulk requests and ends up duplicating the document count.

Here is the sequence:

```

1. "org.elasticsearch.indices.IndexMissingException: [\_river] missing"

2. "failed to execute [[\_river][clfb\_anoeee20131024152941\_river][\_meta]: routing [null]]  
org.elasticsearch.index.shard.IllegalIndexShardStateException: [\_river][0] CurrentState[RECOVERING] operations only allowed when started/relocated (...)"

3. "failed to get/parse \_meta for [clfb\_anoeee20131024152941\_river]  
org.elasticsearch.index.shard.IllegalIndexShardStateException: [\_river][0] CurrentState[RECOVERING] operations only allowed when started/relocated"

4. "[clfb\_anoeee20131024152941\_river] starting JDBC river: URL [jdbc:mysql://localhost:3306/clfb\_anoeee], driver [com.mysql.jdbc.Driver], strategy [oneshot], index [clfb\_anoeee20131024152941]/[jdbc]"

5. "Sending mapping updated to master: index [\_river] type [clfb\_anoeee20131024152941\_river]"

And then it repeats this step and it repeats "starting JDBC river" step (4) - I'm guessing that this is the reason the duplicates...

This is tbe repetition:

1. "Sending mapping updated to master: index [\_river] type [clfb\_anoeee20131024152941\_river]"
2. "update\_mapping [clfb\_anoeee20131024152941\_river] (dynamic)"
3. "[clfb\_anoeee20131024152941\_river] starting JDBC river: URL [jdbc:mysql://localhost:3306/clfb\_anoeee], driver [com.mysql.jdbc.Driver], strategy [oneshot], index [clfb\_anoeee20131024152941]/[jdbc]"

Do you have any suggestions as to how I might fix this? The problem only occurs on shutdown and occurs in all of our ES installations (0.90.5 - with latest JDBC-river versions).

```
       -- André
```

---

<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, 2:10am UTC](https://discuss.elastic.co/t/org-elasticsearch-indices-indexmissingexception--river-missing/13827/5 "2017-07-06T02:10:46Z")

</div>


