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

mongod.exe seems sensitive to trailing backslash in --dbpath

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Minor - P4 Minor - P4
    • None
    • 4.0.0
    • Admin
    • None
    • Windows

    Description

      When launching mongod.exe with a trailing backslash in the --dbpath parameter 

      mongod.exe --dbpath "c:\Users\USER\Local Documents\_kode\MongoDB-data\"

      it fails with

      options: { storage: { dbPath: "c:\Users\sosdagmc\Local Documents\_kode\MongoDB-data"" } }
      exception in initAndListen: NonExistentPath: Data directory c:\Users\USER\Local Documents\_kode\MongoDB-data" not found., terminating
      

      When launching it without the trailing backslash;

      mongod.exe --dbpath "c:\Users\USER\Local Documents\_kode\MongoDB-data"
      

      it starts with no issues.

      options: { storage: { dbPath: "c:\Users\USER\Local Documents\_kode\MongoDB-data" } }
      Detected data files in c:\Users\USER\Local Documents\_kode\MongoDB-data created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.

      I'm not sure what the issue is here, but there is an extra " in the first options log, which looks odd.

      Attachments

        Activity

          People

            mark.benvenuto@mongodb.com Mark Benvenuto
            mgarde Michael Garde
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: