-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: 1.6.1
-
Component/s: None
-
Environment:Ubuntu, jruby
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I have a 3 node replica set and have taken down two nodes which leaves me with one node marked as a secondary.
My test app does the following:
opts = { :pool_size => 5, :require_primary => false, :read => :secondary }
conn = Mongo::ReplSetConnection.new(config[:servers], opts)
db = conn.db(db_name)
db.authenticate(user_name, password)
I get a connection to the secondary but when I try and authenticate I get the following error:
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `authenticate_existing' for nil:NilClass
at ReplSetConnection.authenticate_pools(.../vendor/bundle/jruby/1.9/gems/mongo-1.6.1/lib/mongo/repl_set_connection.rb:290)
at DB.authenticate(.../vendor/bundle/jruby/1.9/gems/mongo-1.6.1/lib/mongo/db.rb:114)
...
I don't know if this is by design or not. But I would like to be able to authenticate when there is no primary just so my app can keep functioning.
Thanks,
Raul