Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-1126

mongoimport ignores authentication errors, reports successful import

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.9
    • Affects Version/s: 3.2.1
    • Component/s: mongoimport
    • None
    • Environment:
      Windows Server 2012 R2
      AWS burner instance; 16GB RAM, 4vCPU
    • Server Tools 13 (04/22/16)
    • v3.2

      C:\Mongo>3.2.4\bin\mongoimport -d sample1 -c run1 sample\zips.json --verbose --stopOnError
      2016-04-01T02:55:46.306+0000    filesize: 3182409 bytes
      2016-04-01T02:55:46.308+0000    using fields:
      2016-04-01T02:55:46.311+0000    connected to: localhost
      2016-04-01T02:55:46.311+0000    ns: sample1.run1
      2016-04-01T02:55:46.312+0000    connected to node type: standalone
      2016-04-01T02:55:46.312+0000    using write concern: w='1', j=false, fsync=false, wtimeout=0
      2016-04-01T02:55:46.312+0000    using write concern: w='1', j=false, fsync=false, wtimeout=0
      2016-04-01T02:55:46.590+0000    imported 29353 documents
      
      C:\Mongo>3.2.4\bin\mongoimport -d sample1 -c run2 sample\zips.json --verbose --stopOnError -u admin -p 1234 /authenticationDatabase:admin
      2016-04-01T02:56:00.585+0000    filesize: 3182409 bytes
      2016-04-01T02:56:00.587+0000    using fields:
      2016-04-01T02:56:00.604+0000    connected to: localhost
      2016-04-01T02:56:00.604+0000    ns: sample1.run2
      2016-04-01T02:56:00.605+0000    connected to node type: standalone
      2016-04-01T02:56:00.606+0000    using write concern: w='1', j=false, fsync=false, wtimeout=0
      2016-04-01T02:56:00.606+0000    using write concern: w='1', j=false, fsync=false, wtimeout=0
      2016-04-01T02:56:01.169+0000    imported 29353 documents
      

      The first import attempt is actually a total fail. The server has many lines "Authentication failed" etc and nothing is imported, of course.

      The second import attempt is fully successful, all documents turn up in the destination collection.

      Note there is no apparent difference at all in the ouptut from mongoimport, even with verbose and stopOnError flags on.

        There are no Sub-Tasks for this issue.

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: