[SERVER-13730] rs.help() link to REST interface is incorrect Created: 24/Apr/14  Updated: 31/Jul/15  Resolved: 23/Jul/14

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 2.7.4

Type: Bug Priority: Trivial - P5
Reporter: William Cross Assignee: Unassigned
Resolution: Done Votes: 0
Labels: neweng, polish, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

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?



 Comments   
Comment by Githook User [ 23/Jul/14 ]

Author:

{u'username': u'justincase', u'name': u'Justin Case', u'email': u'hello@justincase.cx'}

Message: SERVER-13730 remove hardcoded REST URL from rs.help()

Closes #716

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/c8f3b90326a4a958ccd1ca90a2b4e03c33476e7f

Comment by Daniel Pasette (Inactive) [ 24/Apr/14 ]

the rest interface is not enabled by default. the help message should remove reference to it.

Generated at Thu Feb 08 03:32:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.