Mongodb replica set with authentication enabled #634
Unanswered
milindagashe
asked this question in
Q&A
Replies: 1 comment 2 replies
-
i think your problem is 1 or 2 of the following 2 options:
for replsets: const replset = await MongoMemoryReplSet.create({
replSet: {
ip: "0.0.0.0" // change this ip to something more secure if wanted, see linked documentation for more
}
}); for single instances: const instance = await MongoMemoryServer.create({
instance: {
ip: "0.0.0.0" // change this ip to something more secure if wanted, see linked documentation for more
}
}); PS: i will move this issue to a discussion |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Versions
package: mongo-memory-server
What is your question?
I am using below piece of code to create a replica set and it works fine with I am accessing the mongodb from the same server. From the different server, it says connection refused. I understand we have to add authentication to be able to gain access to mongodb from another server. Could you please suggest how to do it? I tried various things, but somehow all my attempts failed.
Beta Was this translation helpful? Give feedback.
All reactions