mongodb - Unable to run Mongo shell (Mac) -


i'm new web development , wanted started ror (using locomotive cms).

one of things locomotive asks have mongodb. installed using homebrew following link http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/

it installs fine im not able run it!

when type 'mongo' on terminal following output :

"mongodb shell version: 2.4.3 connecting to: test mon may  6 11:12:28.927  javascript execution failed:  error: couldn't connect server         127.0.0.1:27017 @   src/mongo/shell/mongo.js:l112 exception: connect failed" 

background debugging ( on terminal) :

1.when type in mongod following :

"all output going to: /usr/local/var/log/mongodb/mongo.log" 

ownership of mongo.log :

-rw-r--r--  1 username  admin  22133 may  6 11:13 mongo.log 

2.when input mongod --fork following :

about fork child process, waiting until server ready connections. forked process: 77566 output going to: /usr/local/var/log/mongodb/mongo.log error: child process failed, exited error number 100 

3.typing mongod --help gives following warning:

* warning: soft rlimits low. number of files 256, should @ least 1000 

4.i have folder called data (which acts amongodb database, should be?)in root (path : /data) ownership of data folder :

 "drwxr-xr-x   3 username  wheel       102 apr 23 21:38 data" 

5.checking if ports free: lsof -i :27017. ive tried check running mongo process using activity montior , found zilch!

no output 

6.ive tried : mongo --repair. dint help!

ive been stuk on while, i've looked @ responses on stackoverflow , searched around find solution nothing has helped far!

update:

when tried start mongo shell, getting following l log message 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 

so did chmod777 particular folder , shell launches!

although still warning when launches as:

server has startup warnings:  mon may  6 13:33:27.693 [initandlisten]  mon may  6 13:33:27.693 [initandlisten]  ** warning: soft rlimits low.  number of files 256, should @ least 1000 

any idea how can silence these warnings?

to information need determine cause of failure need in (and post us) output /usr/local/var/log/mongodb/mongo.log when trying start.

however, common reason failure lack of default database path - @ /data/db. either create folder (and don't forget make sure user has permission read/write it) or specify different path --dbpath option.

update: have since found, bad permissions on log file can cause issue, in similar way bad permissions on data path.

in terms of warning, information need here:

https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1

it though, warning - can run mongodb without issue limits long not under heavy load. so, if development environment, unless plan on load testing, should fine


Comments