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

Unable to authenticate in shell via mongos after upgrade.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.10
    • Admin, Security
    • None
    • Debian 7
    • Linux
    • Hide
      • Start shell on app server, connecting to local mongos with {{ mongo --port <ourmongosport> }}
      • In shell, do {{ db.auth(<ouruser>, <ouruserpass>) }}
      • Observer error {{ { errmsg: "auth failed", code: 18 }

        }}, and log error Failed to authenticate xxxuser@xxxdb with mechanism MONGODB-CR: AuthenticationFailed UserNotFound User "xxxuser@xxxdb" not found

      • Repeat above connected directly to primary, and observer normal authentication, with no errors.
      Show
      Start shell on app server, connecting to local mongos with {{ mongo --port <ourmongosport> }} In shell, do {{ db.auth(<ouruser>, <ouruserpass>) }} Observer error {{ { errmsg: "auth failed", code: 18 } }}, and log error Failed to authenticate xxxuser@xxxdb with mechanism MONGODB-CR: AuthenticationFailed UserNotFound User "xxxuser@xxxdb" not found Repeat above connected directly to primary, and observer normal authentication, with no errors.

    Description

      I've been upgrading our sharded cluster, (from 2.4 to 2.6.10, and then 2.6.10 to 3.0.5). I had finished the 2.6.10 upgrade, and everything was working well. I had started the v3 upgrade, and had got to step for of the guide [ http://docs.mongodb.org/manual/release-notes/3.0-upgrade/#upgrade-sharded-clusters ] and had upgraded one of the mongos instances when I realised there was a problem - my app was no longer able to authenticate via this new v3 mongos.

      I then checked the v2.6.10 mongos instances, and realised that, although me app (via the js driver) was able to authenticate via these instances, I was not able to properly authenticate using the shell (via either the -u -p method, or the db.auth() method).{{ [ errmsg: "auth failed", code: 18 ] }}.

      The log entry for this error was Failed to authenticate xxxuser@xxxdb with mechanism MONGODB-CR: AuthenticationFailed UserNotFound User "xxxuser@xxxdb" not found

      If I conect a shell to the replica set primary, I'm able to authenticate with this user normally (using either -u -p or db.auth() ).

      One thing (not sure if relevant), but if I do 'show dbs' via the 2.6.10 mongos, the admin db is showing as '(empty)'.

      I'm at a dead end now, and stuck half way through the upgrade, so any ideas you might have would be very gratefully received.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bgsosh@gmail.com Scott Lowe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: