错误号码:10061 MongoDb中没有连接

时间:2016-07-08 05:22:27

标签: mongodb replication

大家好日子,

我正在尝试使用从(http://www.acemyskills.com/replica-sets-in-mongodb/)获得的以下命令创建具有三个节点的副本集

Step 1: C:\>mkdir \data\rs1 \data\rs2 \data\rs3
Step 2:
C:\>start mongod --replSet rsroko --logpath  \data\rs1\1.log --dbpath       
   \data\rs1 --port 27017 --smallfiles --oplogSize 64

C:\>start mongod --replSet rsroko --logpath  \data\rs1\2.log --dbpath   
 \data\rs3 --port 27018 --smallfiles --oplogSize 64

C:\>start mongod --replSet rsroko --logpath  \data\rs1\3.log --dbpath 
  \data\rs3 --port 27019 --smallfiles --oplogSize 64

 Step 3
  C:\> mongo --port 27017

在第3步之后,我收到以下错误消息;

  MongoDB shell version: 3.2.1
  connecting to: localhost:27017/test
  2016-07-08T11:56:27.877-0700 W NETWORK  [thread1] Failed to connect to       
  127.0.0.1:27017, reason: errno:10061 No connection could be made because  

  the target machine actively refused it.
  2016-07-08T11:56:27.878-0700 E QUERY    [thread1] Error: couldn't connect   
  to server localhost:27017, connection attempt failed :
   connect@src/mongo/shell/mongo.js:226:14
   @(connect):1:6

    exception: connect failed.

请问为什么我会收到此错误以及如何解决?

0 个答案:

没有答案