Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable HTTP console on MongoDB 2.6 replica set

Tags:

mongodb

I'm running a 3 server MongoDB replica set. I recently upgraded from 2.4 to 2.6.

On 2.4 I was able to reach the HTTP Console on all three servers, regardless of whether they were Primary or Secondary. Now with 2.6 there is a different config setting needed to enable the console.

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

If I create a completely fresh, standalone instance with 2.6, it works. However on the replica set, it does not. MongoDB is running on 27017 and I have confirmed nothing is running on 28017, so that rules out firewall issues.

Are there additional changes required to enable this feature on a replica set?

like image 613
jaredstenquist Avatar asked Dec 20 '22 15:12

jaredstenquist


1 Answers

Adding

httpinterface=true

in /etc/mongod.conf enables it on http://127.0.0.1:28017 I had to add

rest=true

to enable REST interface so that commands in http console are working.

like image 101
bart Avatar answered Jan 14 '23 07:01

bart