Skip to content

Mongo authentication error  #656

Open

Description

@sunnybogawat

I am using gem mongomapper in my rails application. I have installed mongo and there is mongo router which managing different mongo instances. The schema which I am using in my rails application requires username and password to connect. when I am connecting this schema from mongo console I am able to successfully pass through but it fails when the same thing tries from my rails application. I am getting mongo authentication error. Here are the logs
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/mongo-1.11.1/lib/mongo/functional/authentication.rb:205:in issue_authentication': Failed to authenticate user 'xxxxx' on db 'xxxxxx'. (Mongo::AuthenticationError)
from /usr/local/rvm/gems/ruby-1.9.3-p374/gems/mongo-1.11.1/lib/mongo/functional/authentication.rb:135:in add_auth' from /usr/local/rvm/gems/ruby-1.9.3-p374/gems/mongo-1.11.1/lib/mongo/db.rb:159:in authenticate'
from /usr/local/rvm/gems/ruby-1.9.3-p374/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:83:in connect' from /usr/local/rvm/gems/ruby-1.9.3-p374/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:89:in setup'`

Activity

  1. smtlaissezfaire commented on Oct 3, 2020

    @smtlaissezfaire
    Member

    I suspect that this has to do with mongomapper versions that didn't support mongo versions greater than 2.6+.

    If you are still trying this, can you try mongomapper > 0.15+?

    Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions