elasticsearch-river-mongodb icon indicating copy to clipboard operation
elasticsearch-river-mongodb copied to clipboard

Cannot start river mongodb. Current status is START_FAILED

Open Guibod opened this issue 10 years ago • 4 comments

Despite many tries, i can't manage to get river-mongodb to work on my local machine (ubuntu)

I'm using

  • MongoDb 2.6.6 (installed from mongodb-org official repository)
  • ElasticSearch 1.4.2 (from official repository)
  • River-mongodb 2.0.5

The exception is silent despite this configuration

guibod@Crymson-Dynamo:~$ cat /etc/elasticsearch/logging.yml 
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
  river.mongodb: TRACE
  rest.action: TRACE
  org.elasticsearch.river.mongodb: TRACE
  river: TRACE

My guess is that mongodb connection fail for some reason. I've tuned my /etc/hosts and replicaset settings to avoid some mess around ubuntu ip settings. On the other hand Mongo is not bound to 127.0.0.1 anymore.

[2015-01-06 00:57:30,064][INFO ][node                     ] [Arize] version[1.4.2], pid[18178], build[927caff/2014-12-16T14:11:12Z]
[2015-01-06 00:57:30,065][INFO ][node                     ] [Arize] initializing ...
[2015-01-06 00:57:30,085][INFO ][plugins                  ] [Arize] loaded [mongodb-river], sites [river-mongodb]
[2015-01-06 00:57:34,509][TRACE][rest.action.mongodb      ] [Arize] RestMongoDBRiverAction - baseUrl: /_river/mongodb
[2015-01-06 00:57:34,710][INFO ][node                     ] [Arize] initialized
[2015-01-06 00:57:34,710][INFO ][node                     ] [Arize] starting ...
[2015-01-06 00:57:34,882][INFO ][transport                ] [Arize] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.0.12:9300]}
[2015-01-06 00:57:34,911][INFO ][discovery                ] [Arize] elasticsearch/gQVw31KzR4ShIZQYXCz1Gg
[2015-01-06 00:57:38,693][INFO ][cluster.service          ] [Arize] new_master [Arize][gQVw31KzR4ShIZQYXCz1Gg][Crymson-Dynamo][inet[/192.168.0.12:9300]], reason: zen-disco-join (elected_as_master)
[2015-01-06 00:57:38,698][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: execute
[2015-01-06 00:57:38,698][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: no change in cluster_state
[2015-01-06 00:57:38,734][INFO ][http                     ] [Arize] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.0.12:9200]}
[2015-01-06 00:57:38,734][INFO ][node                     ] [Arize] started
[2015-01-06 00:57:39,794][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: execute
[2015-01-06 00:57:39,841][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: no change in cluster_state
[2015-01-06 00:57:39,861][INFO ][gateway                  ] [Arize] recovered [2] indices into cluster_state
[2015-01-06 00:57:39,953][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: execute
[2015-01-06 00:57:40,024][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: no change in cluster_state
[2015-01-06 00:57:40,204][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: execute
[2015-01-06 00:57:40,205][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: no change in cluster_state
[2015-01-06 00:57:40,594][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: execute
[2015-01-06 00:57:40,602][DEBUG][river.routing            ] [Arize] _river/mongodb/_meta document found.
[2015-01-06 00:57:40,605][DEBUG][river.routing            ] [Arize] going to allocate river [mongodb] on node [Arize][gQVw31KzR4ShIZQYXCz1Gg][Crymson-Dynamo][inet[/192.168.0.12:9300]]
[2015-01-06 00:57:40,606][TRACE][river.cluster            ] [Arize] cluster state updated:
version [1], source [reroute_rivers_node_changed]

[2015-01-06 00:57:40,608][DEBUG][river.cluster            ] [Arize] processing [reroute_rivers_node_changed]: done applying updated cluster_state
[2015-01-06 00:57:40,613][DEBUG][river                    ] [Arize] creating river [mongodb][mongodb]
[2015-01-06 00:57:40,624][TRACE][org.elasticsearch.river.mongodb.MongoDBRiver] Initializing river : [mongodb]
[2015-01-06 00:57:40,626][TRACE][river.mongodb            ] Parse river settings for mongodb
[2015-01-06 00:57:40,634][TRACE][river.mongodb            ] mongoServersSettings: [{port=27017, host=localhost}]
[2015-01-06 00:57:40,634][TRACE][river.mongodb            ] Server: localhost - 27017
[2015-01-06 00:57:40,660][TRACE][river.mongodb            ] mongoOptionsSettings: {secondary_read_preference=true}
[2015-01-06 00:57:40,670][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] MongoDB River Plugin - version[2.0.5] - hash[c11c5ae] - time[2014-12-18T12:08:22Z]
[2015-01-06 00:57:40,674][ERROR][org.elasticsearch.river.mongodb.MongoDBRiver] Cannot start river mongodb. Current status is START_FAILED

What is wrong with my setting ?

Guibod avatar Jan 06 '15 00:01 Guibod

Can you please try to delete the river, restart ES and recreate it? Then send the log again.

richardwilly98 avatar Jan 06 '15 12:01 richardwilly98

It now works. Thanks for your help.

What did i do:

  • Checked replicaset members:
    • removed hostname occurences
    • replaced them by 127.0.0.1 IP
  • Checked my /etc/hosts, and removed 127.0.1.1 occurence for my own computer
  • Removed my rivers
curl -XDELETE 'http://localhost:9200/_river/mongodb'
  • Restart elasticsearch and mongod
  • Added river
curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
  "type": "mongodb",
  "mongodb": {
    "servers": [ { "host": "127.0.0.1", "port": 27017 } ],
     "db": "my_mongodb_db",
     "collection": "my_mongodb_collection"
  },
  "index": {
    "name": "my_elasticsearch_index",
    "type": "my_elasticsearch_type"
  }
}'

Guibod avatar Jan 06 '15 19:01 Guibod

@Guibod Thank you so much for your information! I had same error but it solved now!

y3llowmoon avatar Feb 04 '15 07:02 y3llowmoon

@Guibod I also encountered the same problem , how you solve it?

tianxf305 avatar Jul 07 '15 07:07 tianxf305