Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I authenticate to view mongodb's http console?

I'm running a mongodb process with the following line:

/usr/bin/mongod --dbpath /var/db/mongo --journal

According to mongodb's docs: http://www.mongodb.org/display/DOCS/Http+Interface

I should be able to access the http console with http://myhost:28017

When I attempt to access the page it asks for authentication.

According to the docs if security is configured I would need to authenticate. But after looking at mongodb.org/display/DOCS/Security+and+Authentication it seems clear to me I'm not using any authentication. I don't run the process with the --auth option, nor are there any users when I run a db.system.users.find() command.

What's going on here?

like image 564
Brian Laub Avatar asked Mar 22 '26 02:03

Brian Laub


1 Answers

I have been able to reproduce this, and this is not the intended behavior. I have filed https://jira.mongodb.org/browse/SERVER-4601 The fix version is 2.1.1

Thank you for bringing this to our attention!

In the meantime, there are two work-arounds:
1) Enter the credentials for authentication in the browser pop-up window 2) Remove all user credentials from each of your DBs (including admin) using db.system.users.remove()

Either of these should allow you to view the http console.

like image 135
Marc Avatar answered Mar 25 '26 01:03

Marc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!