M
104
Call a Pro
MongoDB · Database Server & Atlas
MongoDB server reported: Incompatible Sharding Metadata.
Quick Answer
Error code 104 on your MongoDB Database Server & Atlas means: MongoDB server reported: Incompatible Sharding Metadata.. This is usually fixable — see the step-by-step guide below.
Affected Models
Likely Causes
  1. MongoDB returned code 104 (IncompatibleShardingMetadata) while processing this request path.
  2. Cluster topology changed during execution (primary step-down, shard movement, or stale metadata).
  3. Replication or sharding state was not aligned with the operation preconditions.
How to Fix It
1
Review logs/telemetry for code 104 (IncompatibleShardingMetadata) and capture the exact command and parameters that triggered it.
2
Gate retries on a stable cluster view and avoid stale routing caches.
3
Refresh topology metadata and retarget the command using current primary/shard ownership.
4
Review replication/sharding events around the timestamp to confirm role transitions.
5
Add monitoring for recurring IncompatibleShardingMetadata events so future incidents are detected and triaged faster.
Pro Tip
This issue typically requires professional diagnosis. Attempting this fix without proper training could cause further problems.
Related Error Codes
Video Guides
Loading video guides…
Search more on YouTube →