The host keys suddenly went missing. Any idea how to regenerate it or why it is missing?

I am getting 404 if i try to re-register master key or add any key
The host keys suddenly went missing. Any idea how to regenerate it or why it is missing?

I am getting 404 if i try to re-register master key or add any key
Did you try restarting the function ? Also please check if you have AzureWebjobsStorage app settings added in the configuration and then restart.
https://github.com/Azure/Azure-Functions/issues/1080#issuecomment-530046535
Let me know if this helps.
Did you try restarting the function ? Also please check if you have AzureWebjobsStorage app settings added in the configuration and then restart.
https://github.com/Azure/Azure-Functions/issues/1080#issuecomment-530046535
Update:
Also, check if the FUNCTIONS_EXTENSION_VERSION is set to ~3 when creating the function resource (Microsoft.Web/site).
More info at https://www.michaelscollier.com/inconsistent-functions-host-key/
Let me know if this helps.
HI,
I have the same problem. I've restarted the app several times and I do have AzureWebJobStorage configured. The app worked properly a few hours ago, but after I deployed from the latest ARM template, it doesn't generate keys anymore. "List Web Apps Functions Host Keys" fails every time.
Thank you for a response.
I think that FUNCTIONS_EXTENSIONS_VERSION is fine. Also, I am not using keyvolt. My problem is that I am not getting App/Host keys at all.


I had the same problem
In my case was problem with used Storage Account
and this account was set to only accept connection from specified VNet
and that function app wasn't there (in terms of creation where isn't any possible way to set VNet)
so I just allow access from all networks for Storage Account
then create Function App
move Function App into VNet
change network setting for Storage Account
Inspired by this comment I did the following and worked well for my function app in our virtual network because it did not have any function keys. The root cause seems to be that AzureWebjobsStorage was pointing to a premium storage account that had only blobs in it (no file share, queues or table sections)
1.-Changed the AzureWebjobsStorage to refer another storage account (general purpose storage account with blobs, file shares, tables, queues) that had been already integrated to the vnet.
2.-Removed the vnet integration from the problematic function app.
3.-Open the access of that new storage account to all networks.
4.-Re-deployed the function app.
5.-Integrated again the function app to the vnet.
6.-Re-started the function app and finally the function keys appeared there.
On the other hand for some other set of periodic function apps that were pointing to the premium storage account, the base URL was opening and the overview section of them looked OK. However the functions had no function keys and the monitoring sections were empty. In other words they had not run a single time.
IIn that fully integrated vnet environment (the functions already integrated to the vnet and also the referenced storage accounts) making all those functions point to the general purpose storage account (by changing AzureWebjobsStorage) instead of pointing to the premium storage account was all what was needed.
The bottom line is the key is what "AzureWebjobsStorage" has and what type of storage account that configuration refers to.
I ended up using 2 different storage accounts. One can only be accessed inside a vNet, and that's where sensitive data is stored. The other one is public and it is used only for Function App runtime. Even with this setup, sometimes the runtime data gets corrupt after deployment, and there is nothing else to do but delete it.
9 people are following this question.