Bren
Bren

Reputation: 3706

mongo db quits immediately

Just started working with mongoDB. At first commands received no response, and now it immediately quits. Any ideas of what is going wrong/how I can find out whats going wrong?

Here is the terminal output:

new-host-4:~ Brennan$ mongod
all output going to: /usr/local/var/log/mongodb/mongo.log
new-host-4:~ Brennan$ 

Thanks!

This is the output from the log:

Sun Jun 15 21:24:50.010 [initandlisten] MongoDB starting : pid=8253 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=new-host-4.home
Sun Jun 15 21:24:50.010 [initandlisten]
Sun Jun 15 21:24:50.010 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Sun Jun 15 21:24:50.010 [initandlisten] db version v2.4.8
Sun Jun 15 21:24:50.010 [initandlisten] git version: nogitversion
Sun Jun 15 21:24:50.010 [initandlisten] build info: Darwin new-host-4.home 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_6$
Sun Jun 15 21:24:50.010 [initandlisten] allocator: tcmalloc
Sun Jun 15 21:24:50.010 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb", logappend: "true", logpath: "/us$
Sun Jun 15 21:24:50.011 [initandlisten] journal dir=/usr/local/var/mongodb/journal
Sun Jun 15 21:24:50.011 [initandlisten] recover : no journal files present, no recovery needed
Sun Jun 15 21:24:50.026 [FileAllocator] allocating new datafile /usr/local/var/mongodb/local.ns, filling with zeroes...
Sun Jun 15 21:24:50.026 [FileAllocator] creating directory /usr/local/var/mongodb/_tmp
Sun Jun 15 21:24:50.080 [FileAllocator] done allocating datafile /usr/local/var/mongodb/local.ns, size: 16MB,  took 0.054 secs
Sun Jun 15 21:24:50.085 [FileAllocator] allocating new datafile /usr/local/var/mongodb/local.0, filling with zeroes...
Sun Jun 15 21:24:50.252 [FileAllocator] done allocating datafile /usr/local/var/mongodb/local.0, size: 64MB,  took 0.166 secs
Sun Jun 15 21:24:50.280 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0  reslen:37 254ms
Sun Jun 15 21:24:50.280 [websvr] admin web console waiting for connections on port 28017
Sun Jun 15 21:24:50.281 [initandlisten] waiting for connections on port 27017
Sun Jun 15 22:28:03.428 [signalProcessingThread] got signal 1 (Hangup: 1), will terminate after current cmd ends
Sun Jun 15 22:28:03.428 [signalProcessingThread] now exiting
Sun Jun 15 22:28:03.429 dbexit:
Sun Jun 15 22:28:03.429 [signalProcessingThread] shutdown: going to close listening sockets...
Sun Jun 15 22:28:03.429 [signalProcessingThread] closing listening socket: 9
Sun Jun 15 22:28:03.429 [signalProcessingThread] closing listening socket: 10
Sun Jun 15 22:28:03.429 [signalProcessingThread] closing listening socket: 11
Sun Jun 15 22:28:03.429 [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
Sun Jun 15 22:28:03.429 [signalProcessingThread] shutdown: going to flush diaglog...
Sun Jun 15 22:28:03.429 [signalProcessingThread] shutdown: going to close sockets...
Sun Jun 15 22:28:03.429 [signalProcessingThread] shutdown: waiting for fs preallocator...
Sun Jun 15 22:28:03.429 [signalProcessingThread] shutdown: lock for final commit...
Sun Jun 15 22:28:03.429 [signalProcessingThread] shutdown: final commit...
Sun Jun 15 22:28:03.437 [signalProcessingThread] shutdown: closing all files...
Sun Jun 15 22:28:03.438 [signalProcessingThread] closeAllFiles() finished
Sun Jun 15 22:28:03.438 [signalProcessingThread] journalCleanup...
Sun Jun 15 22:28:03.438 [signalProcessingThread] removeJournalFiles
Sun Jun 15 22:28:03.438 [signalProcessingThread] shutdown: removing fs lock...
Sun Jun 15 22:28:03.438 dbexit: really exiting now

It has started to stay open now but commands don't seem to do anything. Sorry, I cant narrow it down further I am new to mongodb. I'm on a mac using terminal and by typing "help" and then pressing return I should get some sort of response right?

Thanks again!

Upvotes: 0

Views: 1463

Answers (1)

Bren
Bren

Reputation: 3706

Figured it out after looking some stuff up on youtube. I was confused as I was coming from a MYSQL background. mongodstarts the server but you need to use mongo to access the shell (I just opened a new terminal wind

Upvotes: 1

Related Questions