Hi Binod Kumar,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Based on our understanding of your issue, we recommend that you refer to the following methods for troubleshooting:
The "connection reset" error encountered while trying to access your Azure Container Instance may arise from multiple factors, including improper port configuration, network security settings, or application-related issues. It is crucial to examine the container logs, confirm that the correct ports are exposed, and ensure that your application is configured to listen on the designated IP address.
- Check the logs for any errors or exceptions by using Azure CLI:
az container logs --resource-group <YourResourceGroup> --name <YourContainerName>
Ensure that the ports are correctly exposed to your application. When creating the container instance, specify the ports:
az container create --resource-group <YourResourceGroup> --name <YourContainerName> --image <YourImage> --ports <PortNumber>
- If the container instance is integrated within a Virtual Network (VNet), ensure that there are no network security group (NSG) rules or firewall configurations that may delay access to the container.
- Ensure that the Network Security Group (NSG) linked to your container instance permits inbound traffic on the necessary ports. Modify the rules as needed within the Azure Portal.
- Test the IP address with curl or telnet to verify if the container instance is responding or not.
curl http://<container-ip>:<port>
- Restart the container instance to resolve any issues:
az container restart --resource-group <YourResourceGroup> --name <YourContainerName>
If you found it helpful, could you kindly click the “Accept Answer and upvote” on the post.
If you have any further queries, please let us know we are glad to help you.