Error
Error Code:
108
MongoDB Error 108: Mismatched Replica Set Names
Description
Error 108, "Inconsistent Replica Set Names," indicates that the `replSetName` configured for one or more `mongod` instances intended to be part of the same replica set does not match. This prevents the instances from forming or communicating as a cohesive replica set, often occurring during initial setup, configuration updates, or when adding new members.
Error Message
Inconsistent Replica Set Names
Known Causes
3 known causesManual Configuration Mismatch
The `replSetName` parameter in `mongod.conf` files or specified via command-line arguments differs across `mongod` instances meant for the same replica set.
Adding Member with Different Name
Attempting to add a new `mongod` instance to an existing replica set where the new member's configured `replSetName` does not match the primary's replica set name.
Incorrect `rs.initiate()` or `rs.add()` Usage
The replica set name provided in `rs.initiate()` or `rs.add()` commands does not align with the `replSetName` configured in the `mongod` instances' configuration files.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service