我正在尝试启动已部署的应用程序。键入dpd -d后,出现以下错误消息:

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


在键入“ DEBUG = * dpd”以调试问题后,得到以下消息:

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


对你的帮助表示感谢!!

最佳答案

就像这里说的那样:

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


无论您在运行mongod的哪个用户,都没有权限写入“ ./data”。检查所有权和权限,并考虑使用绝对路径(“ / var / wherever / data”),这样就不会为自己设置相对路径意外,无论是现在还是以后。

10-04 16:33