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 - 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
- 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> or
- https://learn.microsoft.com/en-us/sysinternals/downloads/psping
- For Linux:
(Need to install corresponding packages)tcpping
tcpping
has a few prerequisites for proper usage.- Install
bc
withtdnf install bc -yy
- Install the
awk
command -tdnf install gawk -yy
- Install the
traceroute
package. See the tcptraceroute section - Install the
wget
package. See the wget section
Install
tcpping
with the following:cd /usr/bin wget http://www.vdberg.org/~richard/tcpping chmod 755 tcpping
Confirm this is now installed
Installing troubleshooting tools in a Container Apps ‘hello-world’ image - (azureossd.github.io) - Install
-
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.