Azure Functions host warning: At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided

Abe Rodriguez 21 Reputation points
2022-04-20T15:59:50.073+00:00

Our Azure Functions app has been running incredibly unstable on Azure, while on local emulators it runs perfectly fine. Health check-type HTTP triggers that do nothing other than return HTTP 200 often (but not always) return 503's. We see a high level of recycling in the logs.

We're completely stumped, and our current lead is the below warning "At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided" which I have not been able to find any results for on Google/Stack Overflow, etc.

This is a Zip-deployed NodeJS functions app deployed on an EP2 service plan.

Any thoughts from the MS pros?

2022-04-20T15:18:56.368063418Z Updating certificates in /etc/ssl/certs...
2022-04-20T15:19:01.504169376Z 11 added, 0 removed; done.
2022-04-20T15:19:01.504201377Z Running hooks in /etc/ca-certificates/update.d...
2022-04-20T15:19:01.506915491Z done.
2022-04-20T15:19:01.511722891Z Updated CA certificates
2022-04-20T15:19:02.256613463Z Hosting environment: Production
2022-04-20T15:19:02.256821371Z Content root path: /app
2022-04-20T15:19:02.258088824Z Now listening on: http://[::]:8081
2022-04-20T15:19:02.258114425Z Application started. Press Ctrl+C to shut down.
2022-04-20T15:19:13.587Z INFO - docker run -d -p 8181:8181 --name XXXX_10_2b2f5a65_middleware -e WEBSITE_CORS_ALLOWED_ORIGINS=* -e WEBSITE_CORS_SUPPORT_CREDENTIALS=False -e WEBSITE_SITE_NAME=XXXX -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=XXXX.azurewebsites.net -e WEBSITE_INSTANCE_ID=e4865a87e57ee2e43998bd8c5bd8fbb7ce3d63c8d6877abd3423307ac992XXXX -e HTTP_LOGGING_ENABLED=1 mcr.microsoft.com/appsvc/middleware:stage5 /Host.ListenUrl=http://0.0.0.0:8181 /Host.DestinationHostUrl=http://169.254.XXX.X:80 /Host.UseFileLogging=true2022-04-20T15:19:16.021Z INFO - Initiating warmup request to container XXXX_10_2b2f5a65_msiProxy for site XXXX
2022-04-20T15:19:14.901575616Z Updating certificates in /etc/ssl/certs...
2022-04-20T15:19:16.027Z INFO - Container XXXX_10_2b2f5a65_msiProxy for site XXXX initialized successfully and is ready to serve requests.
2022-04-20T15:19:16.027Z INFO - Initiating warmup request to container XXXX_10_2b2f5a65 for site XXXX
2022-04-20T15:19:16.182590220Z [41m [30mfail [39m [22m [49m: Middleware[0]
2022-04-20T15:19:16.183246429Z Failed to forward request to http://169.254.129.6. Encountered a System.Threading.Tasks.TaskCanceledException exception after 300000.309ms with message: The operation was canceled.. Check application logs to verify the application is properly handling HTTP traffic.
2022-04-20T15:19:16.322Z INFO - Container XXXX_10_2b2f5a65 for site XXXX initialized successfully and is ready to serve requests.
2022-04-20T15:19:16.322Z INFO - Initiating warmup request to container XXXX_10_2b2f5a65_middleware for site XXXX
2022-04-20T15:19:17.740240531Z 11 added, 0 removed; done.
2022-04-20T15:19:17.740277732Z Running hooks in /etc/ca-certificates/update.d...
2022-04-20T15:19:17.743903584Z done.
2022-04-20T15:19:17.750418255Z Updated CA certificates
2022-04-20T15:19:18.352463365Z [40m [1m [33mwarn [39m [22m [49m: Middleware[0]
2022-04-20T15:19:18.352519868Z At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided
2022-04-20T15:19:38.315326933Z [41m [30mfail [39m [22m [49m: Middleware[0]
2022-04-20T15:19:38.315820102Z Failed to forward request to http://169.254.XX.XX. Encountered a System.Threading.Tasks.TaskCanceledException exception after 300000.074ms with message: The operation was canceled.. Check application logs to verify the application is properly handling HTTP traffic.
^^
^^ This "Failed to forward request .." error repeats hundreds of times.
^^
2022-04-20T15:19:47.490Z INFO - Container XXXX_10_2b2f5a65_middleware for site XXXX initialized successfully and is ready to serve requests.Ending Log Tail of existing logs ---Starting Live Log Stream ---
2022-04-20T15:20:56.229 [Information] DrainMode mode enabled
2022-04-20T15:20:56.229 [Information] Calling StopAsync on the registered listeners
2022-04-20T15:20:56.230 [Information] Stopping the listener 'Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.QueueListener' for function 'XXX'

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,303 questions
{count} votes

7 answers

Sort by: Most helpful
  1. Masood Ahmad Mohammed Ishaq 6 Reputation points
    2022-06-13T23:15:09.327+00:00

    facing same problem too. has any one found any solution for this?

    1 person found this answer helpful.
    0 comments No comments

  2. Maciej Szuchta 1 Reputation point
    2022-05-16T06:38:25.953+00:00

    Any news on that Im also experiencing the same issue

    My linux function app doesn't want to start. It constantly restarts

    2022-05-16T06:36:19.699159566Z: [INFO] warn: Middleware[0]

    2022-05-16T06:36:19.699232566Z: [INFO] At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not providedEnding Log Tail of existing logs ---Starting Live Log Stream ---
    2022-05-16T06:36:44.111825041Z: [INFO] Starting OpenBSD Secure Shell server: sshd.
    2022-05-16T06:36:52.376589959Z: [INFO] warn: Middleware[0]
    2022-05-16T06:36:52.376651458Z: [INFO] At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided
    2022-05-16T06:36:54.654624880Z: [INFO] Hosting environment: Production
    2022-05-16T06:36:54.655896273Z: [INFO] Content root path: /azure-functions-host
    2022-05-16T06:36:54.656320970Z: [INFO] Now listening on: http://[::]:80
    2022-05-16T06:36:54.656395270Z: [INFO] Application started. Press Ctrl+C to shut down.
    2022-05-16T06:37:26.691097426Z: [INFO] Starting OpenBSD Secure Shell server: sshd.
    2022-05-16T06:37:34.182144028Z: [INFO] warn: Middleware[0]
    2022-05-16T06:37:34.182223028Z: [INFO] At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided
    2022-05-16T06:37:36.784072055Z: [INFO] Hosting environment: Production
    2022-05-16T06:37:36.785348756Z: [INFO] Content root path: /azure-functions-host
    2022-05-16T06:37:36.785365556Z: [INFO] Now listening on: http://[::]:80
    2022-05-16T06:37:36.785371456Z: [INFO] Application started. Press Ctrl+C to shut down.
    2022-05-16T06:38:26.655936413Z: [INFO] Starting OpenBSD Secure Shell server: sshd.
    2022-05-16T06:38:34.133559637Z: [INFO] warn: Middleware[0]
    2022-05-16T06:38:34.133622736Z: [INFO] At least one of http20OnlyDestinationHostUrl and http20OnlyListenUrl not provided
    2022-05-16T06:38:37.089809355Z: [INFO] Hosting environment: Production
    2022-05-16T06:38:37.091466148Z: [INFO] Content root path: /azure-functions-host
    2022-05-16T06:38:37.092144645Z: [INFO] Now listening on: http://[::]:80
    2022-05-16T06:38:37.092669642Z: [INFO] Application started. Press Ctrl+C to shut down.

    0 comments No comments

  3. Kouka, Angeliki 1 Reputation point
    2022-06-22T11:55:55.14+00:00

    I have the same problem, any updates on this?

    0 comments No comments

  4. Rince Antony 1 Reputation point
    2022-06-29T15:20:20.367+00:00

    I have same problem within Azure app service for containers when trying to deploy a Linux docker image on to the app service. Any solution?


  5. Molabanti, Anjaneyulu M (Anjan) 1 Reputation point
    2022-08-01T08:41:11.26+00:00

    Solution that I found is to run any Azure Containers, ARR Affinty and Web Sockets should be enable. but App Service/Function app for containers will not support WebSockets. Work around is using SignalR resource and using this SignalR reference in config file.