How to enable the HTTP console in MongoDB 2.6 replica set

I am running a MongoDB replica set with 3 servers. I recently upgraded from 2.4 to 2.6.

In 2.4, I managed to get to the HTTP console on all three servers, regardless of whether they are primary or secondary. Now with 2.6, there is another configuration option needed to enable the console.

# Disable the HTTP interface (Defaults to localhost:28017).
#nohttpinterface = true
nohttpinterface = false

If I create a completely new, standalone instance with 2.6, it works. However, on a replica set, this is not so. MongoDB runs on 27017, and I confirmed that nothing works on 28017, so it fixes problems with the firewall.

Are there any additional changes needed to enable this feature in the replica set?

+4
source share
3 answers

Adding

httpinterface=true

/etc/mongod.conf http://127.0.0.1:28017

rest=true

REST, http .

+6

mongodb v3.0.2 mongod.conf yaml, :

http.enabled: true
http.RESTInterfaceEnabled: true

my mongod.conf

net:
  bindIp: 127.0.0.1

  http.enabled: true
  http.RESTInterfaceEnabled: true
+2

https://docs.mongodb.com/ecosystem/tools/http-interfaces/

HTTP HTTP Interface

Deprecated since version 3.2: since 3.2, MongoDB depreciates the HTTP interface.

+1
source

Source: https://habr.com/ru/post/1537551/


All Articles