Skip to content

No primary_preferred server is available in cluster #2920

Closed Answered by jerko-culina
jerko-culina asked this question in Q&A
Discussion options

You must be logged in to vote

The problem was in ssl_ca_cert file.

  • Tried to connect to MongoDB Atlas, directly using mongo-ruby-driver and it worked.
  • Tried again with MongoID and it failed. On bugsnag was getting no primary prefered server available. On server in rails console was getting ssl error.
  • removed ssl=true from URI but still getting error
  • removed ssl_ca_cert from options and it worked.
  • Not sure if it is bug or feature, but not matter if ssl=true is in URI is ssl_ca_cerf options is present, MongoID will try to connect using SSL
  • Anyway, at the end it was ssl error with MongoDB Atlas, but error that was in bugsnag in fact is not real error, and that caused confusion.
  • will mention this in MongoID repo.

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@jerko-culina
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jerko-culina
Comment options

@jerko-culina
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jerko-culina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants