Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4067

authentication failed failed with error 13: "not authorized for insert on

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Resolution: Done
    • None
    • 12_01_17
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            rajcybage rajcybage
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: