Closed Newbas closed 8 years ago
How are you connecting to the mongo instance?
From application I use Env variable MONGO_URL, and i log It on server it is mongodb://perch:3c4c5f28126aa6565ec5d973ad29b0dc@dokku-mongo-perch:27017/perch.
Throught dokku mongo:connect perch i just connect to it, but i cant edit users, i get message that i dont have rights.
Yes it is for mongo:connect,
but within application i see this Failed to authenticate perch@perch with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document
And after i see Unauthorized not authorized on perch to execute command { insert: "events", documents: [ {...}]}
Checking mongo driver also.
On localhost with manually setuped mongo driver works fine.
The thing to mention i got this error only within app, when connected with dokku mongo:connect i can create collection and add documents.
Can you provide a sample application that has this issue?
Here is application https://github.com/Newbas/mongotest Index page tries to insert new document into collection.
Sorry, it looks like i found the problem and it is with app. I will test a little bit more and update.
Yes sorry now i have same issue with local manual installation. Sorry for taking your time, and thank you for your responses.
when mongo name same as app name(such as admin
) will cause "Authentication failed", maybe dokku connect to your app container, not your mongo container.
and when name exsits, mongo:create will not print info. just "wait container to be ready."
@pynixwang mind filing a new issue for your errors?
Hey Guys,
First of all thank you for your work, it help a lot.
I am trying to use this plugin on Digital Ocean server, and setup mongodb it works, and my application Scala Play! + Ractive Mongo connects to database, but could not do any thing.
I got this error in Mongo logs
Failed to authenticate perch@perch with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document.
As i search, problem because user created wrongly and now i need to recreate user. The thing is that i am new to doker and dokku, and i trying to find out how to connect to db, because if i connect with use of telnet through your plugin i can not do anything with user.
Thanks.