For some reason, I'm unable to make the connection from Stream Analytics to my Azure Function as an output. I have this exact pipeline set up and working in my own Azure subscription, but can't get this output connection to work in my dev environment.
Unable to load subscriptions PIC
First, the drop-down does not load the available function apps and functions in the subscription, as seen above. There are multiple that are in the subscription and are running, so this should populate. Instead, I see the error "Failed to load function apps" and "Failed to load functions."
Second, when I try to fill in the fields manually (after selecting "Provide azure function settings manually") I am also unable to connect. To do this, I'm giving the output a unique name, then copy/pasting the function app name and function name to the blanks. For the key, I've tried many variations to no avail. My function currently has Authorization set to anonymous, and I've tried leaving the key field blank. I've also tried using the "Function" key on my function, as well as the _master and default access keys. Each give me an error message when testing output connection. How do I get this connected?
Manual function setup PIC
Here is the error that I get
Error PIC
UPDATE - I'm still working on this, but at least part of it was due to having a hyphen "-" in the function name. Apparently Azure doesn't like that. Once I fixed the function name I'm able to trigger the function manually from within the Azure portal and externally through Postman, but still the connection test is failing from Stream Analytics.
UPDATE 2 - My temporary work around has been to have Stream Analytics post its output to an Event Hub, and trigger a function off of the Event Hub's traffic.
Related
I have an Azure function, which fails while running Startup.cs (while initializing the runtime) because it can't load a key from a Key vault. I would like to automate the deployment of this function in the future and therefore I would like to set up an alert to trigger if the function can't initialize correctly for any reason. (I can fix this speficic error, I just use it as an example).
At the moment I see the error in the Notifications section of the function page in the Azure portal:
I also see the exceptions in Diagnose and solve problems -> Availability and Performance:
But I can't seem to find a way to set up an alert to respond to this situation. I assumed that Resource health alert would cover this, but it doesn't. Maybe because to portal reports the function as Status: Running. I also can't find this error in Application Insights.
Is there any way to set up this alert?
To create the Alerts for Function App Runtime failures, start with the Alert Action Groups.
Open your function app in the Azure Portal and create the action group that points to your function and email configuration:
In the same function app menu > Logs > Get the Function Request Failure results such as below:
Then, click on “New Alert Rule” > Insert the values for Alert logic such as Frequency of Evaluation, Operator, Threshold Value, Measure of data summary, etc.,
Next, Select the Action Group which is created at the starting - that contains the Selected Function Data and the Email Notification configuration details:
After configuring the alert group, you’ll get the mail that the alerts are mailed accordingly:
I have given the wrong input to get the alert for the Function Runtime failure, which is driven to the Alerts:
Result:
For more details regarding Azure Alerts, refer to this MS Doc.
Updated Answer:
- This query gives the function errors messages in the logs and from this panel we can create the alert rule for the errors and warnings.
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.
I am trying go get storage account blob list via azure logic apps. But I am facing this error.
I tried few things like changing logic app and the storage account into different regions as recommended here.
I test with set my storage account with allow access from selected networks instead of allow access from all networks, but the "List blobs" action shows "Forbidden" error, it doesn't show the error message Please check your account infor...... which you mentioned in your question.
But when I create the storage connection manually with incorrect infor(such as a wrong storage name), it shows same error message with yours.
Unlike your situation, the error message shows when I create the connection in my side but shows in you "List blobs" action. I'm not sure which way did you create the logic app and the storage connection in logic app, so please check if you provide the correct info when you create the logic app and the storage connection.
By digging deeper, I was able to get away from this error by pointing to the right connection.
Changed the connection
Point to right connection which you have access for or add a new one.
If new connection, then enter the proper Azure Storage account name you want to connect with.
I am testing out developing an Azure Function to read the change feed of a Cosmos DB database. I have created such a function from the Azure portal, but I would like to use VS or VS Code to do so. I have my environment set up using v2.0.3 of the Azure Function Core Tools, but when I try to test the function, I get the following error:
[10/9/2018 4:33:34 PM] Error indexing method
'Functions.workordersTrigger'
[10/9/2018 4:33:34 PM] Microsoft.Azure.WebJobs.Host: Error indexing
method 'Functions.workordersTrigger'.
Microsoft.Azure.WebJobs.Extensions.CosmosDB: Cannot create Collection
Information for workorders in database htm with lease wo_leases in
database htm : Entity with the specified id does not exist in the
system.
Both collections "workorders" and "wo_leases" exist in the db. If I just create a function with a simple HTTP trigger, it works fine, and I can debug in VS Code. It seems to be an issue with the CosmosDB trigger. Can anyone point me in the right direction?
The error message appears if:
Any of the collections do not exist in the target account within the specified database
Your account has a Firewall rule (either Virtual Network or IP rules) that block access to your current workstation.
For #1, verify if the Connection String is pointing to the correct account and that you can see the collections exist within the database (for this you can use the Azure Portal or browse Cosmos Explorer with your connection string).
For #2, verify in the Account there is a rule blocking your access. You can either disable the Firewall rule or add your current IP address (there is a quick link for that in the Portal).
I'm trying to set up an Azure Function that I want to trigger when a message is put on a Service Bus queue. However, I can´t get it to work. The first "log.Info" does not trigger.
I deployed an Http trigger together with my Service Bus trigger and that works.
Some screenshots is shown below. I´ve already tried to remove the json string with key "generatedBy", as I saw as a suggestion on Google.
There are two files in my Visual Studio project which I have not edited: host.json and local.settings.json, I can´t find information about how to set them up or if it´s necessary at all.
Can anyone help me?
The Connection property of ServiceBusTrigger attribute should refer to a setting name, e.g. ServiceBusConnectionString.
Then, you should put the setting with same name to local.settings.json for local development and to Application settings for Azure.
I needed to append this bit to my ServiceBusConnectionString when running locally:
;TransportType=AmqpWebSockets