MongoDB Replica Set connections cannot resolve
Closed this issue ยท 0 comments
There is no current way to connect MongoDB replica sets to Luck Perms. Currently, the method used in MongoDao
uses a ServerAddress to initiate connections which cannot resolve URI connections (syntax: "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]
")
Here's an example:
- User has replica set located here:
database-tyjas.mongodb.net
- Upon connection via ServerAddress, ServerAddress cannot resolve the address because there is a specific connection URI that must be used in order to connect. Example error.
Here's a Fix:
- Implement
MongoClientURI
inMongoDao
class and allow that to be used instead of traditional database options.
I've created a pull request with the solution I have proposed.
Thank you for your work on this plugin.