Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

River will not start (Log Included) #560

Open
CindyConway opened this issue Sep 23, 2015 · 0 comments
Open

River will not start (Log Included) #560

CindyConway opened this issue Sep 23, 2015 · 0 comments

Comments

@CindyConway
Copy link

Every time I try to get my river flowing the status is START_FAILED. After a lot of research, I have run out of things to try. I have put the details of the log at the bottom, but the relevant line appears to be:

[2015-09-23 14:09:05,899][WARN ][org.elasticsearch.river.mongodb.MongoDBRiver] Failed to start river mongodbcom.mongodb.MongoException: not authorized for query on local.system.namespaces

but I have tried everything I can find online related to this error and nothing seems to work.

System Configuration

Mongo 2.6.6 (replicaset: a primary, a secondary, and an arbiter)
Elasticsearch 1.4.2
ES River 2.0.5

User Configuration in Mongo

indexofrecords:PRIMARY> db.getUsers()
[
        {
                "_id" : "index_of_records.elasticsearch_river",
                "user" : "elasticsearch_river",
                "db" : "index_of_records",
                "roles" : [
                        {
                                "role" : "read",
                                "db" : "index_of_records"
                        },
                        {
                                "role" : "read",
                                "db" : "local"
                        }
                ]
        }
]

Accessing local.oplog.rs(logged in as elasticsearch_river)

indexofrecords:PRIMARY> db.oplog.rs.findOne();
{
        "ts" : Timestamp(1435455901, 1),
        "h" : NumberLong("-5167618069921233052"),
        "v" : 2,
        "op" : "u",
        "ns" : "index_of_records.schedules",
        "o2" : {
                "_id" : ObjectId("558dd3cd8517084327d35b44")
        },
        "o" : {
                "_id" : ObjectId("558dd3cd8517084327d35b44"),
                "history" : [
                        {
                                "status" : "REMOVE_FROM_SEARCHABLE"
                        }
                ]
        }
}

I use Sense to set the River's config

PUT /_river/mongodb/_meta
{
  "index": {
    "name": "index_of_records",
    "type": "record_types"
  },
  "mongodb": {
    "db": "index_of_records",
    "servers": [
      {
        "port": "27021",
        "host": "mean-db1"
      }
    ],
    "collection": "elasticsearch_fmt"
  },
  "credentials": [
    {
      "db": "local",
      "auth":"index_of_records",
      "user": "elasticsearch_river",
      "password": "SECRET"
    }
  ],
  "type": "mongodb"
}

The log (with logging configured per Wiki)

2015-09-23 14:07:57,522][INFO ][node                     ] [Night Nurse] version[1.4.5], pid[22997], build[2aaf797/2015-04-27T08:06:06Z]
[2015-09-23 14:07:57,523][INFO ][node                     ] [Night Nurse] initializing ...
[2015-09-23 14:07:57,603][INFO ][plugins                  ] [Night Nurse] loaded [mongodb-river, mapper-attachments, marvel], sites [marvel, river-mongodb]
[2015-09-23 14:08:00,655][TRACE][rest.action.mongodb      ] [Night Nurse] RestMongoDBRiverAction - baseUrl: /_river/mongodb
[2015-09-23 14:08:01,111][INFO ][node                     ] [Night Nurse] initialized
[2015-09-23 14:08:01,111][INFO ][node                     ] [Night Nurse] starting ...
[2015-09-23 14:08:01,231][INFO ][transport                ] [Night Nurse] bound_address {inet[/0.0.0.0:9300]}, publish_address {inet[/10.250.40.201:9300]}
[2015-09-23 14:08:01,265][INFO ][discovery                ] [Night Nurse] elasticsearch/-B6pBR4ISDqFgkmyyXIYXw
[2015-09-23 14:08:05,036][INFO ][cluster.service          ] [Night Nurse] new_master [Night Nurse][-B6pBR4ISDqFgkmyyXIYXw][MEAN-DB1][inet[/10.250.40.201:9300]], reason: zen-disco-join (elected_as_master)
[2015-09-23 14:08:05,171][INFO ][http                     ] [Night Nurse] bound_address {inet[/0.0.0.0:9200]}, publish_address {inet[/10.250.40.201:9200]}
[2015-09-23 14:08:05,172][INFO ][node                     ] [Night Nurse] started
[2015-09-23 14:08:06,641][INFO ][gateway                  ] [Night Nurse] recovered [6] indices into cluster_state
[2015-09-23 14:08:09,302][TRACE][org.elasticsearch.river.mongodb.MongoDBRiver] Initializing river : [mongodb]
[2015-09-23 14:08:09,307][TRACE][river.mongodb            ] Parse river settings for mongodb
[2015-09-23 14:08:09,318][TRACE][river.mongodb            ] mongoServersSettings: [{port=27021, host=mean-db1}]
[2015-09-23 14:08:09,318][TRACE][river.mongodb            ] Server: mean-db1 - 27021
[2015-09-23 14:08:09,370][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] MongoDB River Plugin - version[2.0.5] - hash[c11c5ae] - time[2014-12-18T12:08:22Z]
[2015-09-23 14:08:09,372][ERROR][org.elasticsearch.river.mongodb.MongoDBRiver] Cannot start river mongodb. Current status is START_FAILED
[2015-09-23 14:08:54,481][DEBUG][rest.action.mongodb      ] [Night Nurse] uri: /_river/mongodb/mongodb/delete?
[2015-09-23 14:08:54,481][DEBUG][rest.action.mongodb      ] [Night Nurse] action: delete
[2015-09-23 14:08:54,481][INFO ][rest.action.mongodb      ] [Night Nurse] Delete river: mongodb
[2015-09-23 14:08:54,538][INFO ][cluster.metadata         ] [Night Nurse] [[_river]] remove_mapping [[mongodb]]
[2015-09-23 14:08:54,542][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] Closing river mongodb
[2015-09-23 14:08:54,543][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] Stopping river mongodb
[2015-09-23 14:08:54,543][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] Stopped river mongodb
[2015-09-23 14:08:54,561][DEBUG][rest.action.mongodb      ] [Night Nurse] uri: /_river/mongodb/list?
[2015-09-23 14:08:54,561][DEBUG][rest.action.mongodb      ] [Night Nurse] action: list
[2015-09-23 14:08:54,568][TRACE][rest.action.mongodb      ] [Night Nurse] totalHits: 0
[2015-09-23 14:09:05,631][INFO ][cluster.metadata         ] [Night Nurse] [_river] update_mapping [mongodb] (dynamic)
[2015-09-23 14:09:05,637][TRACE][org.elasticsearch.river.mongodb.MongoDBRiver] Initializing river : [mongodb]
[2015-09-23 14:09:05,638][TRACE][river.mongodb            ] Parse river settings for mongodb
[2015-09-23 14:09:05,638][TRACE][river.mongodb            ] mongoServersSettings: [{port=27021, host=mean-db1}]
[2015-09-23 14:09:05,638][TRACE][river.mongodb            ] Server: mean-db1 - 27021
[2015-09-23 14:09:05,640][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] MongoDB River Plugin - version[2.0.5] - hash[c11c5ae] - time[2014-12-18T12:08:22Z]
[2015-09-23 14:09:05,648][INFO ][river.mongodb.util       ] setRiverStatus called with mongodb - RUNNING
[2015-09-23 14:09:05,650][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] River mongodb startup pending
[2015-09-23 14:09:05,656][INFO ][cluster.metadata         ] [Night Nurse] [_river] update_mapping [mongodb] (dynamic)
[2015-09-23 14:09:05,657][TRACE][org.elasticsearch.river.mongodb.StatusChecker] About to start river: mongodb
[2015-09-23 14:09:05,668][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] Starting river mongodb
[2015-09-23 14:09:05,669][INFO ][org.elasticsearch.river.mongodb.MongoDBRiver] MongoDB options: secondaryreadpreference [false], drop_collection [false], include_collection [], throttlesize [5000], gridfs [false], filter [null], db [index_of_records], collection [elasticsearch_fmt], script [null], indexing to [index_of_records]/[record_types]
[2015-09-23 14:09:05,669][DEBUG][org.elasticsearch.river.mongodb.MongoDBRiver] Using MongoDB server(s): host [mean-db1], port [27021]
[2015-09-23 14:09:05,676][INFO ][cluster.metadata         ] [Night Nurse] [_river] update_mapping [mongodb] (dynamic)
[2015-09-23 14:09:05,679][INFO ][river.mongodb            ] [Night Nurse] Creating MongoClient for [[mean-db1:27021]]
[2015-09-23 14:09:05,899][WARN ][org.elasticsearch.river.mongodb.MongoDBRiver] Failed to start river mongodbcom.mongodb.MongoException: not authorized for query on local.system.namespaces
        at com.mongodb.QueryResultIterator.throwOnQueryFailure(QueryResultIterator.java:214)
        at com.mongodb.QueryResultIterator.init(QueryResultIterator.java:198)
        at com.mongodb.QueryResultIterator.initFromQueryResponse(QueryResultIterator.java:176)
        at com.mongodb.QueryResultIterator.<init>(QueryResultIterator.java:64)
        at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:86)
        at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:66)
        at com.mongodb.DB.getCollectionNames(DB.java:512)
        at org.elasticsearch.river.mongodb.MongoConfigProvider.ensureIsReplicaSet(MongoConfigProvider.java:50)
        at org.elasticsearch.river.mongodb.MongoConfigProvider.call(MongoConfigProvider.java:42)
        at org.elasticsearch.river.mongodb.MongoDBRiver$1.run(MongoDBRiver.java:259)
        at java.lang.Thread.run(Thread.java:745)
[2015-09-23 14:09:05,902][INFO ][river.mongodb.util       ] setRiverStatus called with mongodb - START_FAILED
[2015-09-23 14:09:08,528][DEBUG][rest.action.mongodb      ] [Night Nurse] uri: /_river/mongodb/list?
[2015-09-23 14:09:08,528][DEBUG][rest.action.mongodb      ] [Night Nurse] action: list
[2015-09-23 14:09:08,530][TRACE][rest.action.mongodb      ] [Night Nurse] totalHits: 1
[2015-09-23 14:09:08,530][TRACE][river.mongodb            ] Parse river settings for mongodb
[2015-09-23 14:09:08,531][TRACE][river.mongodb            ] mongoServersSettings: [{port=27021, host=mean-db1}]
[2015-09-23 14:09:08,531][TRACE][river.mongodb            ] Server: mean-db1 - 27021
[2015-09-23 14:09:08,535][TRACE][rest.action.mongodb      ] [Night Nurse] source: {
  "index": {
    "name": "index_of_records",
    "type": "record_types"
  },
  "mongodb": {
    "db": "index_of_records",
    "servers": [
      {
        "port": "27021",
        "host": "mean-db1"
      }
    ],
    "collection": "elasticsearch_fmt"
  },
  "credentials": [
    {
      "db": "local",
      "auth":"index_of_records",
      "user": "elasticsearch_river",
      "password": "SECRET"
    }
  ],
  "type": "mongodb"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant