Unexpected errors can halt critical operations when you manage ApsaraDB for MongoDB instances. The root cause can range from a simple misconfiguration, such as an incorrect whitelist entry or connection string, to more complex issues specific to a managed environment, like resource limitations in a zone, API rate-limiting, or high-availability failover events. This guide maps common error messages to their causes and provides actionable solutions to help you quickly resolve issues, minimize downtime, and ensure database stability.
Error message | Cause and solution |
Specified parameter AccountDescription is not valid. | When you restore backup data to a new instance, ensure that the instance name meets the specified limits. |
Shard total number is out of range. | When you restore data from a sharded cluster instance to a new instance, ensure that the new instance has the same number of shards as the source instance. |
The downgrading dbinstance storage does not supported. | ApsaraDB for MongoDB does not support reducing the storage capacity of an instance. To reduce the storage capacity, create a new instance to replace the source one. See Other configuration change scenarios and methods. |
The classic network is no longer supported. We recommend that you use a VPC. | You can no longer renew, change the instance type, or change the billing method for ApsaraDB for MongoDB instances that are in the classic network. See [Notice] EOL for ApsaraDB for MongoDB instances on the classic network. |
Insufficient resources for the requested operation. | This error occurs because the zone where the instance resides has insufficient resources for the upgrade. Try changing the instance to a different specification or submit a ticket to contact technical support for assistance. |
The oplog of the source database is not enabled. | This error occurs if you fail to configure a data migration task. Check the instance architecture. Standalone instances do not have an oplog and therefore do not support incremental migration with Data Transmission Service (DTS). Configure a full migration instead. |
The request references an incorrect component. Contact customer support. | This error can occur during instance purchase because resource availability varies by zone. Try changing the zone or instance type, or submit a ticket to contact technical support for assistance. |
The request was denied due to API rate limiting. | To manage and control API access, Alibaba Cloud limits the frequency of API calls. View your quotas and request a quota increase in the Quota Center. |
Insufficient read privileges for the database. | When you use DTS to migrate data, the database accounts for the source and destination databases must have the required permissions. Here's how to grant the permissions: |
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 UTC. For example, to convert the Beijing time (UTC+8) of `2024-11-08 20:00:00` to UTC, subtract 8 hours. The result is `2024-11-08T12:00:00Z`. |
server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field. | When you restore an instance across versions, authentication fails if the authentication mechanisms are different. The default authentication mechanism for MongoDB 4.0 is SCRAM-SHA-1. The default for MongoDB 5.0 and later is SCRAM-SHA-256. When you restore an instance across versions, use an earlier version of the mongorestore tool, such as version 4.0. |
TypeError: db.xxx.find is not a function. | The collection name might be a reserved keyword. Use |
createUser failed: Command failed with error xx (Unauthorized): 'not authorized on admin to execute command xxx. | An Alibaba Cloud account has limited permissions and cannot be granted write permissions on the admin system database. This is to prevent performance jitter that can be caused by writing data to the admin database. For more information about how to create an account with the required permissions, see Permissions of the root account specified during instance creation. |
The 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. |
The instance's minor version is not supported by this API. | The minor version of the instance is too old. Upgrade the minor version of the database. |
The instance is at the End of Full Support (EOFS) stage. | The instance version is in the End of Full Support (EOFS) stage and cannot be renewed. Upgrade the major version of the database. |
Resource unavailable. | This error indicates that a resource issue occurred when you created, upgraded, or downgraded an instance. We recommend that you obtain the Request ID and submit a ticket to contact technical support for assistance. |
Connection and network errors
Error message | Cause and solution |
|
|
| The number of connections to the ApsaraDB for MongoDB instance may have reached the upper limit, and no new connections can be established. Solution:
|
| The wait queue of the MongoDB driver is full, which may be caused by a small number of connections specified for a connection pool or high concurrent requests. Therefore, no available connections are provided. Solution:
|
| When an excessive number of concurrent connections are established, available sessions may be exhausted. Solution:
|
| Check whether the used instance endpoint is correct. For more information about instance endpoints, see the following topics: |
| The ECS instance fails to connect to the ApsaraDB for MongoDB instance over a private network. Solution:
|
|
|
| Data is not written to the primary node in the replica set instance. Cause: You can perform write operations only on the primary node. If you previously used the endpoint of the primary node for connection, the connected node becomes a secondary node and write operations fail after a primary/secondary switchover. Solution:
We recommend that you ensure that your application can automatically reconnect to an ApsaraDB for MongoDB instance after it is disconnected and handle exceptions to protect business continuity. |
| The ApsaraDB for MongoDB instance is locked due to exhausted disk space. Solution: For more information, see What do I do if my instance is locked or data cannot be written to the instance due to exhausted disk space? |
|
|
| The password of the provided database account contains special characters. Special characters include Solution: For more information, see How do I resolve failed connection issues due to special characters in the account name or password in a connection string? |
| ApsaraDB for MongoDB does not support the |
Errors when upgrading from version 4.2 to 4.4
Error message | Cause and solution |
CHECK_USER_COLLECTIONS_IN_ADMIN_FAILED | Cause: The Solution:
|
CHECK_USERS_AND_ROLES_FAILED | Cause: The Solution: The account and role that require changes are displayed in the error message in the console: "user my_user has high privilege role readWrite". Run the following command to remove the Important Before you run the command, make sure that your application does not use this account to write data to the |