Rutula,
Thank you for sending the error log for review. In order to verify that the primary is running and reachable, could you please post the output of
rs.status()
for analysis?
Please review rs.status() for more information on this command.
You may also find it helpful to review replica set troubleshooting steps to help guide you on resolving common replica set issues.
It might also be useful to check the DNS. It might be a situation where the service is unable to resolve the hostname.
Could you send us a snippet of code for your C# app that contains the connection string and also the readPreference settings?
Can you please verify the MongoDB C# driver version ?
Regards,
Chris
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/TRMHAY66sEc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c24bc41e-fb3e-4255-a051-3f2da6ae1572%40googlegroups.com.
Hi Rutula,
I believe there are a couple of issues in your deployment.
The first issue is the connection string:
mongodb://user:pwd@gpx-bi-mdb-1:12000,gpx-bi-mdb-2:12500,gpx-bi-mdb-3:13000/coupon
This connection string does not specify a replica set, and will connect to the first node, which is gpx-bi-mdb-1:12000
. The correct connection string for connecting to your replica set should be mongodb://user:pwd@gpx-bi-mdb-1:12000,gpx-bi-mdb-2:12500,gpx-bi-mdb-3:13000/?replicaSet=mongoreplicationgpx
. Please see Connection String URI Format for more details.
Having said that, the connection string you provided and the host specifications in the rs.status()
output are different.
According to the connection string, the hosts are: gpx-bi-mdb-1:12000
, gpx-bi-mdb-2:12500
, and gpx-bi-mdb-3:13000
, while according to rs.status
, the hosts are: gpx-bi-mdb-1:27017
, gpx-bi-mdb-2:27017
, and gpx-bi-mdb-3:27017
Is there a reason why the port numbers are different due to your deployment method? E.g., are the mongod
processes run inside a container, are there multiple mongod
processes or mongod
containers running in a single machine, etc.?
The second issue is this message:
“Received heartbeat from member with the same member ID as ourself:”
A possible cause for this error is running rs.initiate()
on multiple nodes before they are added to a replica set. Could you please elaborate on the exact steps performed during the creation of the replica set? A step-by-step guide to deploy a replica set is available in Deploy a Replica Set. The important step is use rs.initiate()
on one and only one member of the replica set.
Also, what is the exact version number of your MongoDB? Please note that the latest in the 3.0 series is currently 3.0.12. I would recommend upgrading for bugfixes and improvements.
Best regards,
Kevin