Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13730

rs.help() link to REST interface is incorrect

      Think I found a bug, though based on past data, I am likely just doing something wrong. Can you please confirm?

      rs.help() contains the following incorrect line:

      "see also http://<mongod_host>:28017/_replSet for additional diagnostic info"

      There are a few issues with this. First, I am running my mongod on 27117, and this is supposed to be the ip address plus 1000, so it should be 28117.

      Secondly, on neither port 28017, nor on port 28117, do I see anything on localhost in my browser.

      Here is my rs.status():

      mySet:PRIMARY> rs.status()
      {
      	"set" : "mySet",
      	"date" : ISODate("2014-04-24T21:41:17Z"),
      	"myState" : 1,
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "will-macbook-air.local:27117",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 2544,
      			"optime" : Timestamp(1398374033, 1),
      			"optimeDate" : ISODate("2014-04-24T21:13:53Z"),
      			"electionTime" : Timestamp(1398374044, 1),
      			"electionDate" : ISODate("2014-04-24T21:14:04Z"),
      			"self" : true
      		},
      		{
      			"_id" : 1,
      			"name" : "will-macbook-air.local:27118",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 1641,
      			"optime" : Timestamp(1398374033, 1),
      			"optimeDate" : ISODate("2014-04-24T21:13:53Z"),
      			"lastHeartbeat" : ISODate("2014-04-24T21:41:15Z"),
      			"lastHeartbeatRecv" : ISODate("2014-04-24T21:41:15Z"),
      			"pingMs" : 0,
      			"syncingTo" : "will-macbook-air.local:27117"
      		},
      		{
      			"_id" : 2,
      			"name" : "will-macbook-air.local:27119",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 1641,
      			"optime" : Timestamp(1398374033, 1),
      			"optimeDate" : ISODate("2014-04-24T21:13:53Z"),
      			"lastHeartbeat" : ISODate("2014-04-24T21:41:16Z"),
      			"lastHeartbeatRecv" : ISODate("2014-04-24T21:41:16Z"),
      			"pingMs" : 0,
      			"syncingTo" : "will-macbook-air.local:27117"
      		}
      	],
      	"ok" : 1
      }
      

      And here is what I see on the appropriate ports:

      will@will-macbook-air:~/repo/personal/mongodb/script$ curl localhost:28117
      curl: (7) Failed connect to localhost:28117; Connection refused
      will@will-macbook-air:~/repo/personal/mongodb/script$ curl localhost:28017
      curl: (7) Failed connect to localhost:28017; Connection refused
      will@will-macbook-air:~/repo/personal/mongodb/script$
      

      (I got the same result when adding _replSet to the end).

      Also, since we're calling rs.status() on a mongod via the shell, how about we check the server uri and feed the user exactly the uri they can use.

      I didn't ask for the REST interface to be turned on. Is it on by default?

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.cross William Cross
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: