【发布时间】:2013-05-06 06:03:36
【问题描述】:
我是 Web 开发的新手,我想开始使用一些 RoR(使用 Locomotive CMS)。
机车要求的一件事是拥有 Mongodb。我通过以下链接使用自制软件安装http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
它安装得很好,但我无法运行它!
当我在终端上输入“mongo”时,我得到以下输出:
"MongoDB shell version: 2.4.3
connecting to: test
Mon May 6 11:12:28.927
JavaScript execution failed:
Error: couldn't connect to server
127.0.0.1:27017 at src/mongo/shell/mongo.js:L112
exception: connect failed"
帮助调试的背景(在终端上):
1.当我输入 mongod 时,我得到以下信息:
"all output going to: /usr/local/var/log/mongodb/mongo.log"
mongo.log 的所有权:
-rw-r--r-- 1 username admin 22133 May 6 11:13 mongo.log
2.当我输入 mongod --fork 时,我得到以下信息:
about to fork child process, waiting until server is ready for connections.
forked process: 77566
all output going to: /usr/local/var/log/mongodb/mongo.log
ERROR: child process failed, exited with error number 100
3.键入 mongod --help 会给出以下警告:
* WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
4.我有一个名为 data 的文件夹(它充当中间数据库,它应该在哪里?)在根目录(PATH:/data)数据文件夹的所有权:
"drwxr-xr-x 3 username wheel 102 Apr 23 21:38 data"
5.检查端口是否空闲:lsof -i :27017。我还尝试使用活动监视器检查正在运行的 mongo 进程并找到了 zilch!
No output
6.我也试过:mongo --repair。帮帮忙!
我对此有一段时间了,我查看了 stackoverflow 上的大多数回复并四处搜索以找到解决方案,但到目前为止没有任何帮助!
更新:
当我尝试启动 mongo shell 时,我得到以下 l 来自 mongo.log 的日志消息:
5/6/13 1:33:27.616 PM com.apple.launchd:
(org.mongodb.mongod[79133])
open("/private/var/log/mongodb/output.log", ...): Permission denied
所以我为特定文件夹做了一个 chmod777 并且 shell 启动了!
虽然当它启动时我仍然收到警告:
Server has startup warnings:
Mon May 6 13:33:27.693 [initandlisten]
Mon May 6 13:33:27.693 [initandlisten]
** WARNING: soft rlimits too low.
Number of files is 256, should be at least 1000
知道如何消除这些警告吗?
【问题讨论】:
标签: mongodb terminal homebrew locomotivecms