bobthecow/genghis

Can't connect to database with authentication

Opened this issue · 7 comments

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

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

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!

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.

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

oae commented

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

Actually it seems like an issue with MongoDB 3.0 authentication

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