0

Today morning i'm able to create 2 different mongo instances on port 27010 and 37010 and i'm able to replicate using mongo-connector. But now after system restart i'm not able to connect to port 37010 using below command.

C:\Program Files\MongoDB 2.6 Standard\bin>mongo --port 37010
MongoDB shell version: 2.6.12
connecting to: 127.0.0.1:37010/test
2016-09-12T18:08:14.733-0500 warning: Failed to connect to 127.0.0.1:37010, reason: errno:10061 No connection could be made because the target machine actively refused it.
2016-09-12T18:08:14.756-0500 Error: couldn't connect to server 127.0.0.1:37010 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:148
exception: connect failed

It is working fine if i just give mongo where it is connecting only to default port of 27010. Morning also i faced same problem where i deleted all my mongo windows service and running without mongo windows service. But again i'm facing same problem. Kindly advise.

Below is my config files.

mongo.config.txt

##store data here
dbpath=C:\Program Files\MongoDB 2.6 Standard\data

##all output go here
logpath=C:\Program Files\MongoDB 2.6 Standard\log\mongo.log

logappend=true

#port number 
port=27017

##log read and write operations
diaglog=3

#replica set name
replSet=rs1

# only run on localhost for development
bind_ip = 127.0.0.1

mongo2.config.txt

##store data here
dbpath=C:\Program Files\MongoDB 2.6 Standard\data2

##all output go here
logpath=C:\Program Files\MongoDB 2.6 Standard\log2\mongo.log

logappend=true

#port number 
port=37017

##log read and write operations
diaglog=3

#replica set name
replSet=rs2

# only run on localhost for development
bind_ip = 127.0.0.1
Prasanna
  • 141
  • 1
  • 3
  • 17

1 Answers1

0

I got answer to my problem by following the steps mentioned in below blog.

http://zdk.github.io/create-a-three-member-mongodb-replica-set

Somehow it didn't work for me with configuration file. But I resolved my problem by executing commands in command line .

Prasanna
  • 141
  • 1
  • 3
  • 17