錯誤資訊 | 報錯原因及解決方案 |
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
| 可能該執行個體的串連數已經達到上限,無法為新的串連請求建立串連。 解決方案: 檢查串連數是否耗盡:如何查詢串連數?。 最佳化串連使用:如何解決執行個體串連數滿的問題?。
|
MongoDB.Driver.MongoWaitQueueFullException: The wait queue for acquiring a connection to server xxx is full.
| MongoDB 驅動程式的等待隊列已滿,可能由於串連池設定較小或出現高並發請求等原因導致,從而無法提供可用串連。 解決方案: 建議您優先檢查對應報錯程式的串連池配置,例如確保設定了合理的串連池大小,詳情請參見如何限制終端串連數?。 若程式側調整後問題依然存在,您可檢查MongoDB執行個體側的串連數是否耗盡,請參見: 如何查詢串連數? 如何解決執行個體串連數滿的問題?
|
(TooManyLogicalSessions) Unable to add session into the cache because the number of active sessions is too high.
| 並發串連過多時,可能會耗盡可用會話。 解決方案: 排查因串連數耗盡導致串連失敗的問題。 如何查詢串連數? 如何解決執行個體串連數滿的問題?
如果串連數未發現異常,排查執行個體其他效能是否無法滿足業務需求。 通過節點監控查看常用資源(例如CPU使用率和記憶體使用量率)的運行情況,確認執行個體規格大小是否滿足業務需求。 如果執行個體規格過小,但負載較高,可在業務低峰期變更執行個體配置。
|
| 請檢查執行個體串連地址是否正確,串連地址說明,請參見: |
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.
| Elastic Compute Service執行個體通過私網串連ApsaraDB for MongoDB失敗。 解決方案: 檢查白名單設定。確保Elastic Compute Service執行個體的私網IP地址添加到ApsaraDB for MongoDB執行個體的白名單。 確保ECS執行個體與MongoDB執行個體網路互連。 ECS與MongoDB執行個體在同一個專用網路中(VPC ID相同),可直接通過私網串連。跨VPC時,可參考以下方式調整。
|
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',...}
| 當前寫入資料的節點不是主節點(Primary節點)。 原因:僅主節點可以執行寫操作。如果您的業務之前通過主節點(Primary節點)的地址串連,複本集執行個體主備切換後,實際串連的節點角色變成了從節點(Secondary節點),寫入會失敗。 解決方案: 請為業務設計重連機制和異常處理能力,串連閃斷後可自動重連,保障業務穩定運行。 |
[Unauthorized] cloud instance error, disk locked, plz check and upgrade your disk quota,
| 磁碟滿導致執行個體鎖定。 解決方案:解決因磁碟空間耗盡導致的鎖定或無法寫入問題。 |
(AuthenticationFailed) Authentication failed.
| |
| 資料庫帳號的密碼中包含特殊字元!@#$%^&*()_+= 。 解決方案:如何解決串連串中帳號密碼包含特殊字元導致失敗的問題?。 |
error getting cluster ID: (CommandNotFound) replSetGetConfig is forbidden by cloud provider for security reason
| ApsaraDB for MongoDB不支援replSetGetConfig 命令。更多資訊,請參見ApsaraDB for MongoDB支援及限制哪些命令? |