Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

authentication failed failed with error 13: "not authorized for insert on mongose_development.people #375

Open
rajcybage opened this issue May 15, 2015 · 5 comments

Comments

@rajcybage
Copy link

After mongod.cnf auth=true

I got

Moped::Errors::OperationFailure: The operation: #<Moped::Protocol::Command
  @length=83
  @request_id=5
  @response_to=0
  @op_code=2004
  @flags=[]
  @full_collection_name="mongose_development.$cmd"
  @skip=0
  @limit=-1
  @selector={:getlasterror=>1, :w=>1}
  @fields=nil>
failed with error 13: "not authorized for insert on mongose_development.people"

See https://github.com/mongodb/mongo/blob/master/docs/errors.md
for details about this error.
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/bundler/gems/moped-10abbf3eac37/lib/moped/operation/read.rb:50:in `block in execute'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/bundler/gems/moped-10abbf3eac37/lib/moped/node.rb:594:in `[]'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/bundler/gems/moped-10abbf3eac37/lib/moped/node.rb:594:in `block (2 levels) in flush'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/bundler/gems/moped-10abbf3eac37/lib/moped/node.rb:593:in `map'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/bundler/gems/moped-10abbf3eac37/lib/moped/node.rb:593:in `block in flush'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/bundler/gems/moped-10abbf3eac37/lib/moped/node.rb:617:in `block in logging'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
    from /home/rajarshi/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrumen

I have user with dbowner permission

and I am using the username and password.

It did not throw error in

mono shell there it is working fine

@rajcybage
Copy link
Author

the error had been fixed on 8a7719f but now it came back again

@lmancilla
Copy link

+1

@KnownSubset
Copy link

+1

This happens to me on Mongo 3+. It is fine with Mongo 2.

@mayatskiy
Copy link

Why this issue wasn't fixed yet? I think, this is EXTREME IMPORTANT.

@durran
Copy link
Member

durran commented Jun 25, 2015

If you want it fixed quickly, then submit a pull request please. Since Moped is end of life on the next Mongoid release at the end of the month there is no focused developement on Moped at the moment, and will not be in the future. Otherwise wait until next week and upgrade - the switch back to the core Ruby driver will address most of the issues here, including this one.

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

5 participants