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

mongodump --dbpath lock failure message does not indicate reason for failure

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongodump

      When mongodump is run with --dbpath, and the lock file cannot be created/locked, the following message is output:

      If you are running a mongod on the same path you should connect to that instead of direct data file access
      

      The lock failure could be for many reasons other than a mongod (or other tool) running on the dbpath, including

      • the directory not existing
      • bad directory permissions/ownership
      • read-only filesystem (SERVER-593)
      • locking disabled on the filesystem (eg. NFS with nolock or no rpc.lockd running)

      The message is output because acquirePathLock() has thrown an exception. The code for acquirePathLock() includes uasserts for the different failure modes, including distinct log messages and (importantly) errnoWithDescription() for the common case of open() failing. So, a simple and adequate solution should be to have Tool::main output the contents of the DBException.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ian@mongodb.com Ian Whalen (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: