-
Notifications
You must be signed in to change notification settings - Fork 116
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
MongoDB connection fails with current default options #160
Comments
Would you like to create a PR? |
Hi @adrai thanks for the quick response! I don't mind updating the documentation! However I'm currently on full work + education schedule and can't contribute, unfortunately. If I manage to have some time and nobody started working on this, I will make sure to update the issue to refer that I will update the documentation. Regarding backwards compatability, do you mind explaining a little better? I'm not used to the term so I can't seem to figure out the case here. |
If we would change the defaults, which currently are: {
host: 'localhost',
port: 27017,
dbName: 'eventstore',
eventsCollectionName: 'events',
snapshotsCollectionName: 'snapshots',
transactionsCollectionName: 'transactions'//,
// heartbeat: 60 * 1000
};
var defaultOpt = {
ssl: false
}; and most of the users of this library use some sort of local network connection to the mongodb server, without any ssl; this would break their code... |
Oh I see, makes sense. Thanks for the explanation! |
@freitzzz were you ever able to get this to connect to mongo atlas? When I run |
yes @m-sterspace want me to send a code snippet? |
i don't think that changing the defaults is an option. you provide a connection string with all the options that you might need and this should work.The defaults are, as the name suggests, defaults for most users which will use a local mongo connection. |
i dont think you can disable or enable SSL communication through the connection string |
@freitzzz according to the mongodb docs you can - https://docs.mongodb.com/manual/reference/connection-string/#connection-options |
Didn't know about this, thank you |
were you guys able to get this to work with mongo atlas? I'm struggling with some strange errors. my app seems to connect find, but when I try any query ie. getEventsByRevision, i get the following: I've been using this package for a couple years with a mongo cluster I run in my own kubernetes cluster. I'm ready to give atlas a shot, but I'm having issues. Can anyone shed light on their config/settings to get this to work? |
Mongo Atlas = Mongo Cloud, right? If so, yes. |
Yes. And using that repo I was able to get mine working! Thanks! for others who struggle with this. My changes were this:
This is what I added.
|
Glad to know it helped :) |
Since
ssl
option is set to false, it is not possible to establish a connection to a MongoDB server using an ecrypted connection (e.g. MongoDB Atlas). This option is not even featured in how to connect to each database in README.md. It would be great if the documentation on how to get started is updated as well as defaulting ssl option to true.The text was updated successfully, but these errors were encountered: