安装mongodb后服务启动不了请问怎么解决
ringa_lee
ringa_lee 2017-04-21 10:57:55
0
3
677

OS:Mac osX10.8.2
安装方法:brew install mongodb
执行mongo后,如下:

MongoDB shell version: 2.2.2
connecting to: test
Wed Jan 16 09:33:53 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed

请问如何解决?

这个是我的日志文件

Wed Jan 16 08:26:10 [initandlisten] MongoDB starting : pid=6221 port=27017 dbpath=/data/db 64-bit host=namatoiMac.local
Wed Jan 16 08:26:10 [initandlisten]
Wed Jan 16 08:26:10 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Wed Jan 16 08:26:10 [initandlisten] db version v2.2.2, pdfile version 4.5
Wed Jan 16 08:26:10 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Wed Jan 16 08:26:10 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49
Wed Jan 16 08:26:10 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/data/db", logappend: "true", logpath: "/usr/local/var/log/mongodb/mongo.log" }
Wed Jan 16 08:26:10 [initandlisten] journal dir=/data/db/journal
Wed Jan 16 08:26:10 [initandlisten] recover : no journal files present, no recovery needed
Wed Jan 16 08:26:10 [websvr] admin web console waiting for connections on port 28017
Wed Jan 16 08:26:10 [initandlisten] waiting for connections on port 27017
Wed Jan 16 08:28:34 got signal 2 (Interrupt: 2), will terminate after current cmd ends
Wed Jan 16 08:28:34 [interruptThread] now exiting
Wed Jan 16 08:28:34 dbexit:
Wed Jan 16 08:28:34 [interruptThread] shutdown: going to close listening sockets...
Wed Jan 16 08:28:34 [interruptThread] closing listening socket: 6
Wed Jan 16 08:28:34 [interruptThread] closing listening socket: 7
Wed Jan 16 08:28:34 [interruptThread] closing listening socket: 8
Wed Jan 16 08:28:34 [interruptThread] removing socket file: /tmp/mongodb-27017.sock
Wed Jan 16 08:28:34 [interruptThread] shutdown: going to flush diaglog...
Wed Jan 16 08:28:34 [interruptThread] shutdown: going to close sockets...
Wed Jan 16 08:28:34 [interruptThread] shutdown: waiting for fs preallocator...
Wed Jan 16 08:28:34 [interruptThread] shutdown: lock for final commit...
Wed Jan 16 08:28:34 [interruptThread] shutdown: final commit...
Wed Jan 16 08:28:34 [interruptThread] shutdown: closing all files...
Wed Jan 16 08:28:34 [interruptThread] closeAllFiles() finished
Wed Jan 16 08:28:34 [interruptThread] journalCleanup...
Wed Jan 16 08:28:34 [interruptThread] removeJournalFiles
Wed Jan 16 08:28:34 [interruptThread] shutdown: removing fs lock...
Wed Jan 16 08:28:34 dbexit: really exiting now
ringa_lee
ringa_lee

ringa_lee

全部回复(3)
巴扎黑

mongodb没启动。先在shell里输入mongod启动mongodb
然后在输入mongo启动管理台进行管理

黄舟

遇到个问题 windows环境下安装mongodb,但是安装服务出错,之后无法卸载

每次运行 D:MongoDBbinmongod.exe --dbpath D:MongoDBdata --directoryperdb --logpath D:MongoDBlogMongoDB.log --logappend --serviceName MongoDB --install

都提示服务已存在,服务终止,改如何把之前的错误服务处理掉?

洪涛

确定服务建立; 确定服务启动; 确定数据库路径正确; 没啥好确定的了...

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板