Error connecting to local installation of MongoDB thru terminal -
terminal displays following error:
$ mongo mongodb shell version: 2.4.5 connecting to: test wed jul 24 14:26:45.779 javascript execution failed: error: couldn't connect server 127.0.0.1:27017 @ src/mongo/shell/mongo.js:l112 exception: connect failed
upon running mongod run --config /usr/local/etc/mongod.conf
i following error on console:
about fork child process, waiting until server ready connections. forked process: 11204 output going to: /usr/local/var/log/mongodb/mongo.log error: child process failed, exited error number 100
the mongo.log shows:
***** server restarted ***** wed jul 24 14:39:57.360 [initandlisten] mongodb starting : pid=11204 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=59.161.67.13.del-cdma.dialup.vsnl.net.in wed jul 24 14:39:57.363 [initandlisten] wed jul 24 14:39:57.363 [initandlisten] ** warning: soft rlimits low. number of files 256, should @ least 1000 wed jul 24 14:39:57.363 [initandlisten] db version v2.4.5 wed jul 24 14:39:57.363 [initandlisten] git version: a2ddc68ba7c9cee17bfe69ed840383ec3506602b wed jul 24 14:39:57.363 [initandlisten] build info: darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 darwin kernel version 10.8.0: tue jun 7 16:32:41 pdt 2011; root:xnu-1504.15.3~1/release_x86_64 x86_64 boost_lib_version=1_49 wed jul 24 14:39:57.363 [initandlisten] allocator: system wed jul 24 14:39:57.363 [initandlisten] options: { bind_ip: "127.0.0.1", command: [ "run" ], config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb", fork: "true", journal: "true", logappend: "true", logpath: "/usr/local/var/log/mongodb/mongo.log", port: 27017, quiet: "true" } wed jul 24 14:39:57.367 [initandlisten] journal dir=/usr/local/var/mongodb/journal wed jul 24 14:39:57.368 [initandlisten] recover : no journal files present, no recovery needed wed jul 24 14:39:58.113 [initandlisten] couldn't open /usr/local/var/mongodb/test.0 errno:13 permission denied wed jul 24 14:39:58.136 [initandlisten] couldn't open /usr/local/var/mongodb/test.0 errno:13 permission denied wed jul 24 14:39:58.152 [initandlisten] exception in initandlisten: 10085 can't map file memory, terminating wed jul 24 14:39:58.152 dbexit: wed jul 24 14:39:58.152 [initandlisten] shutdown: going close listening sockets... wed jul 24 14:39:58.153 [initandlisten] shutdown: going flush diaglog... wed jul 24 14:39:58.153 [initandlisten] shutdown: going close sockets... wed jul 24 14:39:58.153 [initandlisten] shutdown: waiting fs preallocator... wed jul 24 14:39:58.153 [initandlisten] shutdown: lock final commit... wed jul 24 14:39:58.153 [initandlisten] shutdown: final commit... wed jul 24 14:39:58.153 [initandlisten] shutdown: closing files... wed jul 24 14:39:58.154 [initandlisten] closeallfiles() finished wed jul 24 14:39:58.154 [initandlisten] journalcleanup... wed jul 24 14:39:58.154 [initandlisten] removejournalfiles wed jul 24 14:39:58.154 [initandlisten] shutdown: removing fs lock... wed jul 24 14:39:58.154 dbexit: exiting
edit! ( trying suggestions answers) running $ mongod --repair gives following error:
$ mongod --repair wed jul 24 15:16:51.596 can't specify both --journal , --repair options.
run following command first start mongo server
mongod run --config /usr/local/etc/mongod.conf
assuming installed mongo using brew.
more information mongod process here
edit
try repair mongo using :
mongod --repair
seems have issues permissions also, try using sudo
start mongod
Comments
Post a Comment