Lists common ApsaraDB for MongoDB error messages and exceptions with their causes and solutions.
|
Error message |
Cause and solution |
|
Specified parameter AccountDescription is not valid. |
When restoring a backup to a new instance, ensure the new instance name meets the specified limits. |
|
Shard total number is out of range. |
When restoring a sharded cluster to a new instance, the new instance must have the same number of shards as the source. |
|
Downgrading instance storage is not supported. |
Storage capacity cannot be decreased. Create a new instance to replace the original. Other instance specification change scenarios. |
|
Classic network is not supported. Try using VPC. |
Classic network instances no longer support renewal, specification changes, or billing method changes. [Notice] Retirement of the classic network for ApsaraDB for MongoDB. |
|
There are not enough resources for your operation. |
The destination zone has insufficient resources. Try a different instance specification, or submit a ticket to contact technical support. |
|
The oplog of the source database is not enabled. |
Standalone instances have no oplog and do not support incremental migration with Data Transmission Service (DTS). Use full data migration instead. |
|
The request references an incorrect order sales component. Contact customer support. |
Resource availability varies by zone. Try a different zone or instance specification, or submit a ticket to contact technical support. |
|
User request was denied due to user flow control. |
Alibaba Cloud limits API call frequency. View your current quotas or request a quota increase in Quota Center. |
|
Database config lacks read privileges. |
When migrating data with Data Transmission Service (DTS), the source and destination database accounts must have the required permissions. Grant permissions as described in the following topics: |
|
Specified restore time is not valid. |
When you restore an instance by calling an API, ensure that the restore time is valid. The time must be in the yyyy-MM-ddTHH:mm:ssZ format and specified in Coordinated Universal Time (UTC). For example, a China Standard Time (UTC+8) of 20:00:00 on November 8, 2024, converts to 2024-11-08T12:00:00Z in UTC. |
|
server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field. |
Cross-version restores may fail due to differing authentication mechanisms: SCRAM-SHA-1 (MongoDB 4.0) vs. SCRAM-SHA-256 (MongoDB 5.0+). Use an earlier mongorestore version (such as 4.0) when restoring across major versions. |
|
TypeError: db.xxx.find is not a function. |
The collection name may be a reserved keyword. Use |
|
createUser failed: Command failed with error xx (Unauthorized): 'not authorized on admin to execute command xxx' |
Write permissions on the admin database are restricted to prevent performance jitter. You cannot create accounts with admin write access. What permissions does the root account that is specified during instance creation have? |
|
Specified network type does not match. |
If a classic network security group is already added to the instance, you cannot add a VPC security group at the same time. |
|
The instance's minor version is not supported for this API. |
The instance runs an outdated minor version. Upgrade the minor version of the database. |
|
The instance is at the End of Full Support (EOFS) stage. |
The instance has entered End of Full Support (EOFS) and cannot be renewed. Upgrade the major version of the database. |
|
Resource unavailable. |
A resource issue occurred during instance creation or modification. Obtain the Request ID and submit a ticket to contact technical support. |
Connection and network errors
Error message | Cause and solution |
|
|
| The instance has likely reached its connection limit and is refusing new connections. Solution:
|
| The wait queue of the MongoDB driver is full. This can happen if the connection pool size is too small or if there is a high volume of concurrent requests, which exhausts available connections. Solution:
|
| An excessive number of concurrent connections can exhaust the available sessions. Solution:
|
| Check whether the instance endpoint is correct. For more information, see the following topics: |
| An ECS instance fails to connect to an ApsaraDB for MongoDB instance over a private network. Solution:
|
|
|
| The node that you are writing data to is not the primary node. Cause: Write operations can be performed only on the primary node. A failover can change a primary node (to which your application was connected) into a secondary node, causing subsequent write operations to fail. Solution:
As a best practice, implement reconnection logic and exception handling in your application. This ensures that your application can automatically reconnect after a transient disconnection and remain stable. |
| The instance is locked because its disk space is full. Solution: See Resolve instance locking or write failures caused by exhausted disk space. |
|
|
| The password of the database account contains special characters, such as Solution: See How do I resolve a connection failure that is caused by special characters in a password?. |
| ApsaraDB for MongoDB does not support the |
Upgrade errors from 4.2 to 4.4
|
Error message |
Cause and solution |
|
CHECK_USER_COLLECTIONS_IN_ADMIN_FAILED |
Cause: The admin database contains non-system collections. MongoDB 4.4+ revokes write permissions on the admin database for root and custom accounts. Move these collections to other databases. Solution:
|
|
CHECK_USERS_AND_ROLES_FAILED |
Cause: The admin database has custom accounts with high-privilege roles. MongoDB 4.4+ revokes write permissions on the admin database for root and custom accounts. Remove these write permissions from the custom accounts. Solution: The console error message identifies the account and role: "user my_user has high privilege role readWrite". Run the following command to revoke the readWrite role on the admin database from my_user. Important
Before running this command, ensure your application does not use this account to write data to the admin database.
|