如何在MongoDB 2.6副本集上启用HTTP控制台 [英] How to enable HTTP console on MongoDB 2.6 replica set

查看:109
本文介绍了如何在MongoDB 2.6副本集上启用HTTP控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行3个服务器的MongoDB副本集.我最近从2.4升级到2.6.

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

在2.4上,无论三台服务器是主服务器还是辅助服务器,我都可以访问HTTP控制台.现在使用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

如果我用2.6创建一个完全新鲜的独立实例,它将起作用.但是,在副本集上却没有. MongoDB运行在27017上,我确认28017上没有任何运行,因此可以排除防火墙问题.

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?

推荐答案

添加

httpinterface=true

/etc/mongod.conf中的

http://127.0.0.1:28017上启用它 我必须添加

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

rest=true

启用REST接口,以便http控制台中的命令正常工作.

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

这篇关于如何在MongoDB 2.6副本集上启用HTTP控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆