[GODRIVER-2647] Error connecting to mongodb container version 6.0.2 | amd64/mongo Created: 09/Nov/22 Updated: 27/Oct/23 Resolved: 28/Nov/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Critical - P2 |
| Reporter: | karthick d | Assignee: | Matt Dale |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Iam able to connect mongo container versions 4.X and 5.X with the below code using amd64/mongo
But when i try to upgrade the container to version 6.0.2 from amd64/mongo It fails with the below error
I believe by default it tries to pick SCRAM-SHA-1 do I need to set a mongoDB server params in my mongo run script file like below ?
All i'm trying to do is connect to db and change the admin and db password using below code , not sure even if this is depreciated now in the mongo version 6.0.2
not sure where am I making mistake , the error message is not straight forward . Mongo doesn't give the actual error . Can anyone help me here ? |
| Comments |
| Comment by Matt Dale [ 28/Nov/22 ] | |||||||||
|
karthickcseapitam@gmail.com I'm glad you were able to resolve the problem! Closing this ticket. | |||||||||
| Comment by karthick d [ 25/Nov/22 ] | |||||||||
|
@Matt Dale , Please mark this as resolved and close this ticket please . | |||||||||
| Comment by karthick d [ 23/Nov/22 ] | |||||||||
|
@Matt Dale So was able to resolve this , The problem was my scripts were using mongo but that is removed in the latest mongo version 6.0 , So I used mongosh, when I try to init the mongo container, that worked, As simple as that , but it was really confusing when we get irrelevant error when the connection failure happens , if that can be improved then it would have been a bit easy !! | |||||||||
| Comment by karthick d [ 23/Nov/22 ] | |||||||||
|
@Matt Dale I tried the way you suggested , But still I get the same error :
This time I did not even specify the authMechanism in the connection code , but not sure why does this says that unable to authenticate using mechanism "SCRAM-SHA-1"
I tried the same code with mongo container versions 4.4 , 5.0 both works fine , seems like it has only problem with mongo version 6.0 , Not sure if the connection needs some more parameters , not sure what am I missing here . By the way I'm using the mongo container image from docker hub https://hub.docker.com/r/amd64/mongo/ | |||||||||
| Comment by Matt Dale [ 14/Nov/22 ] | |||||||||
|
karthickcseapitam@gmail.com I believe that SCRAM-SHA-1 credentials are not created by default in MongoDB 6.0. Drivers typically default to SCRAM-SHA-256 authentication, which is also the default SCRAM password authentication mechanism for MongoDB 6.0. In a previous ticket ( Also, the GODRIVER Jira is primarily used for Go Driver bug and feature tracking, but is not the right place for asking user support questions. For future requests like this, please use one of the following resources:
Thanks! |