# Can't start newly created river on several active nodes

**URL:** <https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783>\
**Category:** Elasticsearch\
**Created:** [May 21, 2012, 7:48am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783 "2012-05-21T07:48:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikolai\_Muhhin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikolai_muhhin/32/2885_2.png) [@Nikolai\_Muhhin](https://discuss.elastic.co/u/Nikolai_Muhhin)\
**Post date:** [May 21, 2012, 7:48am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/1 "2012-05-21T07:48:53Z")

</div>

I'm trying to implement non-stopping river/mapping update functionality for  
my elasticsearch cluster.  
I have two empty nodes with no rivers or indexes at all. I create new river  
manually using river's API. New river appears in \_river index but it has  
only one document 'meta', and no river's thread started.  
It happens time-to-time, not always.  
What could be problem ?

Thank you!

---

<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:** [May 23, 2012, 9:09pm UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/2 "2012-05-23T21:09:41Z")

</div>

You mean you implemented your own river?

On Mon, May 21, 2012 at 9:48 AM, Nikolai Muhhin [nikolai.muhhin@gmail.com](mailto:nikolai.muhhin@gmail.com)wrote:

> I'm trying to implement non-stopping river/mapping update functionality  
> for my elasticsearch cluster.  
> I have two empty nodes with no rivers or indexes at all. I create new  
> river manually using river's API. New river appears in \_river index but it  
> has only one document 'meta', and no river's thread started.  
> It happens time-to-time, not always.  
> What could be problem ?
> 
> Thank you!

---

<div class="post-metadata">

**Author:** ![Nikolai\_Muhhin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikolai_muhhin/32/2885_2.png) [@Nikolai\_Muhhin](https://discuss.elastic.co/u/Nikolai_Muhhin)\
**Post date:** [May 24, 2012, 8:17am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/3 "2012-05-24T08:17:52Z")

</div>

+kimchy Yes, it implements interface River, using JDBC connection to fetch  
delta data.  
I have JdbcRiverPlugin which extends AbstractPlugin (source code is here  
[https://gist.github.com/2780166](https://gist.github.com/2780166))  
JdbcRiver should start new thread of OracleJdbcIndexer (it's code is here  
[https://gist.github.com/2780170](https://gist.github.com/2780170))

Starting elastic on one single node creates river and fetches data fine.  
But if two empty nodes started and I send request to create river, then  
time to time river does not start. I can't find reason for that and exact  
scenario to call this problem.

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 24, 2012, 3:14pm UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/4 "2012-05-24T15:14:26Z")

</div>

There can only exist one river per type per cluster. Only one node  
should have a running river.

On Thu, May 24, 2012 at 1:17 AM, Nikolai Muhhin  
[nikolai.muhhin@gmail.com](mailto:nikolai.muhhin@gmail.com) wrote:

> +kimchy Yes, it implements interface River, using JDBC connection to fetch  
> delta data.  
> I have JdbcRiverPlugin which extends AbstractPlugin (source code is here  
> [gist:2780166 · GitHub](https://gist.github.com/2780166))  
> JdbcRiver should start new thread of OracleJdbcIndexer (it's code is  
> here [gist:2780170 · GitHub](https://gist.github.com/2780170))
> 
> Starting elastic on one single node creates river and fetches data fine. But  
> if two empty nodes started and I send request to create river, then time to  
> time river does not start. I can't find reason for that and exact scenario  
> to call this problem.

---

<div class="post-metadata">

**Author:** ![Jaroslav\_Judin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaroslav_judin/32/2976_2.png) [@Jaroslav\_Judin](https://discuss.elastic.co/u/Jaroslav_Judin)\
**Post date:** [May 29, 2012, 10:41am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/5 "2012-05-29T10:41:50Z")

</div>

Hello everybody!

I have the similar problem:  
I try to run two rivers consequentially on two-nodes cluster (CouchDB  
rivers).

curl -XPUT 'localhost:9200/\_river/my\_db1/\_meta' -d '{"type" :  
"couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" :  
"my\_couch\_db","filter" : null},  
"index" : {"index" : "kot2","type" :  
"kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings":  
{"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store":  
"yes"}}}'

curl -XPUT 'localhost:9200/\_river/my\_db/\_meta' -d '{"type" :  
"couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" :  
"my\_couch\_db","filter" : null},  
"index" : {"index" : "kot","type" :  
"kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings":  
{"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store":  
"yes"}}}'

The first river is started successfully. The second river cannot be  
started. Only when I stop one of the nodes, the second river starts.

Did I do the things correctly ?

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [May 29, 2012, 10:44am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/6 "2012-05-29T10:44:44Z")

</div>

Hello!

If you look at [http://www.elasticsearch.org/guide/reference/river/](http://www.elasticsearch.org/guide/reference/river/) on the "Cluster Allocation" part it says that rivers are singletons within a cluster. That's why you can create a single river of the same type, but not second one.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

Hello everybody!

I have the similar problem:

I try to run two rivers consequentially on two-nodes cluster (CouchDB rivers).

curl -XPUT 'localhost:9200/\_river/my\_db1/\_meta' -d '{"type" : "couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" : "my\_couch\_db","filter" : null},

"index" : {"index" : "kot2","type" :

"kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings": {"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store": "yes"}}}'

curl -XPUT 'localhost:9200/\_river/my\_db/\_meta' -d '{"type" : "couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" : "my\_couch\_db","filter" : null},

"index" : {"index" : "kot","type" :

"kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings": {"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store": "yes"}}}'

The first river is started successfully. The second river cannot be started. Only when I stop one of the nodes, the second river starts.

Did I do the things correctly ?

---

<div class="post-metadata">

**Author:** ![Jaroslav\_Judin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaroslav_judin/32/2976_2.png) [@Jaroslav\_Judin](https://discuss.elastic.co/u/Jaroslav_Judin)\
**Post date:** [May 29, 2012, 10:58am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/7 "2012-05-29T10:58:27Z")

</div>

Ok, but it works when I use only ONE node.

On Tuesday, May 29, 2012 1:44:44 PM UTC+3, Rafał Kuć wrote:

> Hello!
> 
> If you look at [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/river/) on the  
> "Cluster Allocation" part it says that rivers are singletons within a  
> cluster. That's why you can create a single river of the same type, but not  
> second one.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> - 
> 
> Hello everybody!
> 
> I have the similar problem:  
> I try to run two rivers consequentially on two-nodes cluster (CouchDB  
> rivers).
> 
> curl -XPUT 'localhost:9200/\_river/my\_db1/\_meta' -d '{"type" :  
> "couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" :  
> "my\_couch\_db","filter" : null},  
> "index" : {"index" : "kot2","type" :  
> "kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings":  
> {"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store":  
> "yes"}}}'
> 
> curl -XPUT 'localhost:9200/\_river/my\_db/\_meta' -d '{"type" :  
> "couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" :  
> "my\_couch\_db","filter" : null},  
> "index" : {"index" : "kot","type" :  
> "kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings":  
> {"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store":  
> "yes"}}}'
> 
> The first river is started successfully. The second river cannot be  
> started. Only when I stop one of the nodes, the second river starts.
> 
> Did I do the things correctly ?

---

<div class="post-metadata">

**Author:** ![Jaroslav\_Judin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaroslav_judin/32/2976_2.png) [@Jaroslav\_Judin](https://discuss.elastic.co/u/Jaroslav_Judin)\
**Post date:** [May 30, 2012, 12:39pm UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/8 "2012-05-30T12:39:35Z")

</div>

I mean: several rivers with same type but different names (in RiverName  
scope) can work in cluster that consists ONLY ONE node.  
When cluster has more nodes - the river behavior is unpredictable (can be  
started or cannot).

On Tuesday, May 29, 2012 1:58:27 PM UTC+3, Jaroslav Judin wrote:

> Ok, but it works when I use only ONE node.
> 
> On Tuesday, May 29, 2012 1:44:44 PM UTC+3, Rafał Kuć wrote:
> 
> > Hello!
> > 
> > If you look at [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/river/) on  
> > the "Cluster Allocation" part it says that rivers are singletons within a  
> > cluster. That's why you can create a single river of the same type, but not  
> > second one.
> > 
> > \*--  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > - 
> > 
> > Hello everybody!
> > 
> > I have the similar problem:  
> > I try to run two rivers consequentially on two-nodes cluster (CouchDB  
> > rivers).
> > 
> > curl -XPUT 'localhost:9200/\_river/my\_db1/\_meta' -d '{"type" :  
> > "couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" :  
> > "my\_couch\_db","filter" : null},  
> > "index" : {"index" : "kot2","type" :  
> > "kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings":  
> > {"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store":  
> > "yes"}}}'
> > 
> > curl -XPUT 'localhost:9200/\_river/my\_db/\_meta' -d '{"type" :  
> > "couchdb","couchdb" : {"host" : "localhost","port" : 5984,"db" :  
> > "my\_couch\_db","filter" : null},  
> > "index" : {"index" : "kot","type" :  
> > "kot\_db","bulk\_size" : "100","bulk\_timeout" : "10ms"},"mappings":  
> > {"\_id":{"type": "string","store": "yes"},"name": {"type": "string","store":  
> > "yes"}}}'
> > 
> > The first river is started successfully. The second river cannot be  
> > started. Only when I stop one of the nodes, the second river starts.
> > 
> > Did I do the things correctly ?

---

<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:26am UTC](https://discuss.elastic.co/t/cant-start-newly-created-river-on-several-active-nodes/7783/9 "2017-07-06T03:26:18Z")

</div>


