无法启动Deployd(MongoDB无法启动)

时间:2015-07-08 18:18:47

标签: node.js mongodb deployd

我是Deployd的新手,正在尝试打开仪表板。我首先创建了一个基本的hello-world项目文件夹:

$ cd hello-world

...然后运行以下内容以查看仪表板:

$ dpd-d 

但是,我收到以下错误:

vaibhav@vaibhav:/hello-world$ dpd -d
   starting deployd v0.8.4...
   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)
bye

fs.js:432
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: EACCES, permission denied './.dpd/pids/mongod'
    at Object.fs.openSync (fs.js:432:18)
    at Object.fs.writeFileSync (fs.js:971:15)
    at process.kill (/usr/local/lib/node_modules/deployd/lib/util/mongod.js:52:8)
    at process.EventEmitter.emit (events.js:95:17)
    at process.exit (node.js:707:17)
    at fn (/usr/local/lib/node_modules/deployd/bin/dpd:261:5)
    at stop (/usr/local/lib/node_modules/deployd/bin/dpd:270:5)
    at startup (/usr/local/lib/node_modules/deployd/bin/dpd:162:16)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/deployd/lib/util/mongod.js:62:5)
    at ChildProcess.EventEmitter.emit (events.js:95:17)
    at Process.ChildProcess._handle.onexit (child_process.js:795:12)
`   

我做错了什么?

2 个答案:

答案 0 :(得分:0)

检查mongodb是否已正确安装:

如果您在iOS或Linux中,可以尝试:

sudo dpd

如果您在Windows中,请尝试使用&#34;以管理员身份运行命令窗口&#34;并尝试:

dpd

答案 1 :(得分:0)

首先,确保安装了mongodb,然后可以从命令行调用它: 在Unix上,

which mongod

在Windows上,

where mongod

一旦确定可用,请确保您对已部署的项目目录,子目录和文件具有读写权限: 在Unix上,

sudo chmod -R 0777 /path/to/deployd/project/directory

我认为此问题不适用于Windows操作系统。

之后,尝试再次启动项目仪表板。

dpd dashboard