Troubleshooting Connectivity Issues between a Virtual Machine (VM) and an Azure Container App

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

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:

  1.  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

  2. 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
    1.  ronelson_0-1726092608826.png

       

    2. Networking in Azure Container Apps environment | Microsoft Learn
    3. Custom environment DNS suffix in Azure Container Apps | Microsoft Learn
  3. Test connectivity between your VM and the container app using Psping or Test-NetConnections.
  4. Results should show TcpTestSucceeded = True  or PSping <Container Apps Environment Static IP>:<Port>
  5. ronelson_2-1726088592680.pngronelson_3-1726088805308.png
  6. https://learn.microsoft.com/en-us/sysinternals/downloads/psping
  7. Note: Tracert returns Timedout due to no option to set the listening port (Avoid using the command)

     

    ronelson_4-1726088890192.png

     

  8. You can also use curl -v <Container Apps Environment Static IP> for connectivity. This command should return HTTP 404.
  9. ronelson_1-1726091264111.png

     

  10. If connectivity test fails,

    1. Confirm Target port is correct and ingress settings for your Azure Container App are configured to allow traffic from within the Virtual Network. 
    2. ronelson_5-1726089415904.pngronelson_6-1726089433531.png

       

    3. Check NSGs associated with your VM and the container app allow traffic on the necessary ports (e.g., HTTP/HTTPS).

    4. Check for Route table forcetunneling traffic to NVA and check any firewall rules that might be blocking traffic to or from the container app.

       


       


       

       

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.