An Azure NoSQL database service for app development.
Hey Ryan Thomas,
Thankyou for reaching microsoft Q&A!
it turns out nothing is wrong with your DNS or firewall – the migration tool is choking on the MongoDB “serverStatus” command because the endpoint you’ve pointed it at doesn’t implement that command. In our case that usually means you’ve accidentally pointed the Azure Database Migration Service (DMS) source to an Azure Cosmos DB for MongoDB account (or some other Mongo‐wire endpoint that doesn’t support serverStatus) instead of a “real” MongoDB server. DMS always issues a serverStatus check as part of its connectivity test, and that command isn’t supported by Cosmos’s Mongo API, so the migration immediately fails with “Command serverStatus not supported.”
Here’s what you can do:
- Double-check your DMS project’s Source configuration • Make sure “Source server type” is set to MongoDB and the connection string targets your native MongoDB instance (version ≥ 3.0 and < 4.5). • If you really do need to migrate from an Azure Cosmos DB for MongoDB account, note that Online migrations from Cosmos DB as a source aren’t supported. You’d have to fall back to the offline flow (mongodump → upload to Azure Storage → Data-from-Azure-Storage mode in DMS) or use mongorestore against the Cosmos endpoint.
- Verify your MongoDB version • DMS supports MongoDB 3.0.0 through 4.4.x. Anything outside that range will cause quirks (and commands like serverStatus may fail).
- If you can’t change the source to a real MongoDB server, switch to the offline tutorial instead • Use mongodump/mongorestore to export your data, store it in Blob Storage, then import into Cosmos DB’s API for MongoDB. See: https://docs.microsoft.com/azure/cosmos-db/mongodb/tutorial-mongotools-cosmos-db
Hope this helps you get past the “serverStatus” error!
—
Reference Docs:
• MongoDB-to-Cosmos DB online migration (DMS) → https://docs.microsoft.com/azure/dms/tutorial-mongodb-cosmos-db-online#create-a-migration-project
• MongoDB-to-Cosmos DB offline migration → https://docs.microsoft.com/azure/cosmos-db/mongodb/tutorial-mongotools-cosmos-db
• Known issues with MongoDB → Cosmos DB migrations → https://docs.microsoft.com/azure/dms/known-issues-mongo-cosmos-db
• Unsupported commands in Cosmos DB’s Mongo API → https://learn.microsoft.com/azure/cosmos-db/mongodb/feature-support-40#unsupported-commands
Note: This content was drafted with the help of an AI system. Please verify the information before relying on it for decision-making.