mongodb的mongos启动了 但是链接不上

E:\mongodb\bin>mongos --logpath E:\mongodb\data\m30\log\m30.log --port 40000 --configdb rs2/192.168.1.148:27030
2017-11-22T16:24:16.403+0800 W SHARDING [main] Running a sharded cluster with fewer than 3 config servers should only be done for testing purposes and is not recommended for production.
2017-11-22T16:24:16.407+0800 I CONTROL [main] log file "E:\mongodb\data\m30\log\m30.log" exists; moved to "E:\mongodb\data\m30\log\m30.log.2017-11-22T08-24-16".
这是我启动mongos 但是我telnet40000端口不通 然后mongo --port 40000
D:\mongodb\bin>mongo --port 40000
MongoDB shell version: 3.2.4
connecting to: 127.0.0.1:40000/test
2017-11-22T16:24:19.897+0800 W NETWORK [thread1] Failed to connect to 127.0.0.1:40000, reason: errno:10061 由于目标计算机积极拒绝,无法连接。
2017-11-22T16:24:19.898+0800 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:40000, connection attempt failed :
connect@src/mongo/shell/mongo.js:226:14
@(connect):1:6

exception: connect failed
这是为什么啊 是我启动不对吗

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!