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

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.

Related

Azure function activity in adf v2 not connecting to function

I am using an azure function activity in adf v2 .But whever I am tryin to connect it always giving me error.
Error details
Error code3608
Troubleshooting guide
Failure typeUser configuration issue
DetailsCall to provided Azure function 'ReadMsgQueue' failed with status-'NotFound' and message - 'Invoking Azure function failed with HttpStatusCode - NotFound.'.
Source
Pipeline
PL_CUSTOM_COMP
As per the ADF troubleshooting guide, you may receive the error message when you passed incorrect Azure function details in the activity definition:
To fix this issue, make sure you had provided correct Azure function details in the activity.

azure function activity in pipeline

Call to provided Azure function 'HttpTrigger1' failed with status-'InternalServerError' and message - 'Invoking Azure function failed with HttpStatusCode - InternalServerError.'.
Call to provided Azure function 'HttpTrigger1' failed with
status-'InternalServerError' and message - 'Invoking Azure function
failed with HttpStatusCode - InternalServerError.'.
You can get nothing from the server error.
The right way is to go to check the log files of azure function.
1, go to the kudu:
https://yourfunctionappname.scm.azurewebsites.net/DebugConsole
Click to folder\home\LogFiles\Application\Functions\function\yourtriggername
Then you will find the log files:
You can find the details of the error in it.
In short, the internal problems of the function app cause server problems. If you want to know exactly where the problem occurred, you need to check the function log.

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

Connection Test Failed when trying to add an Azure function as an output sink to Stream Analytics Job

I always get a Connection Test Failed when trying to add an Azure function as an output sink to Stream Analytics Job. The Azure function works fine by itself and I can also call it using Postman. As soon as I add the Azure function, I get the Connection Test failed error message.
Azure function returned an HTTP error. An error occurred while sending the request.
I got the same issue.
The solution that works for me was to set up:
Minimum TLS version: 1.0 (by default it was 1.2)
for my function app.

BadRequest in WebHook on Azure Kudu Console

I want to call a Azure function after PostDeployment. So I have a created a HttpTriggerCsharp Azure function.
I have done the following:-
Go to Kudu console
Tools
Web hooks
Add HttpTriggerCsharp Azure
function URL with PostDeployment option.
I am using Git-hub for
deployment. I am doing push now.
HttpTriggerCsharp Azure function is
called and executed. But I see Status and Reason of the Web hook as
Bad Request. Refer
Why I am Status and Reason as "Bad Request"? What is the issue here?
I have removed the code which relates to request body ( dynamic data = await req.Content.ReadAsAsync();).
Now my code is working now.

Resources