5

有时我可以建立连接,有时它会失败

MongoDB shell version: 2.4.3
connecting to: test
Wed Jul  3 13:07:09.878 Socket recv() errno:104 Connection reset by peer 127.0.0.1:27017
Wed Jul  3 13:07:09.878 SocketException: remote: 127.0.0.1:27017 error: 9001 socket exception [1] server [127.0.0.1:27017]
Wed Jul  3 13:07:09.878 DBClientCursor::init call() failed
Wed Jul  3 13:07:09.880 JavaScript execution failed: Error: DBClientBase::findN: transport error: 127.0.0.1:27017 ns: admin.$cmd query: { whatsmyuri: 1 } at src/mongo/shell/mongo.js:L112
exception: connect failed
4

1 回答 1

7

我猜在 MongoDB 日志中你会收到这个:

7 月 3 日星期三 13:07:...连接被拒绝,因为打开的连接太多:819

尝试执行以下操作:

  • 杀死所有 mongodb 进程
  • 开始mongod

    $ mongod
    
  • 像下面这样开始mongo:

    $ mongo 127.0.0.1:27017
    
于 2013-07-03T05:33:52.697 回答