Troubleshooting Azure Container App Networking Made Simple with Network Tester
Azure Container Apps provide a robust environment for deploying modern applications, but navigating its networking complexities can sometimes feel like solving a Rubik's cube blindfolded. That's where the Network Tester image comes to the rescue. This handy utility is designed to help users diagnose and troubleshoot network issues in Azure Container App with ease. Below, we'll explore more how to use it.
Why Network Tester?
When deploying applications in Azure Container Apps, you might encounter networking problems that make you want to tear your hair out. These issues often arise because sometimes Container App environment operates in a restricted network, making it challenging to install diagnostic tools on the console. The Network Tester image simplifies this process by providing an all-in-one solution for network testing, complete with a user-friendly interface and essential tools.
When to Use Network Tester
This tool shines brightest when you encounter:
- Restricted Networks: Environments where installing tools is cumbersome or impossible
- Unclear Network Issues: Scenarios where pinpointing problems feels like finding a needle in a haystack
- Check Network Dependency of Application: Before deploying your container to the container app, ensure that the application's network dependencies are functioning correctly
Key Features
- DNS Lookup (dig): Quickly verify DNS configurations
- HTTPS Connection Test: Validate HTTPS endpoints (Layer 7)
- TCP Connection Test: Test connectivity at the transport layer (Layer 4)
- TCP Dump with Download Support: Capture and download network traffic for deeper analysis
How to Get Started
You can deploy the Network Tester container in Azure Container Apps in three flexible ways:
- Create a New Container App:
Create a new Container App within the same Container App environment for isolated testing. This keeps your existing applications untouched and safe - Switch to Multiple Revision Mode: (Revision modes)
Test your network configuration in parallel by running the Network Tester image alongside your current revisions - Replace the Existing Container App Revision:
Go all in and troubleshoot directly by replacing the active revision with the Network Tester image
Choose Your Deployment Style
You can either:
- Build from Source: Clone the repository from GitHub, use the Dockerfile to build the image, and push it to your preferred image repository
- Pull from Docker Hub: Save time and grab the pre-built image directly from Docker Hub
- Registry login server: docker.io
- Image and tag: joechen0713/containerapp_networktester:latest
P.S. Remember to set the "Target port" in the "Ingress" to "8080"
How to Use TCP Dump
For example, to collect a network dump while sending an HTTPS connection to "joe-chen.com," follow these steps:
1. Open Two Tabs:
- One tab for "HTTPS Connection Checker"
- One tab for "Run TCP Dump"
2. Start Collecting the TCP Dump:
- In the "Run TCP Dump" tab, input the duration for the capture
- Click Run TCP Dump to start the collection
3. Reproduce the Connection:
- Switch to the "HTTPS Connection Checker" tab
- Enter the Fully Qualified Domain Name (FQDN) and click Check Connection
4. Download the TCP Dump Result:
- Wait in the "Run TCP Dump" tab until the specified duration is complete
- Once the capture is finished, a download page will appear
5. Analyze the Network Dump:
- Use a tool like Wireshark to examine the network dump
Contribute and Collaborate
Network Tester is open-source! Check out the repository on GitHub and join the community by reporting issues or submitting pull requests. Together, we can make network troubleshooting even smoother.
FAQ
1. Can I use this image to start a new revision to collect a network dump for other revision in multiple revision mode?
-> No, the TCP dump runs inside the container, so it cannot collect network traces from other containers
2. What DNS server is used if I don't specify one in the dig function?
-> It will use the DNS server you have set up in the VNET
Ready to solve your network woes? Try out Network Tester today, and make troubleshooting as seamless as it should be :)