Search code examples
javascriptnode.jsmongodbwebdeployd

Failed to start MongoDB with dpd-d


I am trying to start a Deployd application. After I type dpd-d, I get a following error message:

starting deployd v0.6.11...
Failed to start MongoDB

After I type 'DEBUG=* dpd' to debug the problem, I get the following mesaage:

mongod starting mongod +0ms
mongod 2014-04-24T23:00:07.794-0400 [initandlisten] MongoDB starting : pid=64197 port=6299     dbpath=./data 64-bit host=Optinovations-MacBook-Air.local
2014-04-24T23:00:07.794-0400 [initandlisten] 
2014-04-24T23:00:07.794-0400 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2014-04-24T23:00:07.794-0400 [initandlisten] db version v2.6.0
2014-04-24T23:00:07.794-0400 [initandlisten] git version: nogitversion +152ms 
mongod 2014-04-24T23:00:07.794-0400 [initandlisten] build info: Darwin minimountain.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2014-04-24T23:00:07.794-0400 [initandlisten] allocator: tcmalloc
2014-04-24T23:00:07.794-0400 [initandlisten] options: { config: "/dev/null", net: { port: 6299 }, processManagement: { pidFilePath: "./.dpd/pids/mongod" }, storage: { dbPath: "./data", journal: { enabled: false }, nsSize: 4, smallFiles: true } }
2014-04-24T23:00:07.795-0400 [initandlisten] couldn't open ./data/local.ns errno:13 Permission denied
2014-04-24T23:00:07.795-0400 [initandlisten] error couldn't open file ./data/local.ns terminating
2014-04-24T23:00:07.795-0400 [initandlisten] dbexit: 
2014-04-24T23:00:07.795-0400 [initandlisten] shutdown: going to close listening sockets...
2014-04-24T23:00:07.796-0400 [initandlisten] shutdown: going to flush diaglog...
2014-04-24T23:00:07.796-0400 [initandlisten] shutdown: going to close sockets...
2014-04-24T23:00:07.796-0400 [initandlisten] shutdown: waiting for fs preallocator...
2014-04-24T23:00:07.796-0400 [initandlisten] shutdown: closing all files...
2014-04-24T23:00:07.796-0400 [initandlisten] closeAllFiles() finished
2014-04-24T23:00:07.796-0400 [initandlisten] shutdown: removing fs lock...
2014-04-24T23:00:07.796-0400 [initandlisten] dbexit: really exiting now +0ms
mongod exit code 45 +5ms
Failed to start MongoDB
mongod error: 1 +0ms
mongod killing mongod +1ms

Your help will be greatly appreciated!!


Solution

  • Like it says here:

    2014-04-24T23:00:07.795-0400 [initandlisten] couldn't open ./data/local.ns errno:13 Permission denied
    2014-04-24T23:00:07.795-0400 [initandlisten] error couldn't open file ./data/local.ns terminating
    

    Whatever user you're running mongod as doesn't have permission to write to "./data", wherever that is. Check ownership and permissions and consider using an absolute path ("/var/wherever/data") so you don't set up a relative-path surprise for yourself, either now or later.