question

maro015079i-7454 avatar image
0 Votes"
maro015079i-7454 asked WheelerJrDavid-5905 commented

Azure functions event trigger - Container didn't respond to HTTP pings on port: 80

Hello,

After building an Azure Function with an IoT hub trigger in java, am trying to publish it to Azure, but am facing a problem. Whenever I try to launch it after publishing, I get the following error:

Initiating warmup request to container [app name] for site [site name] ERROR - Container [container name] for site [site name] has exited, failing site start ERROR - Container [container name] didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging. INFO - Stopping site [site name] because it failed during startup.

Am not expert on azure, but for what I understand, azure is trying to do a ping to the function but this is not responding to it. How can I solve this?


azure-functionsazure-iot
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@maro015079i-7454 ,
Following up to see if my answer helps. Do let us know if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·
ManuPhilip avatar image
0 Votes"
ManuPhilip answered

I think, you didn't EXPOSE port 80 in docker file. Find some reference below to look this issue further and correct the issue:
things-you-should-know-web-apps-and-linux




If the Answer is helpful, please click "Accept Answer" and upvote it

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MughundhanRaveendran-MSFT avatar image
0 Votes"
MughundhanRaveendran-MSFT answered WheelerJrDavid-5905 commented

@maro015079i-7454 ,

Thanks for reaching out to Q&A.

Please add the app setting WEBSITES_PORT with the value 8080. The container should be able to come up in around ~300 seconds.

For a custom container, the custom port number on the container for App Service to route requests to. By default, App Service attempts automatic port detection of ports 80 and 8080. This setting is not injected into the container as an environment variable.

Reference : https://docs.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet

I hope this helps!

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@maro015079i-7454 , Following up to see if @the above answer helps. Do let us know if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·

I am having this problem too. I have tried setting WEBSITES_PORT to 8080 and also tried setting it to 80. I still get the following error:

ERROR - Container dhg-mydhgbulksiteprocessor-function__cf39_1_c4c12250 didn't respond to HTTP pings on port: 80, failing site start

I have EXPOSE 80 in my docker file.

0 Votes 0 ·