Uploaded image for project: 'Percona Server for MongoDB'
  1. Percona Server for MongoDB
  2. PSMDB-272

mongos crashes when issuing createBackup command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2.21-3.12, 4.0.4-1, 3.6.8-2.0, 3.4.18-2.16
    • Fix Version/s: 4.0.5-2, 3.6.10-3.0, 3.4.19-2.17
    • Component/s: None
    • Labels:
      None

      Description

      If you have simple sharding started without any data (I had 2 clean shards configured, but I don't think it's relevant) and try to issue the hotbackup's createBackup command while connected to mongos - it will crash.

      Here's how it looks on 4.0, but the same is on 3.2, 3.4 and 3.6:

      4.0:
      mongos> use admin;
      switched to db admin
      
      mongos> db.runCommand({createBackup: 1, backupDir: "/mnt/data/backup"});
      2018-12-16T19:12:54.261+0100 E QUERY    [js] Error: error doing query: failed: network error while attempting to run command 'createBackup' on host 'localhost:27017'  :
      DB.prototype.runCommand@src/mongo/shell/db.js:168:1
      @(shell):1:1
      2018-12-16T19:12:54.263+0100 I NETWORK  [js] trying reconnect to localhost:27017 failed
      2018-12-16T19:12:54.263+0100 I NETWORK  [js] reconnect localhost:27017 failed failed
      2018-12-16T19:12:54.265+0100 I NETWORK  [js] trying reconnect to localhost:27017 failed
      2018-12-16T19:12:54.266+0100 I NETWORK  [js] reconnect localhost:27017 failed failed
      >
      

      In the process it will create empty backup directory.

      The stack traces are here: 40-mongos.log 36-mongos.log 34-mongos.log 32-mongos.log

      I am aware that you probably shouldn't run this command while connected to mongos, but even our documentation doesn't say anything about that: https://www.percona.com/doc/percona-server-for-mongodb/LATEST/hot-backup.html

        Smart Checklist

          Attachments

          1. 32-mongos.log
            33 kB
          2. 34-mongos.log
            11 kB
          3. 36-mongos.log
            15 kB
          4. 40-mongos.log
            14 kB

            Activity

              People

              • Assignee:
                igor.solodovnikov Igor Solodovnikov
                Reporter:
                tomislav.plavcic@percona.com Tomislav Plavcic
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 7 hours, 10 minutes
                  3d 7h 10m