Hi @dweber-LTCH,
Welcome to Microsoft Q&A forum.
As I understand, you've set up everything correctly, but there are a few potential issues that could be causing the ESERVFAIL or timeout errors when connecting to your Cosmos MongoDB over a P2S VPN.
Here are some troubleshooting steps you can try:
- Ensure that the DNS resolver is correctly configured and that it can resolve the private endpoint's DNS name.
Verify that the private DNS zone is correctly linked to the hub VNet and that the DNS records for the Cosmos Mongo DB are present.
Check if there are any firewall rules blocking the connection. Ensure that the necessary ports (typically port 10255 for MongoDB) are open and that the VPN client's IP range is allowed.
Confirm that the private endpoint is correctly set up and associated with the correct subnet. Ensure that the network security group (NSG) rules for the subnet allow inbound traffic from the VPN client.
- Make sure you are using the correct connection string provided in the Azure portal. It should include the mongodb+srv:// protocol.
- Double-check the VPN configuration to ensure that it is correctly routing traffic to the hub VNet and that the DNS resolver is being used.
For more information, please refer the documents:
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/troubleshoot-common-issues
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/connect-account
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.