I get 429 status code for microsoft.web/serverFarms when I create function App on azure - azure

I have azure functions developed in node js. When I create a cloud instance for function app, it gets stuck on deployment process with all the resources OK status. Microsoft.Web/serverfarms returning 429. The error message reads as:
**"status"**: "Failed",
**"error"**: {
**"code"**: "429",
**"message"**: "App Service Plan Create operation is throttled for subscription <subcription_id>. Please contact support if issue persists.",
}
Please let me know what the possible solution will be for this

Turns out, you just need to create a new function application with different server location. and delete all the related instances of the previously deployed azure function.

Related

Azure Data Factory throwing "Invoking Azure function failed with HttpStatusCode - InternalServerError."

I am getting this error while trying to invoke azure function through the data factory. Snap of the error is attached.
I then again tried with the same parameters, and the next instance of execution just worked fine.
I just wanted to know if this problem is from azure server side or due to from my code.
Any help would be appreciated.
Call to provided Azure function 'OnCopySuccess' failed with
status-'InternalServerError' and message - 'Invoking Azure function
failed with HttpStatusCode - InternalServerError.
Has nothing to do with Azure DataFactory, it fails because of the Azure Functions, HAs from the error you will not be able to detect any issues so, you may examine the output of your azure function app using logs in kudu, in addition to the monitor of the azure function.
In addition, kudu log files are more timely than the Azure function's monitor.
Simply navigate to this website's address.
Click on the URL https://yourfunctionappname.scm.azurewebsites.net/DebugConsole
Go To: LogFiles\Application\Functions\Function\yourtriggername
The log files can then be found. The log file in Kudu is real-time, whereas the monitor takes a while to show (typically 5 minutes).
HTTP Function is supposed to actually return an HTTP result, See the Original Post - So you might check your Azure Function Code.

Unable to deploy Azure Function App - error with storage account

Lately I've had trouble with deploying a Function App via Azure CLI. Last week on Tuesday, I was still able to deploy a Function App via Azure CLI.
This week, like any other day before that, I used fairly common Azure Function Tools command func azure functionapp publish. The version of Azure Function Tools I am using is 3.0.3233.
Now I am getting this error every time:
Retry: 1 of 3
Error creating a Blob container reference. Please make sure your connection string in "AzureWebJobsStorage" is valid
Retry: 2 of 3
Error creating a Blob container reference. Please make sure your connection string in "AzureWebJobsStorage" is valid
Retry: 3 of 3
Error creating a Blob container reference. Please make sure your connection string in "AzureWebJobsStorage" is valid
I checked that AzureWebJobsStorage setting has a correct value, I even connected to storage account connection string via Azure Storage Explorer app.
Just in case, I created a new Function App in another region and I still get the same error.
Has anyone else encountered this error? I suspect this is an error in the tool itself, maybe a faulty build?
I suspect that AzureWebJobsStorage is not present/invalid in App Settings section of the function app in the Azure portal.
Make sure that it is added there and you are not deleting those settings through CLI/templates and recreating them without AzureWebJobsStorage.
I answer to my own question. It seems that this was a transient error. Without changing any code, today I was able to redeploy my function app. Cheers.
If you don't have "Allow storage account key access" enabled , you get this error.
There could be other scenarios as well. But the error does not say anything .

Azure function access from other subscription

I have created an ARM template for my logic app which has azure function reference in it.
By the time when I was deploying the logic app in my old subscription, I was able to deploy the ARM template using power shell successfully,
The problem started when I needed to deploy the app in different subscription.
While I deployed my logic app on different subscription which was pointing to the azure functions which still existed in my old subscription, I got this error.
{
"code": "LinkedAuthorizationFailed",
"message": "The client has permission to perform action 'Microsoft.Web/sites/functions/listSecrets/action' on scope '/subscriptions/(newsubscription Id)/resourcegroups/(new resourcegroup under new subscription)/providers/Microsoft.Logic/workflows/my-logic-app-name', however the current tenant '(tenent id of new subscription)' is not authorized to access linked subscription '(old subscription id)'."
}
Can anyone suggest how can I deal with this issue?
What I suspect is the new subscription needs to get access over old subscription for accessing azure function lying in there. What can be done in this case?

Azure event triggered function for blob creation

I've been trying to create an azure function which will move blobs from one container to another. For this purpose, I created a function following this tutorial.
Now when I add blob in container, I can debug the rest in local. Problem starts when I try to deploy the function. I'm using CICD for function deployment. After that, when I'm trying to configure the event subscription, it's failing.
I cannot edit the ENDPOINT DETAILS when creating event subscription
If I try to "Add event grid subscription", it gives a strange error message - Deployment has failed with the following error:
{"code":"Url validation","message":"The attempt to validate the
provided endpoint
https://.azurewebsites.net/admin/extensions/EventGridExtensionConfig
failed. For more details, visit https://aka.ms/esvalidation."}
All the tutorials I found are either irrelevant or outdated. Does anyone have any suggestion what I should do or what am I doing wrong?
Thanks in adance

Do I need an Azure Storage Account to run a WebJob?

So I'm fairly new to working with Azure and there are some things I can't quite wrap my head around. One of them being the Azure Storage Account.
My web jobs keeps stopping with the following error "Unhandled Exception: System.InvalidOperationException: The account credentials for '[account_name]' are incorrect." Understanding the error however is not the problem, at least that's what I think. The problem lies in understanding why I need an Azure Storage Account to overcome it.
Please read on as I try to take you through the steps taken thus far. Hopefuly the real question will become more clear to you.
In my efforts to deploy a WebJob on Azure we have created the following resources so far:
App Service Plan
App Service
SQL server
SQL database
I'm using the following code snippet to prevent my web job from exiting:
JobHostConfiguration config = new JobHostConfiguration();
config.DashboardConnectionString = null;
new JobHost(config).RunAndBlock();
To my understanding from other sources the Dashboard connection string is optional but the AzureWebJobsStorage connection string is required.
I tried setting the required connection string in portal using the configuration found here.
DefaultEndpointsProtocol=[http|https];AccountName=myAccountName;AccountKey=myAccountKey
Looking further I found this answer that clearly states where I would get the values needed, namely an/my missing Azure Storage Account.
So now for the actualy question: Why do I need an Azure Storage Account when I seemingly have all the resources I need place for the WebJob to run? What does it do? Is it a billing thing, cause I thought we had that defined in the App Service Plan. I've tried reading up on Azure Storage Accounts over here but I need a bit more help understanding how it relates to everything.
From the docs:
An Azure storage account provides resources for storing queue and blob data in the cloud.
It's also used by the WebJobs SDK to store logging data for the dashboard.
Refer to the getting started guide and documentation for further information
The answer to your question is "No", it is not mandatory to use Azure Storage when you are trying to setup and run a Azure web job.
If you are using JobHost or JobHostConfiguration then there is indeed a dependency for Storage accounts.
Sample code snippet is give below.
class Program
{
static void Main()
{
Functions.ExecuteTask();
}
}
public class Functions
{
[NoAutomaticTrigger]
public static void ExecuteTask()
{
// Execute your task here
}
}
The answer is no, you don't. You can have a WebJob run without being tied to an Azure Storage Account. Like Murray mentioned, your WebJob dashboard does use a storage account to log data but that's completely independent.

Resources