Container hrchatbot06_0_03243f91 didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging

Syafie Asyraf Sarifudin 20 Reputation points
2024-06-07T09:17:41.0566667+00:00

Hi, I was deploying a python framework chatbot as a web service to Azure Portal and encountered such error: Container hrchatbot06_0_03243f91 didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging. It works fine if I tested it locally.

I have already exposed the port on the app settings in the web app. Also, I tried exposing the ports to 8000, 8181, 80 still no luck as recommended in some forum. I am deploying using this method: https://medium-com.translate.goog/@kellenjohn175/how-to-guides-azure-apps-build-your-first-echobot-with-python-f67ca93cee53?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp&_x_tr_hist=true

User's image

really appreciate your thoughts and guidance :)

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
323 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
824 questions
{count} votes

Accepted answer
  1. ajkuma 24,076 Reputation points Microsoft Employee
    2024-06-14T18:14:19.36+00:00

    @Syafie Asyraf Sarifudin , No worries about the delay. Thanks for the follow-up and updating the question with additional details. I understand you have tried multiple things to isolate the issue.

    Possible causes for the error: ‘Container didnt respond to HTTP pings on port, failing site start’ , as outlined in this article - Troubleshooting ‘Container didnt respond to HTTP pings on port, failing site start’

    ·  A. Incorrect port values : Need to update the application code to listen correct port.

    ·  B. Binding to localhost : Applications deployed to App Service Linux should not be attempting to bind to localhost or 127.0.0.1.

    ·  C. Long application startup routines and logic: Applications that have a very long startup time before an HTTP response is sent back may encounter this error.

    ·  D. Development Servers: It is not recommended to use these in production, and rather use the appropriate production server equivalent.

    ·  E. Key Vault dependencies: Some applications call to Key Vault to retrieve secrets on startup. If this call fails (eg., application is an unauthorized caller on Key Vault) - then the value, such as a secret or connection string will not be retrieved.

    ·  F: Root route is not configured to return an HTTP response: In some scenarios, an application may actually not be developed to return an HTTP response on the root (/) path. Although rare, it is best to ensure an actual HTTP status code is returned.

    ·  G. Missing Environment Variables: Some applications depend on environment variables for certain environments. On App Service, these are added via the App Settings functionality, which is essentially environment variables.

    ·  H. Incorrect startup commands: Applications that use certain startup commands depending on their environment may encounter this behavior.

    ·  I. Installing packages on startup: Depending on the package size - and number of packages - this may introduce extended startup time in these scenarios.

    ·  J. High CPU or Memory: High CPU and/or Memory on the instances that these containers run on can contribute to container time outs on startup.

    Kindly let us know, I'll follow-up with you further.

    0 comments No comments

0 additional answers

Sort by: Most helpful