-
Notifications
You must be signed in to change notification settings - Fork 175
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
when use MONGO_URI, error: Another user is already authenticated #82
Comments
Can you try to apply the following changes? In URI parsing, add this line:
In URI-less config, add this line:
Then when calling
This untested patch could help. If it does not work as is, it may be a hint. |
@lafrech I used the same solution for this, and thank you for the reply. |
@syfun I know this is a very old bug and it sounds like you've gotten a workaround for this at this point. But I'm trying to revive this project, and I've just recently merged #88, which I think should fix your issue as well. I'll be releasing 0.5.0 soon. When I do, would you be able to test and confirm here whether that works for you? |
@dcrosta Ok for that. This bug is realy old enough. I alreay fixed, but almost forgot that. Sorry for not further communication. I will seriously test after you releasing 0.5.0. |
@dcrosta in 0.5.0, I get this error. not sure if it's related to this issue above: File "/home/someuser/.local/lib/python3.5/site-packages/flask_pymongo/init.py", line 97, in init I went back to 0.4.1 and it works. |
I believe that will be fixed by #93, which I'll be releasing shortly as 0.5.1. |
0.5.1 is now in PyPI -- please upgrade and let me know if that fixes it. If not, we can dig in deeper here. |
@dcrosta That's OK for 0.5.1. |
Great, thanks for following up! |
I use a cloud mongodb server, version is 3.0.7. But its authMechanism is 'MONGODB-CR', not default 'SCRAM-SHA-1'. So when I used 'MONGODB-CR', occured error 'Another user is already authenticated'. My MONGO_URI:
'mongodb://demo:123456@127.0.0.1:27017/demo?authMechanism=MONGODB-CR'
I read source code, and found the reason,
authenticate not assign mechanism agument, so 'DEFAULT‘ and occured my error.
The text was updated successfully, but these errors were encountered: