[CDRIVER-575] Mongo c driver unable to retrieve data from replicaset with authentication Created: 12/Mar/15  Updated: 16/Nov/21  Resolved: 20/Apr/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 0.94.2
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: Tanmoy Palit Assignee: A. Jesse Jiryu Davis
Resolution: Cannot Reproduce Votes: 0
Labels: connection, driver, replicaset
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux



 Description   

We have 3 node replicaset hosted on linux machines. Recently we added authentication restarted the replicaset. The following documentation was used:
http://docs.mongodb.org/manual/tutorial/deploy-replica-set-with-auth/

We use the following URI for connecting to Mongo:
mongodb://x1.mongodb.com,x2.mongodb.com,x3.mongodb.com/?replicaSet=r0

We changed that to the following:
mongodb://username:password@x1.mongodb.com,x2.mongodb.com,x3.mongodb.com/db?replicaSet=r0

After this c driver components no longer able to retrieve data from Mongo, although c# components are working fine.

We can also login to the replicaset from mongo console and query data.

Following are errors from Log:
1. assertion 13 not authorized for query on xxx.bbb ns:xxx.bbb query:{ $query:

{ domain: "abc.com" }

}

2. Unauthorized not authorized on db to execute command



 Comments   
Comment by A. Jesse Jiryu Davis [ 20/Apr/15 ]

Hi, I'm happy to keep helping with this issue if it persists in the C Driver 1.1.4.

Comment by A. Jesse Jiryu Davis [ 05/Apr/15 ]

Hi palit1985, have you had the opportunity to retest with a recent driver version?

Comment by Tanmoy Palit [ 17/Mar/15 ]

We are using monogdb 2.6.7 (enterprise edition).
I will try updating the driver and test.

Comment by A. Jesse Jiryu Davis [ 12/Mar/15 ]

Additionally, could you please tell us what MongoDB version you're running?

Comment by Hannes Magnusson [ 12/Mar/15 ]

I believe this was fixed in 0.96.0 with CDRIVER-369
Could you please try to upgrade? Preferable to the current stable version, 1.1.2

Generated at Wed Feb 07 21:09:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.