Error message | Cause and solution |
network error while attempting to run command 'isMaster' on host 'dds-xxxx.mongodb.rds.aliyuncs.com:3717' :exception: connect failed
| |
Timed out after 3000ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. exception=(com.mongodb.MongoSocketReadException: Prematurely reached end of stream)
Socket recv() errno:54 Connection reset by peer x.x.x.x:27017
| The number of connections to the ApsaraDB for MongoDB instance may have reached the upper limit, and no new connections can be established. Solution: Check whether the instance connections are exhausted. For more information, see How do I query the number of connections to my instance? Optimize connection usage. For more information, see What do I do if the number of connections to my instance reaches the upper limit?
|
MongoDB.Driver.MongoWaitQueueFullException: The wait queue for acquiring a connection to server xxx is full.
| 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: We recommend that you first check the connection pool settings of the program for which this error is reported. For example, make sure that a reasonable number of connections is specified for a connection pool. For more information, see How do I limit the number of connections from my client? If this issue persists after you adjust the program, check whether the ApsaraDB for MongoDB instance has exhausted its connections. For more information, see the following topics: How do I query the number of connections to my instance? What do I do if the number of connections to my instance reaches the upper limit?
|
(TooManyLogicalSessions) Unable to add session into the cache because the number of active sessions is too high.
| When an excessive number of concurrent connections are established, available sessions may be exhausted. Solution: Troubleshoot failed connection issues caused by exhausted connections. For more information, see the following topics: How do I query the number of connections to my instance? What do I do if the number of connections to my instance reaches the upper limit?
If no issues occur in the terms of the number of connections, check whether other instance performance items cannot meet business requirements. Use the node monitoring feature to check the usage of common resources (such as CPU utilization and memory usage) and then determine whether the instance specifications meet business requirements. If the instance specifications are excessively small but the load is high, you can change the instance configurations during off-peak hours.
|
| Check whether the used instance endpoint is correct. For more information about instance endpoints, see the following topics: |
Failed to connect to 10.*.*.8:3717 after 5000 milliseconds, giving up.Error: couldn't connect to server 10.*.*.8:3717 (10.*.*.8), connection attempt failed
pymongo.errors.ServerSelectionTimeoutError: dds-xxxx.mongodb.rds.aliyuncs.com:3717: [Errno 113] No route to host,dds-xxxx.mongodb.rds.aliyuncs.com:3717
InvalidInstanceId.NotFound: The instance not in current vpc.
| The ECS instance fails to connect to the ApsaraDB for MongoDB instance over a private network. Solution: Check whitelist settings. Make sure that the private IP address of the ECS instance is added to an IP address whitelist of the ApsaraDB for MongoDB instance. Ensure network connectivity between the ECS instance and the ApsaraDB for MongoDB instance. If the ECS instance and the ApsaraDB for MongoDB instance are in the same VPC, the two instances can directly interconnect over a private network. To connect the ECS instance to the ApsaraDB for MongoDB instance across VPCs, you can use one of the following methods:
|
org.springframework.data.mongodb.UncategorizedMongoDbException: Timeout while receiving message; nested exception is com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message
| |
"errmsg": "not master", "code": 10107, "codeName": "NotMaster"
"errmsg": "not master", "code": 10107, "codeName": "NotWritablePrimary"
Time out after 30000ms while waiting for a server that matches writableServerSelector.
Command failed with error 10107 (NotWritablePrimary): 'not primary' on server xxx .
Explain's child command cannot run on this node. Are you explaining a write command on a secondary?
not master and slaveOk=false.
MongoNotPrimaryException: Command failed with error 10107 (NotMaster): 'not master' on server xxx.
reason: TopologyDescription { type: 'ReplicaSetNoPrimary',...}
| 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: If your application runs in a production environment, we recommend that you use a connection string URI to connect your application to the instance. When a node fails, read/write operations on your application are not affected by a primary/secondary switchover. For more information about instance endpoints, see the following topics: Manually switch the role of a node. Switch the node whose endpoint is used for connection to the new primary node.
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. |
[Unauthorized] cloud instance error, disk locked, plz check and upgrade your disk quota,
| 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? |
(AuthenticationFailed) Authentication failed.
| |
| 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? |
error getting cluster ID: (CommandNotFound) replSetGetConfig is forbidden by cloud provider for security reason
| ApsaraDB for MongoDB does not support the replSetGetConfig command. For more information, see What commands are supported and not supported by ApsaraDB for MongoDB? |