4

I can publish a Azure function from Visual Studio without an error.

This funtion is set to run every 4 seconds ("*/4 * * * * *") but it is not running at all. Even if I try to run it manually it do not run and show the following error:

Status: 404 Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

enter image description here

Under monitoring it do not shows data, under success or error count it says no data available :(

enter image description here

Nothing is working please help

user576510
  • 5,777
  • 20
  • 81
  • 144
  • Have you tried `4 * * * * *`. you cannot force the function to run as it is a timertrigger. In the logs Can you see youre function been triggering ? – Thomas Mar 02 '18 at 03:16
  • @Thomas cant see it triggering. Same time expression is working with another function I tested and uploaded from portal every 4 seconds. – user576510 Mar 02 '18 at 04:16
  • @user576510 Before you publish Azure function to Azure, did it work fine in Visual Studio? – Janley Zhang Mar 02 '18 at 06:56
  • @Thomas, it seems that the '*/4 * * * * *' is correct, not '4 * * * * *'. – Janley Zhang Mar 02 '18 at 08:16

4 Answers4

4

This is a pretty old thread but in case anyone is facing the same issue after migrating their Function App to .NET Core 3.1, check that you have also updated the Function Runtime Version to 3. Update the Function App SDK and in Azure portal check that the function runtime settings is 3. Without updating this setting the same 404 error appears whenever you try to call your function app.

For changing the Function Runtime Version open the Function App in Azure Portal then go to Configuration -> Function runtime settings. From the Runtime version dropdown choose ~3.

Pratik Bhattacharya
  • 3,596
  • 2
  • 32
  • 60
3

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

According to your 404 error message, it means your function source couldn’t be found. Such as wrong resource path , function name has been changed, wrong function name or the function has been deleted.You could check whether your class name and FunctionName attribute name are consistant. If you have changed code, remeber to rebuild the project.

And please make sure you could run the Azure function successfully in Visual studio before published to Azure. In debug mode, check whether output logs are correct.

Under monitoring it do not shows data, under success or error count it says no data available

This info usually means function has never been triggered before. If you create a new function in Azure and click Monitor directly, you could also see this info. To solve this problem, unless you could trigger this Azure function successfully.

Janley Zhang
  • 1,567
  • 7
  • 11
  • 1
    In case this helps someone else, I have been struggling with a Status 404 message today when trying to test a function from the Azure portal. In my case, our assembly had multiple functions in it, all recognized in the portal. However, the host.json file only listed one of them. Any functions not listed in host.json would give a 404 when tested from the portal, but a 202 Accepted after being added to host.json. – Michael12345 Apr 05 '18 at 02:37
  • Where did you find host,json file? – Hetal Jul 14 '20 at 19:53
1

In my case I was deploying the azure function using the Azure Resource Manager (ARM) template. I created it manually and was missing some of the properties for the storage account:

enter image description here

For anyone deploying an Azure Function using an ARM template, I would highly recommend taking a template from the GitHub quickstart ARM templates: https://github.com/Azure/azure-quickstart-templates

It provides the minimum template to get your function (and other resource) up and running.

-1

The issue with your function was that GetFTPData.cs is not a valid function name. VS build doesn't validate the function name and the portal isn't displaying these errors.

This issue is tracking the portal error display https://github.com/Azure/azure-functions-ux/issues/2316

and this is for VS build to validate functionName attribute https://github.com/Azure/azure-functions-vs-build-sdk/issues/174

ahmelsayed
  • 7,125
  • 3
  • 28
  • 40