This topic describes the common errors and exceptions that you may encounter in the use of ApsaraDB for MongoDB. This topic also provides the solutions of the errors and exceptions.
Error message | Cause and solution |
Specified parameter AccountDescription is not valid. | When you restore backup data to another instance, check whether the instance name meets the specified limits. |
Shard total number is out of range. | When you restore data from the sharded cluster instance to a new sharded cluster instance, check whether the new instance has the same number of shards as that of the original instance. |
The downgrading dbinstance storage does not supported. | ApsaraDB for MongoDB does not allow you to reduce the storage capacity of your instance. To reduce the storage capacity of the instance, you can create an instance and restore data from the original instance to the created instance. For more information, see Other configuration change scenarios and methods. |
Classic network has not been supported, try to use VPC. | You cannot renew all ApsaraDB for MongoDB instances in the classic network, change their specifications, or change their billing methods. For more information, see [Notice] EOL for instances in the classic network. |
There is not enough resource for your operation. | The zone of the instance has insufficient resources when you upgrade the instance. You can change the existing instance specification to another specification or submit a ticket. |
Operation logging is not enabled for the source database. | If you cannot configure a data migration task, check the instance architecture. Standalone instances do not support the opration logging feature and allow you to use Data Transmission Service (DTS) for incremental migration. We recommend that you set the migration mode to full migration. |
The Request references an incorrect order sales component. Contact the customer support. | When you purchase the instance, the available resources vary based on the zone of the instance. You can change the zone or instance specification, or submit a ticket. |
User Request was denied due to user flow control. | To manage access to APIs, Alibaba Cloud imposes limits on the calling frequency of the APIs. You can view calling frequency quotas in the Quota Center console. |
database config lack of read privileges. | If you use DTS to migrate data between instances, the accounts of the source and destination databases must have the corresponding permissions. For more information about the permissions and authorization methods, see the following topics: |
Specified restore time is not valid. | When you call an API to restore the instance, check whether the restoration time is valid. The time must be in the yyyy-MM-ddTHH:mm:ssZ format. The time must be displayed in UTC. For example, the local time in Beijing is 20:00:00 on November 8, 2024. You must subtract 8 hours to convert the time to a UTC timestamp. The UTC timestamp is 2024-11-08T12:00:00Z. |
server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field. | When you recover the instance across versions, authentication fails if the authentication mechanism is different among the versions. The default authentication mechanism of MongoDB 4.0 is SCRAM-SHA-251. The default authentication mechanism of MongoDB 5.0 and later is SCRAM-SHA-256. |
TypeError: db.xxx.find is not a function. | The collection name may contain keywords. We recommend that you use |
createUser failed: Command failed with error xx (Unauthorized): 'not authorized on admin to execute command xxx. | The permissions of the current Alibaba Cloud account are limited. You cannot create an account that has write permissions on the admin system database. This prevents performance jitter that may occur when you write data to the admin database. For more information about how to create an account that has the required permissions, see Permissions of the alibabaCloudAdmin role |
Specified network type does not matched. | If you have added a classic security group to your instance, you cannot add dedicated security groups at the same time. |
Instance's MinorVersion is not supported for this API. | The minor version of your instance is earlier. We recommend that you update the minor version of the instance. |
The instance is at the End of Full Support (EOFS) stage. | Your instance is at the End of Full Support (EOFS) stage and cannot be renewed. We recommend that you upgrade the major version of the instance. |
The resource is out of usage. | This error message indicates that resources are abnormal when you create an instance or change the configurations of the current instance. We recommend that you obtain a request ID and Submit a ticket. |
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 |