Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Can't connect to database with authentication #206

Open
Jobarion opened this issue May 29, 2015 · 7 comments
Open

Can't connect to database with authentication #206

Jobarion opened this issue May 29, 2015 · 7 comments

Comments

@Jobarion
Copy link

Hey,

for some reason I can't connect to my MongoDB with authentication enabled.
I'm using "http://username:[email protected]/admin", I'm only getting a 404 error
Genghis version: 2.3.11
RubyGems version: 2.4.7

@bobthecow
Copy link
Owner

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

@azovsky
Copy link

azovsky commented Jul 9, 2015

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
Copy link
Author

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
Copy link

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

@oae
Copy link

oae commented Sep 25, 2015

i also have this issue. Remote connection with user:pass@remoteip:port/db works but user:pass@localhost:port/db or user:[email protected]: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
Copy link
Author

Actually it seems like an issue with MongoDB 3.0 authentication

@guyskk
Copy link

guyskk commented Oct 9, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants