从 MongoDB 迁移到 Azure Cosmos DB API for MongoDB 时的已知问题/迁移限制Known issues/migration limitations with migrations from MongoDB to Azure Cosmos DB's API for MongoDB

以下各部分介绍了从 MongoDB 迁移到 Cosmos DB API for MongoDB 时的已知问题和限制。Known issues and limitations associated with migrations from MongoDB to Cosmos DB's API for MongoDB are described in the following sections.

迁移由于使用不正确的 SSL 证书而失败Migration fails as a result of using the incorrect SSL Cert

  • 症状:当用户无法连接到 MongoDB 源服务器时,此问题很明显。Symptom: This issue is apparent when a user cannot connect to the MongoDB source server. 尽管所有防火墙端口都已打开,但用户仍然无法连接。Despite having all firewall ports open, the user still can't connect.
原因Cause 解决方法Resolution
在 Azure 数据库迁移服务中使用自签名证书可能会由于 SSL 证书不正确而导致迁移失败。错误消息可能包括“根据验证过程,远程证书无效。”Using a self-signed certificate in Azure Database Migration Service may lead to the migration failing because of the incorrect SSL Cert. The Error message may include "The remote certificate is invalid according to the validation procedure." 使用来自 CA 的正版证书。Use a genuine certificate from CA. 自签名证书通常仅用于内部测试。Self-signed certs are generally only used in internal tests. 安装来自 CA 颁发机构的正版证书时,可以在 Azure 数据库迁移服务中使用 SSL,这不会出现问题(与 Cosmos DB 的连接对 Mongo API 使用 SSL)。When you install a genuine cert from a CA authority, you can then use SSL in Azure Database Migration Service without issue (connections to Cosmos DB use SSL over Mongo API).

无法获取要在 DMS 中映射的数据库的列表Unable to get the list of databases to map in DMS

  • 症状:在“选择源” 边栏选项卡上使用“Azure 存储中的数据” 模式时,无法在“数据库设置”边栏选项卡上获取 DB 列表 。Symptom: Unable to get DB list on the Database setting blade when using Data from Azure Storage mode on the Select source blade.
原因Cause 解决方法Resolution
存储帐户连接字符串中缺少 SAS 信息,因此无法对其进行身份验证。The storage account connection string is missing the SAS info and thus cannot be authenticated. 在存储资源管理器中的 blob 容器中创建 SAS,并将 URL 与容器 SAS 用作源详细信息连接字符串。Create the SAS on the blob container in Storage Explorer and use the URL with container SAS info as the source detail connection string.

使用了不受支持的数据库版本Using an unsupported version of the database

  • 症状:迁移失败。Symptom: The migration fails.
原因Cause 解决方法Resolution
你试图从不受支持的 MongoDB 版本迁移到 Azure Cosmos DB。You attempt to migrate to Azure Cosmos DB from an unsupported version of MongoDB. 发布新版本的 MongoDB 时,对其进行测试,以确保与 Azure 数据库迁移服务兼容,并且定期更新服务以接受最新版本。As new versions of MongoDB are released, they are tested to ensure compatibility with Azure Database Migration Service, and the service is being updated periodically to accept the latest version(s). 如果需要立即迁移,作为解决方法,你可以将数据库/集合导出到 Azure 存储,并将源指向生成的转储。If there is an immediate need to migrate, as a workaround you can export the databases/collections to Azure Storage and then point the source to the resulting dump. 在存储资源管理器中的 blob 容器中创建 SAS,然后将 URL 与容器 SAS 用作源详细信息连接字符串。Create the SAS on the blob container in Storage Explorer, and then use the URL with container SAS info as the source detail connection string.

后续步骤Next steps