Database operational contract

MongoDB 8.0 direct connection to shard improper sharded cluster error use mongos backup tool shard direct command

An admin/backup tool connects directly to a shard and receives an improper sharded-cluster error.

MongoDB 8.0Document databaseDatabase operational contractmongo8

Agent Quick Fix

Repair against the current MongoDB 8.0 contract, then keep the change narrow and source-backed.

Product: MongoDB 8.0
Current-contract area: Direct command against shard rejected; must use mongos
Likely root cause: An admin/backup tool connects directly to a shard and receives an improper sharded-cluster error.
Repair direction: Verifier checks durability, restart, and operational safety rather than a one-shot query. Check durability, topology-safe routing, and monitoring meaning.

Symptom

An admin/backup tool connects directly to a shard and receives an improper sharded-cluster error.

Why This Happens

The local schema/query is valid, but upgrade path, restart behavior, replication syntax, or background operations changed in the server release.

Common Wrong Fixes

  • Changing local code without checking the current external contract.
  • Retrying the same install, build, or API call with no version/source change.
  • Applying a broad unsafe bypass when a narrow compatibility fix is available.

Codex Search Keywords

These are the search terms observed in a neutral Codex validation run for this failure shape.

MongoDB 8.0 direct connection to shard improper sharded cluster error use mongos backup tool shard direct command
site:mongodb.com/docs/manual MongoDB 8.0 connect directly to shard mongos
MongoDB sharded cluster do not connect directly to shard mongos documentation
https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/
'Applications never connect or communicate directly with the shards.' in https://www.mongodb.com/docs/manual/core/sharded-cluster-query-router/

Source Trail