-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.6.3
-
Component/s: Shell
-
None
-
ALL
-
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Using Windows I have an IP-name association in the host file which is "rs01 25.1.1.1" checked with:
>ping rs01
Pinging rs01 [25.1.1.1] with 32 bytes of data:
Reply from 25.1.1.1: bytes=32 time<1ms TTL=128
...
mongod is launched with "--bind_ip rs01"
Proper binding checked with:
>netstat -an | grep 27017
STDIN
TCP 25.1.1.1:27017 0.0.0.0:0 LISTENING
When typing "mongo rs01" shell try and fail to connect to 127.0.0.1
>mongo rs01
MongoDB shell version: 2.6.3
connecting to: rs01
2014-08-01T11:13:57.206+0200 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2014-08-01T11:13:57.211+0200 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed
When typing "mongo rs01:27017" shell connect to correct IP
>mongo rs01:27017
MongoDB shell version: 2.6.3
connecting to: rs01:27017/test
> exit
bye