错误代码
发生错误时, MongoDB将返回以下代码之一。 使用本指南解读日志以及解决 mongod
和mongos
实例的问题。
代码 | 原因 |
---|---|
InternalError | |
BadValue | |
NoSuchKey | |
GraphContainsCycle | |
HostUnreachable | |
HostNotFound | |
UnknownError | |
FailedToParse | |
CannotMutateObject | |
UserNotFound | |
UnsupportedFormat | |
Unauthorized | |
TypeMismatch | |
溢出(Overflow) | |
InvalidLength | |
ProtocolError | |
身份验证失败 | |
CannotReuseObject | |
IllegalOperation | |
EmptyArrayOperation | |
InvalidBSON | |
AlreadyInitialized | |
LockTimeout | |
RemoteValidationError | |
NamespaceNotFound | |
IndexNotFound | |
PathNotViable | |
NonExistentPath | |
InvalidPath | |
RoleNotFound | |
RolesNotRelated | |
PrivilegeNotFound | |
CannotBackfillArray | |
UserModificationFailed | |
RemoteChangeDetected | |
FileRenameFailed | |
FileNotOpen | |
FileStreamFailed | |
ConflictingUpdateOperators | |
FileAlreadyOpen | |
LogWriteFailed | |
CursorNotFound | |
UserDataInconsistent | |
LockBusy | |
NoMatchingDocument | |
NamespaceExists | |
InvalidRoleModification | |
MaxTimeMSExpired | |
ManualInterventionRequired | |
DollarPrefixedFieldName | |
InvalidIdField | |
NotSingleValueField | |
InvalidDBRef | |
EmptyFieldName | |
DottedFieldName | |
RoleModificationFailed | |
CommandNotFound | |
ShardKeyNotFound | |
OplogOperationUnsupported | |
StaleShardVersion | |
WriteConcernFailed | |
MultipleErrorsOccurred | |
ImmutableField | |
CannotCreateIndex | |
IndexAlreadyExists | |
AuthSchemaIncompatible | |
ShardNotFound | |
ReplicaSetNotFound | |
InvalidOptions | |
InvalidNamespace | |
NodeNotFound | |
WriteConcernLegacyOK | |
NoReplicationEnabled | |
OperationIncomplete | |
CommandResultSchemaViolation | |
UnknownReplWriteConcern | |
RoleDataInconsistent | |
NoMatchParseContext | |
NoProgressMade | |
RemoteResultsUnavailable | |
IndexOptionsConflict | |
IndexKeySpecsConflict | |
CannotSplit | |
NetworkTimeout | |
CallbackCanceled | |
ShutdownInProgress | |
SecondaryAheadOfPrimary | |
InvalidReplicaSetConfig | |
NotYetInitialized | |
NotSecondary | |
OperationFailed | |
NoProjectionFound | |
DBPathInUse | |
UnsatisfiableWriteConcern | |
OutdatedClient | |
IncompatibleAuditMetadata | |
NewReplicaSetConfigurationIncompatible | |
NodeNotElectable | |
IncompatibleShardingMetadata | |
DistributedClockSkewed | |
LockFailed | |
InconsistentReplicaSetNames | |
ConfigurationInProgress | |
CannotInitializeNodeWithData | |
NotExactValueField | |
写冲突 (write conflict) | |
InitialSyncFailure | |
InitialSyncOplogSourceMissing | |
CommandNotSupported | |
DocTooLargeForCapped | |
ConflictingOperationInProgress | |
NamespaceNotSharded | |
InvalidSyncSource | |
OplogStartMissing | |
DocumentValidationFailure(仅适用于集合上的文档验证器) | |
NotAReplicaSet | |
IncompatibleElectionProtocol | |
CommandFailed | |
RPCProtocolNegotiationFailed | |
UnrecoverableRollbackError | |
LockNotFound | |
LockStateChangeFailed | |
SymbolNotFound | |
FailedToSatisfyReadPreference | |
ReadConcernMajorityNotAvailableYet | |
StaleTerm | |
CappedPositionLost | |
IncompatibleShardingConfigVersion | |
RemoteOplogStale | |
JSInterpreterFailure | |
InvalidSSLConfiguration | |
SSLHandshakeFailed | |
JSUncatchableError | |
CursorInUse | |
IncompatibleCatalogManager | |
PooledConnectionsDropped | |
ExceededMemoryLimit | |
ZLibError | |
ReadConcernMajorityNotEnabled | |
NoConfigPrimary | |
StaleEpoch | |
OperationCannotBeBatched | |
OplogOutOfOrder | |
ChunkTooBig | |
InconsistentShardIdentity | |
CannotApplyOplogWhilePrimary | |
CanRepairToDowngrade | |
MustUpgrade | |
DurationOverflow | |
MaxStalenessOutOfRange | |
IncompatibleCollationVersion | |
CollectionIsEmpty | |
ZoneStillInUse | |
InitialSyncActive | |
ViewDepthLimitExceeded | |
CommandNotSupportedOnView | |
OptionNotSupportedOnView | |
InvalidPipelineOperator | |
CommandOnShardedViewNotSupportedOnMongod | |
TooManyMatchingDocuments | |
CannotIndexParallelArrays | |
TransportSessionClosed | |
TransportSessionNotFound | |
TransportSessionUnknown | |
QueryPlanKilled | |
FileOpenFailed | |
ZoneNotFound | |
RangeOverlapConflict | |
WindowsPdhError | |
BadPerfCounterPath | |
AmbiguousIndexKeyPattern | |
InvalidViewDefinition | |
ClientMetadataMissingField | |
ClientMetadataAppNameTooLarge | |
ClientMetadataDocumentTooLarge | |
ClientMetadataCannotBeMutated | |
LinearizableReadConcernError | |
IncompatibleServerVersion | |
PrimarySteppedDown | |
MasterSlaveConnectionFailure | |
FailPointEnabled | |
NoShardingEnabled | |
BalancerInterrupted | |
ViewPipelineMaxSizeExceeded | |
InvalidIndexSpecificationOption | |
ReplicaSetMonitorRemoved | |
ChunkRangeCleanupPending | |
CannotBuildIndexKeys | |
NetworkInterfaceExceededTimeLimit | |
ShardingStateNotInitialized | |
TimeProofMismatch | |
ClusterTimeFailsRateLimiter | |
NoSuchSession | |
InvalidUUID | |
TooManyLocks | |
StaleClusterTime | |
CannotVerifyAndSignLogicalTime | |
KeyNotFound | |
IncompatibleRollbackAlgorithm | |
DuplicateSession | |
AuthenticationRestrictionUnmet | |
DatabaseDropPending | |
ElectionInProgress | |
IncompleteTransactionHistory | |
UpdateOperationFailed | |
FTDCPathNotSet | |
FTDCPathAlreadySet | |
IndexModified | |
CloseChangeStream | |
IllegalOpMsgFlag | |
QueryFeatureNotAllowed | |
TransactionTooOld | |
AtomicityFailure | |
CannotImplicitlyCreateCollection | |
SessionTransferIncomplete | |
MustDowngrade | |
DNSHostNotFound | |
DNSProtocolError | |
MaxSubPipelineDepthExceeded | |
TooManyDocumentSequences | |
RetryChangeStream | |
InternalErrorNotSupported | |
ForTestingErrorExtraInfo | |
CursorKilled | |
NotImplemented | |
SnapshotTooOld | |
DNSRecordTypeMismatch | |
ConversionFailure | |
CannotCreateCollection | |
IncompatibleWithUpgradedServer | |
BrokenPromise | |
SnapshotUnavailable | |
ProducerConsumerQueueBatchTooLarge | |
ProducerConsumerQueueEndClosed | |
StaleDbVersion | |
StaleChunkHistory | |
NoSuchTransaction | |
ReentrancyNotAllowed | |
FreeMonHttpInFlight | |
FreeMonHttpTemporaryFailure | |
FreeMonHttpPermanentFailure | |
TransactionCommitted | |
TransactionTooLarge | |
UnknownFeatureCompatibilityVersion | |
KeyedExecutorRetry | |
无效的恢复令牌 | |
TooManyLogicalSessions | |
ExceededTimeLimit | |
OperationNotSupportedInTransaction | |
TooManyFilesOpen | |
OrphanedRangeCleanUpFailed | |
FailPointSetFailed | |
PreparedTransactionInProgress | |
CannotBackup | |
DataModifiedByRepair | |
RepairedReplicaSetNode | |
JSInterpreterFailureWithStack | |
MigrationConflict | |
ProducerConsumerQueueProducerQueueDepthExceeded | |
ProducerConsumerQueueConsumed | |
ExchangePassthrough | |
IndexBuildAborted | |
AlarmAlreadyFulfilled | |
UnsatisfiableCommitQuorum | |
ClientDisconnect | |
ChangeStreamFatalError | |
TransactionCoordinatorSteppingDown | |
TransactionCoordinatorReachedAbortDecision | |
WouldChangeOwningShard | |
ForTestingErrorExtraInfoWithExtraInfoInNamespace | |
IndexBuildAlreadyInProgress | |
ChangeStreamHistoryLost | |
TransactionCoordinatorDeadlineTaskCanceled | |
ChecksumMismatch | |
WaitForMajorityServiceEarlierOpTimeAvailable | |
TransactionExceededLifetimeLimitSeconds | |
NoQueryExecutionPlans | |
QueryExceededMemoryLimitNoDiskUseAllowed | |
InvalidSeedList | |
InvalidTopologyType | |
InvalidHeartBeatFrequency | |
TopologySetNameRequired | |
HierarchicalAcquisitionLevelViolation | |
InvalidServerType | |
OCSPCertificateStatusRevoked | |
RangeDeletionAbandonedBecauseCollectionWithUUIDDoesNotExist | |
DataCorruptionDetected | |
OCSPCertificateStatusUnknown | |
SplitHorizonChange | |
ShardInvalidatedForTargeting | |
RangeDeletionAbandonedBecauseTaskDocumentDoesNotExist | |
CurrentConfigNotCommittedYet | |
ExhaustCommandFinished | |
PeriodicJobIsStopped | |
TransactionCoordinatorCanceled | |
OperationIsKilledAndDelisted | |
ResumableRangeDeleterDisabled | |
ObjectIsBusy | |
TooStaleToSyncFromSource | |
QueryTrialRunCompleted | |
ConnectionPoolExpired | |
ForTestingOptionalErrorExtraInfo | |
MovePrimaryInProgress | |
TenantMigrationConflict | |
TenantMigrationCommitted | |
APIVersionError | |
APIStrictError | |
APIDeprecationError | |
TenantMigrationAborted | |
OplogQueryMinTsMissing | |
NoSuchTenantMigration | |
TenantMigrationAccessBlockerShuttingDown | |
TenantMigrationInProgress | |
SkipCommandExecution | |
FailedToRunWithReplyBuilder | |
CannotDowngrade | |
ServiceExecutorInShutdown | |
MechanismUnavailable | |
TenantMigrationForgotten | |
SocketException | |
CannotGrowDocumentInCappedNamespace | |
NotWritablePrimary | |
BSONObjectTooLarge | |
DuplicateKey | |
InterruptedAtShutdown | |
已中断 | |
InterruptedDueToReplStateChange | |
BackgroundOperationInProgressForDatabase | |
BackgroundOperationInProgressForNamespace | |
MergeStageNoMatchingDocument | |
DatabaseDifferCase | |
StaleConfig | |
NotPrimaryNoSecondaryOk | |
NotPrimaryOrSecondary | |
OutOfDiskSpace | |
ClientMarkedKilled |