Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2578

Fail to authenticate user on my db

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.9.2
    • Component/s: Auth
    • None

      When I login mongodb in my ruby code against ruby driver 1.9.2, always told me the

      Failed to authenticate user 'appuser' on db 'details_info'

      db_options = {
      
          ssl: false,
      
          pool_size: 40,
      
          pool_timeout: 30
      
      }
      
      
      
      client = MongoClient.from_uri("mongodb://appuser:appuserpassword@10.38.99.11/details_info")
      col = client.db('details_info').collection('test_report')
      col.insert(...)
      
      
      

       

      logs:

      Mongo::AuthenticationError: Failed to authenticate user 'appuser' on db 'details_info'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/db.rb:179:in `issue_authentication'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:275:in `block in apply_saved_authentication'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:274:in `each'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:274:in `apply_saved_authentication'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/pool.rb:190:in `checkout_new_socket'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/pool.rb:288:in `block (2 levels) in checkout'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/pool.rb:279:in `synchronize'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/pool.rb:279:in `block in checkout'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/pool.rb:272:in `loop'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/pool.rb:272:in `checkout'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:563:in `checkout_writer'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/networking.rb:85:in `send_message_with_gle'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/collection.rb:1121:in `block in send_insert_message'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/logging.rb:55:in `block in instrument'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/logging.rb:20:in `instrument'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/util/logging.rb:54:in `instrument'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/collection.rb:1119:in `send_insert_message'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/collection.rb:1111:in `insert_batch'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/collection.rb:1169:in `insert_documents'D:/Workspace/ruby230/2.3.0/lib/ruby/gems/2.3.0/gems/mongo-1.9.2/lib/mongo/collection.rb:389:in `insert'
      

      When I use ruby driver 2.14.0, the authentication is successfully, but doesn't work in 1.9.2. We really need 1.9.2 working for us

            Assignee:
            Unassigned Unassigned
            Reporter:
            yunfeng4833@126.com tracy ren
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: