Besides the normal network restrictions that could prevent your function app from accessing the storage account, I also came across this Azure Functions runtime is unreachable blog post. Here it mentions an issue where the App_Offline.htm was in the file system, thereby instructing the platform your app is unreachable. It's certainly plausible, so check the kudu system (or az rest) to see if that file exists, remove it, and retry the operation.
Function App deployment error
I frequently deploy code to Azure Functions without any problems, but when I tried to do so today (with no significant updates to the code or to Azure) I first got an error when Syncing the triggers:
12:05:31 PM my-fa: Deployment successful. deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build. 12:05:43 PM my-fa: Syncing triggers... 12:05:49 PM my-fa: Syncing triggers (Attempt 2/6)... 12:06:00 PM my-fa: Syncing triggers (Attempt 3/6)... 12:06:21 PM my-fa: Syncing triggers (Attempt 4/6)... 12:07:01 PM my-fa: Syncing triggers (Attempt 5/6)... 12:08:22 PM my-fa: Syncing triggers (Attempt 6/6)... 12:08:23 PM: Error: Encountered an error (ServiceUnavailable) from host runtime.
In the Azure portal, it says 'Azure Functions runtime is unreachable', but all common causes of this (no access to storage account) are checked (storage account exists, connection string is correct, no issues with firewall etc).
When retrying to deploy again, most of the times I don't even get past this:
13:48:56 my-fa: Starting deployment... 13:48:56 my-fa: Creating zip package... 13:48:56 my-fa: Zip package size: 79.25 kB 13:51:01: Error: The service is unavailable.
Sometimes I get past this, but then I get the error message when syncing the triggers.
When I create a new function app with a new storage account in the same resource group, I cannot deploy a simple function to this new function app, it immediately gives the same errors as described above, also the 'Azure Functions runtime is unreachable' error for this newly created resource.
What causes all this?
Sign in to comment
Sort by: Most helpful