Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-575

Mongo c driver unable to retrieve data from replicaset with authentication

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 0.94.2
    • Component/s: None
    • Environment:
      linux

      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

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            tanmoy.palit@bluware.com Tanmoy Palit
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: