Troubleshooting Connectivity Issues between a Virtual Machine (VM) and an Azure Container App
In today’s cloud-centric world, ensuring seamless connectivity between various components is crucial for maintaining efficient workflows and minimizing downtime. One common scenario involves troubleshooting connectivity issues between a Virtual Machine (VM) and an Azure Container App. This guide aims to provide a fundamental approach to identifying and resolving connectivity issues, covering key aspects such as ingress configurations, troubleshooting tools, and networking components. By following these steps, you can ensure that your VM and Azure Container App communicate effectively.
Troubleshooting connectivity issues between a Virtual Machine (VM) and an Azure Container App can involve several steps.
Here are some key steps to perform or check:
Review ingress configuration
Scenario
Description
Actions
Requests to endpoints fail
The container app endpoint doesn’t respond to requests.
Review ingress configuration
Troubleshooting in Azure Container Apps | Microsoft Learn
Ensure that the DNS name UNIQUE_IDENTIFIER>.<REGION_NAME>.azurecontainerapps.io or *.<Custom domain DNS suffix> is correctly resolving to the Container Apps Environment Static IP address 10.0.8.209
Networking in Azure Container Apps environment | Microsoft Learn
Custom environment DNS suffix in Azure Container Apps | Microsoft Learn
Test connectivity between your VM and the container app using Psping or Test-NetConnections.
Results should show TcpTestSucceeded = True or PSping <Container Apps Environment Static IP>:<Port>
https://learn.microsoft.com/en-us/sysinternals/downloads/psping
Note: Tracert returns Timedout due to no option to set the listening port (Avoid using the command)
You can also use curl -v <Container Apps Environment Static IP> for connectivity. This command should return HTTP 404.
If connectivity test fails,
Confirm Target port is correct and ingress settings for your Azure Container App are configured to allow traffic from within the Virtual Network.
Check NSGs associated with your VM and the container app allow traffic on the necessary ports (e.g., HTTP/HTTPS).
Check for Route table forcetunneling traffic to NVA and check any firewall rules that might be blocking traffic to or from the container app.
Microsoft Tech Community – Latest Blogs –Read More