Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

errno:10061 No connection in MongoDb

$
0
0

Good day to you all,

I am trying to create a replica set with three nodes using the following commands obtained from (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

After step 3. I got the following error message;

  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.

Please why am I getting this Error and how to resolve it?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>