mongodb马上退出

时间:2014-06-16 07:04:50

标签: mongodb database

刚开始使用mongoDB。起初命令没有响应,现在它立即退出。对于出了什么问题/如何找出错误的想法?

这是终端输出:

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

谢谢!

这是日志的输出:

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

它现在已经开始保持开放,但命令似乎什么都不做。对不起,我无法进一步缩小范围我是mongodb的新手。我正在使用终端和键入" help"然后按回车我应该得到某种回应吗?

再次感谢!

1 个答案:

答案 0 :(得分:0)

在youtube上查看一些内容后想出来。我很困惑,因为我来自MYSQL背景。 mongod启动服务器,但你需要使用mongo来访问shell(我刚开了一个新的终端风