bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 165 forks source link

Can't connect to database with authentication #206

Open Jobarion opened 9 years ago

Jobarion commented 9 years ago

Hey,

for some reason I can't connect to my MongoDB with authentication enabled. I'm using "http://username:password@mongo.example.com/admin", I'm only getting a 404 error Genghis version: 2.3.11 RubyGems version: 2.4.7

bobthecow commented 9 years ago

It should be mongodb:// not http://, right?

azovsky commented 9 years ago

I do not quite understand how genghis uses cookies, but ...

For "genghis_servers" cookie set value e.g. "["mongodb:\/\/root:1234@localhost:27017"]". It helped me and DB authorization works!

Jobarion commented 9 years ago

When I add a server with user:pw@localhost:27017/admin It tells me that it failed to authenticate the user. The password, username and db are correct, I can authenticate using the mongo shell.

GingerGeek commented 9 years ago

I've been having this issue as well, any update?

oae commented 9 years ago

i also have this issue. Remote connection with user:pass@remoteip:port/db works but user:pass@localhost:port/db or user:pass@127.0.0.1:port/db does not work.

Version:

(osx) ~|⇒ genghisapp -version
      ** Notice: The native BSON extension was not loaded. **

      For optimal performance, use of the BSON extension is recommended.

      To enable the extension make sure ENV['BSON_EXT_DISABLED'] is not set
      and run the following command:

        gem install bson_ext

      If you continue to receive this message after installing, make sure that
      the bson_ext gem is in your load path.
'genghisapp' 2.3.11
rack 1.2
sinatra 1.4.5
vegas 0.1.11
Jobarion commented 8 years ago

Actually it seems like an issue with MongoDB 3.0 authentication

guyskk commented 7 years ago

shell mongo -ppasswd -u dev remoteip:28017/admin success, but add server dev:passwd@remoteip:28017/admin failed, errors Authentication error: Failed to authenticate user 'dev' on db 'admin'.

MongoDB version 3.4.3, genghisapp version:

'genghisapp' 2.3.11
rack 1.3
sinatra 1.4.8
vegas 0.1.11