Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5027

Cannot add another mongos process to an app server and have it point to a single replica set.

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.2
    • Component/s: Sharding
    • Labels:
    • Environment:
      Windows Server 2003 R2

      We are testing out various configurations. What we currently have is a one server replica set with a mongod(configsvr) process running on that server. Then we have 2 application servers app1 and app2. App1 has a mongos process running on it. I tried to set up a mongos process on app2, but I cannot get it to work. I am stuck with a permissions issue. I try to run the db.addUser command on app2 and it fails. I then try to run the db.runCommand(

      {addShard:"NH_Data_01/t01-vm-nsdb01:27018"}

      ) command on the app2 server and it fails with unauthorized. The whole system is running with a keyFile as well, if that matters. The error code is below.

      > use admin
      switched to db admin
      > db.addUser("Username","Password")
      Tue Feb 21 18:30:15 uncaught exception: error

      { "$err" : "unauthorized", "code" : 15845 }

      > show users
      Tue Feb 21 18:30:26 uncaught exception: error:

      { "$err" : "unauthorized", "code" : 15845 }

      > db.auth("Same Username that I tried to add above","Password") – thought that maybe I added it earlier and forgot, not the case...
      0
      >
      > db.runCommand(

      {addShard:"NH_Data_01/t01-vm-nsdb01:27018"}

      )

      { "ok" : 0, "errmsg" : "unauthorized" }

      >

            Assignee:
            Unassigned Unassigned
            Reporter:
            erik_holm@trimble.com Erik Holm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: