开发者

Why mongoDB built-in http stats interface on port 28017 doesn't work at all?

开发者 https://www.devze.com 2023-03-13 07:06 出处:网络
Well guys, I\'m trying to get that MongoDB feature working for hours: http://www.mongodb.org/display/DOCS/Http+Interface

Well guys, I'm trying to get that MongoDB feature working for hours:

http://www.mongodb.org/display/DOCS/Http+Interface

I start mongod with external configuration file on Mac OS X platform. Almost all the settings in the config file is default. I've turned of the authentication and make sure http interface is on :

nohttpinterface = false 

MongoDB starts successfully and does it's job. And just to make sure that it listens on port 27017, I do following:

(web)Roy-MacBook:/ roy$ curl loca开发者_开发技巧lhost:27017
You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number

which is fine. And I try to check the same thing for the port 28017:

(web)Roy-MacBook:/ roy$ curl localhost:28017
curl: (7) couldn't connect to host

Even though with telnet:

(web)Roy-MacBook:/ roy$ telnet localhost 28017
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host

I don't know if I have to tell that I've tried with a browser. I don't run any custom web or any other server that blocks the port 28017. I could only find one bug here:

https://jira.mongodb.org/browse/SERVER-2917

but it is related with --auth command that I don't use nor I have any user show out of "db.system.users.find()".

One strange thing is when I turn on mms-name, mms-token or mms-interval in configuration as shown as their config reference here (www.mongodb.org/display/DOCS/File+Based+Configuration), mongod gives following error:

error command line: unknown option mms-name
use --help for help

I though that might be the relative problem.. Any opinion will be appreciated, thanks.


This looks like a bug in the config parser. Take this line OUT of your config file:

nohttpinterface = false

When I added that line it turned the HTTP interface off on my Mac even though it's set to false.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号