mongodb.uri=${MONGODB_URI}
where MONGODB_URI is a config var defined in Heroku to map to the URL provided by the Mongo add-on.
When I deploy my application, I see this when I try to load a page:
ReactiveMongoPlugin starting... ReactiveMongoPlugin successfully started with db ‘myDB’! Servers: [server1:port] [server2:port] Application started (Prod) State changed from starting to up
(then when first page loaded) DatabaseException['not authorized for query on collection’ (code = 13)]
This happens for every page that is first loaded on deploy. After that, things seem to work though on occasion I've seen the same error thereafter.
Can you tell me what might be causing this? Could this be a matter of the plugin configuration or the Mongo instance configuration on Heroku?
Thanks.
2015-10-25T17:23:09.664+0800 D - [conn22] User Assertion: 13:not authorized for query on XXXXX
2015-10-25T17:23:09.664+0800 I QUERY [conn22] assertion 13 not authorized for query on XXXXX ns: XXXXX query:{}
and then shortly afterwards,
2015-10-25T17:23:09.665+0800 I ACCESS [conn22] Successfully authenticated as principal XXXXX on posts
#MongoDB
mongodb.uri = "mongodb://localhost:27017/mydb"
mongodb.uri = ${?MONGOLAB_URI}