[Mongo]couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112,mongo27017
今天在啟動mongo時候出現了一個錯誤,我的是win7環境。
E:\server>mongoMongoDB shell version: 2.4.5-pre-connecting to: testMon Sep 22 13:35:05.335 JavaScript execution failed: Error: couldn't connect toserver 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112exception: connect failed
解決辦法是刪除mongo的mongodata 下的mongod.lock 檔案。
重啟mongo就好了。
參考:
win下mongo安裝(mongodata 可以自己指定)
http://stackoverflow.com/questions/16120397/errr-mongo-jsl112-error-couldnt-connect-to-server-127-0-0-127017-at-src-mon (linux下同樣問題的解決)
本文出自 “orangleliu筆記本” 部落格,請務必保留此出處 http://blog.csdn.net/orangleliu/article/details/39475285
error: couldn't connect to server 127001:27017 src/mongo/shell/mongojs145
你是不是 沒有設定好監聽的連接埠 ?
執行mongoexe出現了could not connect server 127001 shell/mongojs:79 exception:connection failed
這個是你電腦的系統檔案丟失的原因所造成的 你要用金山衛士恢複檔案就可以了。。