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

Windows 1.8.1/1.8.2-rc3 32-bit mongoexport Exits With "too many positional options" Error

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.1
    • Component/s: Tools
    • None
    • Environment:
      Windows Server 2008 R2 64-bit AMI from AWS, 32-bit versions of 1.8.1 and 1.8.2-rc3
    • Windows

      When I try to connect to use mongoexport with my auth-mode server I get the errors shown below when using the 32-bit client but not the 64-bit client. For security, all identifying information has been scrubbed from the example below.

      PS C:\Program Files\mongodb-win32-x86_64-1.8.1\bin> .\mongoexport.exe -h db.mycompany.com:27017 -d <database> -c <collection> -u <username> -p <password> -o <collection>.json
      connected to: db.mycompany.com:27017
      exported 1 records

      PS C:\Program Files\mongodb-win32-i386-1.8.1\bin> .\mongoexport.exe -h db.mycompany.com:27017 -d <database> -c <collection> -u <username> -p <password> -o <collection>.json
      ERROR: too many positional options

      options:
      --help produce help message
      -v [ --verbose ] be more verbose (include multiple times for more
      verbosity e.g. -vvvvv)
      -h [ --host ] arg mongo host to connect to ( <set name>/s1,s2 for sets)
      --port arg server port. Can also use --host hostname:port
      --ipv6 enable IPv6 support (disabled by default)
      -u [ --username ] arg username
      -p [ --password ] arg password
      --dbpath arg directly access mongod database files in the given
      path, instead of connecting to a mongod server -
      needs to lock the data directory, so cannot be used
      if a mongod is currently accessing the same path
      --directoryperdb if dbpath specified, each db is in a separate
      directory
      -d [ --db ] arg database to use
      -c [ --collection ] arg collection to use (some commands)
      -f [ --fields ] arg comma separated list of field names e.g. -f name,age
      --fieldFile arg file with fields names - 1 per line
      -q [ --query ] arg query filter, as a JSON string
      --csv export to csv instead of json
      -o [ --out ] arg output file; if not specified, stdout is used
      --jsonArray output to a json array rather than one object per
      line

            Assignee:
            Unassigned Unassigned
            Reporter:
            jared Jared D. Cottrell
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: