mongo shell - host name misinterpretation ?

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.6.3
    • Component/s: Shell
    • None
    • ALL
    • Hide

      Create a host entry for interface IP address (not localhost)
      launch mongod with --bind_ip ChosenHostname
      try to connect shell with "mongo ChosenHostname" and "mongo ChosenHostname:27017"

      Show
      Create a host entry for interface IP address (not localhost) launch mongod with --bind_ip ChosenHostname try to connect shell with "mongo ChosenHostname" and "mongo ChosenHostname:27017"
    • 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

            Assignee:
            Ramon Fernandez Marina
            Reporter:
            Emmanuel Jacobs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: