-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Mongo db v3.4 seems to be causing parse server authentication errors #5659
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
Comments
I believe that you are getting this because parse-server is failing to connect to your mongo. The unhelpful message is just when the first operation attempted during server startup fails. You should double and triple check your connection string, db username and password, port, etc. |
acinader thanks for reaching out. I agree completely. It seems to the a problem with mongo v3.4 not v3.2. So right now my 3.2 runs fine with Parse Server but I can not get Parse Server to correctly authenticate with mongo v3.4 |
@OpConTech I do not believe that this is a parse issue. We don't test specifically against v3.4 (or 3.2 for that matter.) We test against 3.6.9 and 4.0.4 (you can see here: https://travis-ci.org/parse-community/parse-server). However, I strongly suspect that this is a configuration issue on your part (sorry to say ;)). Validate your connection string programmatically by connecting independently of parse server. Make sure you take the connection string from the config output when you start the server. Is the user and its credentials properly configured on the new db; is new db server reachable from the parse host, etc. etc. can you enable logging on the database server? Can you see the client connect? |
Perhaps is has to do with the fact that Mongo changes the User Role permissions in v3.4 Compatibility Changes in MongoDB 3.4 |
Oh ok. I did not know that you were testing with v3.6. |
@acinader thanks to you letting me know that Parse Server tests with 3.6 and 4.0 I had more confidence that it was a config issue on my end. I was focused on the username and pw but if you look carefully the copied link from a mongo instance also leaves the name of the database blank . Once I replaced that with my database name I was able to correctly get Parse Server to connect to mongo v3.4. mongodb://dbuser:dbpassword@ds235717-ax.rrrr99.geronomot.mlab.com:333333,ds171717171-a1.cwn70.fleet.mlab.com:35717/dbname?replicaSet=rs-ds171717171&ssl=true mongodb://sampleusername:[email protected]:333333,ds171717171-a1.cwn70.fleet.mlab.com:35717/dontForgetYourDbNameHere?replicaSet=rs-ds171717171&ssl=true So no mongo 3.4 issue and this thread is ready to close. Thank you for your help and collaboration. |
Hi Parse Server Team,
Tomorrow Mongo is forcing updates from v3.2 to v3.4.
I have been trying to test Parse Server v3.2.3 with Mongo v3.4.
When I run this config Parse Server is not crashing but is having lots of recurring warnings.
Issue Description
There are multiple warnings in the error log on start up:
warn: Unable to ensure uniqueness for usernames: message=Authentication failed., stack=MongoError: Authentication failed.
I looked at issue #2269 - Warnings: Unable to ensure uniqueness for usernames
#2699
but that issue never did get to the root cause. Also FYI my mongo db username is not email and does not have any special characters alike @.
I am using the same mongo username and PW on both v3.2 and 3.4 instances as I am trying to make sure all the config on both is the same. I have checked and rechecked to make sure that I am setting databaseURI correctly in package.json. Maybe Parse Server is having an issue authenticating because mongo 3.4 has made a change to the authentication api? I
Steps to reproduce
Load Parse Server v3.2.3 using mongo db v3.4.20
Expected Results
Run normally.
Actual Outcome
Lots of warnings in the log and Parse server is unstable.
Environment Setup
Server
Database
Logs/Trace
Here are some of the Error Log issues immediately after the Parse Server starts:
Jun 10 10:30:30 calm-badlands-34164 app/web.1: info: Parse LiveQuery Server starts running
Jun 10 10:30:30 calm-badlands-34164 app/web.1: warn: Unable to ensure uniqueness for usernames: message=Authentication failed., stack=MongoError: Authentication failed.
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at Function._getError (/app/node_modules/mongodb-core/lib/auth/scram.js:125:14)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at /app/node_modules/mongodb-core/lib/auth/scram.js:175:31
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at Connection.messageHandler (/app/node_modules/mongodb-core/lib/connection/connect.js:334:5)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at Connection.emit (events.js:200:13)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at Connection.EventEmitter.emit (domain.js:471:20)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at processMessage (/app/node_modules/mongodb-core/lib/connection/connection.js:364:10)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at TLSSocket. (/app/node_modules/mongodb-core/lib/connection/connection.js:533:15)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at TLSSocket.emit (events.js:200:13)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at TLSSocket.EventEmitter.emit (domain.js:471:20)
Jun 10 10:30:30 calm-badlands-34164 app/web.1: at addChunk (_stream_readable.js:294:12), name=MongoError
Jun 10 10:30:30 calm-badlands-34164 app/web.1: warn: Unable to ensure uniqueness for user email addresses: message=Authentication failed., stack=MongoError: Authentication failed.
The text was updated successfully, but these errors were encountered: