A scalable, fully managed NoSQL database for JSON documents with fast queries and automatic indexing
Hi,
Based on the troubleshooting already completed, DNS does not appear to be the main issue. Since the SRV, TXT, DNS resolution, and TCP connectivity to port 10260 are working, I would focus on the cluster’s networking and connection settings.
I suggest checking:
Azure Portal → Cosmos DB for MongoDB vCore → Networking and confirm the public access/firewall rules allow the laptop’s public IP.
Confirm the cluster is in a Ready/healthy state and there have been no recent networking or private endpoint changes.
In MongoDB Compass, use the exact connection string provided by Azure Portal and make sure no conflicting Replica Set Name is configured.
Test the same connection string using mongosh from the same laptop. If it fails with the same queryTxt ECONNREFUSED error, the issue is likely not specific to Compass.
If DNS and TCP/10260 are working but mongosh also fails, I would focus on the Azure networking/firewall configuration and then consider a possible service-side issue rather than continuing with DNS troubleshooting.
Microsoft documents MongoDB vCore connectivity over port 10260 and recommends using the connection details provided by Azure.
**Microsoft Learn references:
**https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/connect-using-compass
https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-configure-firewall
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/connect-account