我正在尝试启动Deployd应用程序。输入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
非常感谢您的帮助!!
答案 0 :(得分:3)
就像它在这里说的那样:
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”),这样就不会为自己设置相对路径的惊喜,无论是现在还是以后。
答案 1 :(得分:0)
我有类似的问题。运行DEBUG=* dpd
后,我得到:
starting deployd v0.8.0...
mongod starting mongod +0ms
mongod <Buffer 54 68 75 20 41 70 72 20 20 32 20 31 37 3a 34 39 3a 33 33 2e 31 37 30 20 5b 69 6e 69 74 61 6e 64 6c 69 73 74 65 6e 5d 20 4d 6f 6e 67 6f 44 42 20 73 74 ... > +23ms
mongod <Buffer 54 68 75 20 41 70 72 20 20 32 20 31 37 3a 34 39 3a 33 33 2e 31 37 30 20 5b 69 6e 69 74 61 6e 64 6c 69 73 74 65 6e 5d 20 64 62 20 76 65 72 73 69 6f 6e ... > +2ms
server started with options {"port":2403,"db":{"host":"127.0.0.1","port":6450,"name":"-deployd"},"env":"development"} +66ms
socket.io:server initializing namespace / +0ms
socket.io:server creating engine.io instance with opts {"log level":0,"path":"/socket.io"} +0ms
socket.io:server attaching client serving req handler +2ms
mongod <Buffer 54 68 75 20 41 70 72 20 20 32 20 31 37 3a 34 39 3a 33 33 2e 32 33 37 20 5b 77 65 62 73 76 72 5d 20 61 64 6d 69 6e 20 77 65 62 20 63 6f 6e 73 6f 6c 65 ... > +4ms
mongod <Buffer 54 68 75 20 41 70 72 20 20 32 20 31 37 3a 34 39 3a 33 33 2e 32 33 37 20 5b 69 6e 69 74 61 6e 64 6c 69 73 74 65 6e 5d 20 77 61 69 74 69 6e 67 20 66 6f ... > +0ms
config-loader reading /data/code/my/pro_angularjs/sportsstore/resources/freight-houses/config.json +2ms
config-loader reading /data/code/my/pro_angularjs/sportsstore/resources/orders/config.json +1ms
config-loader reading /data/code/my/pro_angularjs/sportsstore/resources/products/config.json +0ms
config-loader reading /data/code/my/pro_angularjs/sportsstore/resources/users/config.json +0ms
config-loader Loading resource: freight-houses +2ms
config-loader Loading resource: products +0ms
config-loader Loading resource: users +0ms
config-loader Loading resource: orders +2ms
internal-resources constructed +5ms
listening on port 2403
type help for a list of commands
dpd > mongod error: 1 +2s
mongod killing mongod +0ms
Failed to start MongoDB (Make sure 'mongod' are in your $PATH or use dpd --mongod option. Ref: http://docs.deployd.com/docs/basics/cli.html)
我使用的是Ubuntu 14.04。对于我的情况,使用sudo dpd
解决了这个问题。希望它对Ubuntu用户有所帮助。