【发布时间】:2016-09-12 23:19:56
【问题描述】:
今天早上,我可以在端口 27010 和 37010 上创建 2 个不同的 mongo 实例,并且可以使用 mongo-connector 进行复制。但是现在系统重新启动后,我无法使用以下命令连接到端口 37010。
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
如果我只给 mongo 它只连接到默认端口 27010,它工作正常。早上我也遇到了同样的问题,我删除了我所有的 mongo windows 服务并在没有 mongo windows 服务的情况下运行。但我再次面临同样的问题。请多多指教。
下面是我的配置文件。
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
【问题讨论】:
-
嗨,大家有什么建议
标签: mongodb mongodb-query mongoid mongo-java