Share via

Mongodb connection timeout issues

Garett Matsilele 20 Reputation points
2026-05-12T13:08:28.5566667+00:00

Hi,

I am experiencing connectivity issues between an Azure App Service and Azure Cosmos DB for MongoDB after making infrastructure and application updates.

Environment:

  • Azure App Service (Linux container)

Azure Cosmos DB for MongoDB vCore

Private Endpoint enabled

App Service integrated with VNet

Private DNS zones configured

Issue: The application previously worked correctly. After recent updates and networking changes, the application can no longer connect to Cosmos DB over the private endpoint.

Current behavior:

DNS resolution works correctly from the App Service Kudu console.

The MongoDB hostname resolves to the private IP successfully.

However, TCP connectivity to port 10260 times out.

Kudu test results:

nslookup fc-ce88da977caf-000.global.mongocluster.cosmos.azure.com

Result: fc-ce88da977caf-000.global.mongocluster.cosmos.azure.com -> fc-ce88da977caf-000.global.privatelink.mongocluster.cosmos.azure.com -> 10.0.4.4

However:

tcpping fc-ce88da977caf-000.global.mongocluster.cosmos.azure.com 10260

Results in: seq 0: no response (timeout)

What has already been verified:

Private Endpoint status = Approved

Private DNS zones linked to VNet

DNS records exist and resolve correctly

App Service VNet integration configured

Dedicated subnet created for private endpoints

Firewall rules and App Service outbound IPs added

Public access temporarily enabled for testing

App Service restarted multiple times

New private endpoint created and attached to a dedicated subnet

Additional observations:

One older private endpoint DNS configuration previously showed “Connection disconnected”.

New private endpoint now resolves correctly to 10.0.4.4.

DNS appears healthy, but network connectivity to port 10260 still fails.

Question: Could this indicate a backend issue with the private endpoint, routing propagation, or Cosmos DB networking? Are there additional diagnostics recommended for validating private endpoint connectivity specifically for Cosmos DB MongoDB vCore?

Any help would be appreciated.

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.


Answer accepted by question author

Manoj Kumar Boyini 16,725 Reputation points Microsoft External Staff Moderator
2026-05-18T10:46:27.5566667+00:00

Hi Garett Matsilele

Thank you for your detailed troubleshooting so far, this is very helpful.

From the results you shared:

  • DNS resolution is working correctly and resolving to the private endpoint IP
  • However, TCP connectivity to port 10260 is timing out

This combination generally indicates that the issue is not with Cosmos DB or the private endpoint itself, but rather with network connectivity in the path between your application and the private endpoint.

In Azure Cosmos DB for MongoDB vCore, if DNS resolves successfully but TCP connection fails, it typically means the traffic is being blocked by network controls such as:

  • Network Security Groups (NSGs)
  • Route tables (UDRs)
  • Firewall or appliance in the VNet (e.g., NVA, proxy)
  • Subnet-level restrictions or outbound rules from the App Service integration subnet

Recommended next step: Please work with your networking/IT team to verify that outbound traffic from the App Service subnet to the private endpoint IP on port 10260 is fully allowed, and that there are no blocking rules in NSG/UDR/firewall along the path.

If needed, tools like Test-NetConnection, psping, or telnet can help confirm whether the port is reachable from within the VNet.

Please let us know if you have any questions or concerns.

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.