Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection failed with MongoDB Atlas #333

Open
freximo opened this issue Nov 12, 2020 · 0 comments
Open

Connection failed with MongoDB Atlas #333

freximo opened this issue Nov 12, 2020 · 0 comments

Comments

@freximo
Copy link

freximo commented Nov 12, 2020

when I try to connect mongo atlas with "mongodb+srv://:@/" I present the following error:

forum_test | /usr/local/bundle/gems/mongo-2.5.3/lib/mongo/server_selector/selectable.rb:110:in select_server': No server is available matching preference: #<Mongo::ServerSelector::Primary:0x47040075526120 tag_sets=[] max_staleness=nil> using server_selection_timeout=30 and local_threshold=0.015 (Mongo::Error::NoServerAvailable) forum_test | from /usr/local/bundle/gems/mongo-2.5.3/lib/mongo/collection/view/iterable.rb:41:in block in each'
forum_test | from /usr/local/bundle/gems/mongo-2.5.3/lib/mongo/retryable.rb:44:in read_with_retry' forum_test | from /usr/local/bundle/gems/mongo-2.5.3/lib/mongo/collection/view/iterable.rb:40:in each'
forum_test | from /usr/local/bundle/gems/mongoid-7.0.5/lib/mongoid/query_cache.rb:227:in each' forum_test | from ./app.rb:172:in map'
forum_test | from ./app.rb:172:in `

'
forum_test | W, [2020-11-12T20:30:26.625773 #1] WARN -- : NewRelic agent library not installed
forum_test | W, [2020-11-12T20:30:27.054024 #1] WARN -- : Overwriting existing field _id in class User.
forum_test | W, [2020-11-12T20:30:27.084090 #1] WARN -- : MONGODB | Unsupported client option 'max_retries'. It will be ignored.
forum_test | W, [2020-11-12T20:30:27.084160 #1] WARN -- : MONGODB | Unsupported client option 'retry_interval'. It will be ignored.
forum_test | W, [2020-11-12T20:30:27.084182 #1] WARN -- : MONGODB | Unsupported client option 'timeout'. It will be ignored.

Then I modify a file located in the path: "cs comments service / config / mongoid.yml" like this:

https://github.com/freximo/cs_comments_service/blob/master/config/mongoid.yml

and finally I did the connection tests and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant