Error
Error Code: 104

MongoDB Error 104: Member Cannot Be Primary

📦 MongoDB
📋

Description

This error indicates that a MongoDB replica set member is configured in a way that explicitly prevents it from being elected as the primary. While sometimes intentional for specific roles, this can affect replica set failover capabilities and overall availability if not properly managed.
💬

Error Message

Node Not Electable
🔍

Known Causes

3 known causes
⚠️
Member Priority Set to Zero
The replica set member's 'priority' setting is explicitly configured to 0, which means it will never participate in elections to become primary.
⚠️
Configured as an Arbiter Node
The member is configured with 'arbiterOnly: true', designating it as an arbiter whose sole purpose is to cast votes, not to hold data or become primary.
⚠️
Configured as a Hidden Member
The replica set member is configured with 'hidden: true', which prevents it from becoming primary or serving read operations from clients.
🛠️

Solutions

Coming Soon

Detailed step-by-step solutions for this error are being prepared. In the meantime, try these general troubleshooting tips:

General 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
🔗

Related Errors

5 related errors