安裝mongodb後服務啟動不了請問怎麼解決
ringa_lee
ringa_lee 2017-04-21 10:57:55
0
3
678

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

都提示服務已存在,服務終止,改如何把之前的錯誤服務處理掉?

洪涛

確定服務建立; 確定服務啟動; 確定資料庫路徑正確; 沒啥好確定的了...

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板