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

Using copyDatabase to copy from an unauthenticated instance to an authenticated instance fails

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.1, 2.2.3, 2.4.0-rc1
    • Component/s: Admin, Security
    • Labels:
      None
    • Environment:
      MongoDB shell version: 2.2.1
      Ubuntu 12.04.1 LTS
    • ALL
    • Hide

      1. Log into an authenticated server
      2. Provide authentication creds
      3. Attempt to run command "db.copyDatabase("dbName", "dbName2", "unauthed-db-location")

      Results in:

      Thu Jan 17 15:40:59 DBClientCursor::init call() failed
      Thu Jan 17 15:40:59 query failed : admin.$cmd

      { copydb: 1.0, fromhost: "dev-shard1-n2.llnw.com", fromdb: "prep-dev", todb: "prep-dev" }

      to: 127.0.0.1:27017
      Thu Jan 17 15:40:59 Error: error doing query: failed src/mongo/shell/collection.js:155
      Thu Jan 17 15:40:59 trying reconnect to 127.0.0.1:27017
      Thu Jan 17 15:40:59 reconnect 127.0.0.1:27017 failed couldn't connect to server 127.0.0.1:27017

      Show
      1. Log into an authenticated server 2. Provide authentication creds 3. Attempt to run command "db.copyDatabase("dbName", "dbName2", "unauthed-db-location") Results in: Thu Jan 17 15:40:59 DBClientCursor::init call() failed Thu Jan 17 15:40:59 query failed : admin.$cmd { copydb: 1.0, fromhost: "dev-shard1-n2.llnw.com", fromdb: "prep-dev", todb: "prep-dev" } to: 127.0.0.1:27017 Thu Jan 17 15:40:59 Error: error doing query: failed src/mongo/shell/collection.js:155 Thu Jan 17 15:40:59 trying reconnect to 127.0.0.1:27017 Thu Jan 17 15:40:59 reconnect 127.0.0.1:27017 failed couldn't connect to server 127.0.0.1:27017

          Assignee:
          spencer@mongodb.com Spencer Brody (Inactive)
          Reporter:
          mtauber Mark T
          Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

            Created:
            Updated:
            Resolved: