Closed FamsQC closed 3 years ago
Hi, I just checked your example locally and on a deployed function and it seems to be working fine for me. The thing I did change is string myBlob to byte[] myBlob, since it looks like you are trying to receive a png.
I used this code (and some variations) in my attempt to reproduce: https://github.com/oscarvantol/azure-functions-dotnet5-examples/blob/main/ExampleFunction/BlobFunctions.cs
This sample is in this repo: https://github.com/Azure/azure-functions-dotnet-worker/blob/main/samples/Extensions/Blob/BlobFunction.cs
I have quite similar problem, but with http trigger
https://github.com/Azure/azure-functions-dotnet-worker/issues/346
Hi, I just checked your example locally and on a deployed function and it seems to be working fine for me. The thing I did change is string myBlob to byte[] myBlob, since it looks like you are trying to receive a png.
I used this code (and some variations) in my attempt to reproduce: https://github.com/oscarvantol/azure-functions-dotnet5-examples/blob/main/ExampleFunction/BlobFunctions.cs
This sample is in this repo: https://github.com/Azure/azure-functions-dotnet-worker/blob/main/samples/Extensions/Blob/BlobFunction.cs
- Could there be something else in the project that is blocking?
- Can you perhaps share a repo with the rest of your code?
- Is it working on your machine / is the deployment win or lin?
Something could be blocking. The above code snippit I provided earlier was generated from this command: func new --name BlobExample --template "Blob trigger" -> it generated the "string myBlob" I will get you a repo with my code. This does not work on my local machine either, it also times out.
Try this in PowerShell:
func init ExampleFunction --worker-runtime dotnetisolated
cd .\ExampleFunction
func new --name BlobExample --template "Blob trigger"
change your container and Connection in the BlobExample file (optionally change "string myBlob" to "byte[] myBlob")
dotnet publish -c Release
xcopy local.settings.json bin\Release\net5.0\publish\
cd .\bin\Release\net5.0\publish\
func azure functionapp publish myFunctionNameInAzure (might have to login first with az login)
double check your configuration on Azure
upload a file to the container
results - timeouts experienced after uploading a file to the container (the above does not work out of the box for me)
2021-04-02T18:01:01.665 [Information] Executing 'Functions.BlobExample' (Reason='New blob detected: uploads/55~Flowers.png', Id=ea79102f-93cd-4b9d-811b-e105cbb2646a)
2021-04-02T18:01:01.666 [Information] Trigger Details: MessageId: 8598c9e4-0a80-4ba2-827a-7cb52ecec877, DequeueCount: 1, InsertionTime: 2021-04-02T18:01:00.000+00:00, BlobCreated: 2021-04-02T18:00:57.000+00:00, BlobLastModified: 2021-04-02T18:00:57.000+00:00
2021-04-02T18:03:41.338 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.BlobExample' (Id: '6139c1aa-5725-40cd-aa11-b87507b4fe4f'). Initiating cancellation.
2021-04-02T18:03:41.448 [Error] Executed 'Functions.BlobExample' (Failed, Id=6139c1aa-5725-40cd-aa11-b87507b4fe4f, Duration=300976ms)Timeout value of 00:05:00 was exceeded by function: Functions.BlobExample
2021-04-02T18:03:43.521 [Warning] A function timeout has occurred. Restarting worker process executing invocationId '6139c1aa-5725-40cd-aa11-b87507b4fe4f'.
2021-04-02T18:03:43.522 [Warning] Restart of language worker process(es) completed.
@oscarvantol
I used this code (and some variations) in my attempt to reproduce: https://github.com/oscarvantol/azure-functions-dotnet5-examples/blob/main/ExampleFunction/BlobFunctions.cs
and within:
Since preview4 the example was crashing on the UseDevelopmentStorage=true It looks like only azurite (new storage emulator) is supported for now (or it's me)
Can you confirm the current state / requirement for you to get working is to run Azureite on in devcontainer / VSCode?
I cloned https://github.com/oscarvantol/azure-functions-dotnet5-examples and running gives the following:
PS S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction> func host start --verbose
Welcome to .NET 5.0!
---------------------
SDK Version: 5.0.104
Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Restored S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj (in 1.69 sec).
CSC : warning CS8032: An instance of analyzer Microsoft.Azure.Functions.Worker.Sdk.Analyzers.WebJobsAttributesNotSupported cannot be created from C:\Users\Work\.nuget\packages\microsoft.azure.functions.worker.sdk.analyzers\1.0.0\analyzers\dotnet\cs\Microsoft.Azure.Functions.Worker.Sdk.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.. [S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj]
S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\HttpFunction.cs(12,35): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj]
S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\BlobFunctions.cs(13,35): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj]
ExampleFunction -> S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\bin\output\ExampleFunction.dll
Determining projects to restore...
Restored C:\Users\Work\AppData\Local\Temp\fsg421dy.jzl\WorkerExtensions.csproj (in 3.36 sec).
WorkerExtensions -> C:\Users\Work\AppData\Local\Temp\fsg421dy.jzl\buildout\Microsoft.Azure.Functions.Worker.Extensions.dll
Build succeeded.
CSC : warning CS8032: An instance of analyzer Microsoft.Azure.Functions.Worker.Sdk.Analyzers.WebJobsAttributesNotSupported cannot be created from C:\Users\Work\.nuget\packages\microsoft.azure.functions.worker.sdk.analyzers\1.0.0\analyzers\dotnet\cs\Microsoft.Azure.Functions.Worker.Sdk.Analyzers.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.. [S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj]
S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\HttpFunction.cs(12,35): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj]
S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\BlobFunctions.cs(13,35): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\ExampleFunction.csproj]
3 Warning(s)
0 Error(s)
Time Elapsed 00:00:10.19
%%%%%%
%%%%%%
@ %%%%%% @
@@ %%%%%% @@
@@@ %%%%%%%%%%% @@@
@@ %%%%%%%%%% @@
@@ %%%% @@
@@ %%% @@
@@ %% @@
%%
%
Azure Functions Core Tools
Core Tools Version: 3.0.3388 Commit hash: fb42a4e0b7fdc85fbd0bcfc8d743ff7d509122ae
Function Runtime Version: 3.0.15371.0
[2021-04-06T17:50:09.029Z] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: 'e0746809-2618-4123-b438-4fd0901afa67'
[2021-04-06T17:50:09.065Z] Reading host configuration file 'S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\bin\output\host.json'
[2021-04-06T17:50:09.067Z] Host configuration file read:
[2021-04-06T17:50:09.067Z] {
[2021-04-06T17:50:09.068Z] "version": "2.0"
[2021-04-06T17:50:09.069Z] }
[2021-04-06T17:50:09.087Z] Loading functions metadata
[2021-04-06T17:50:09.122Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:java
[2021-04-06T17:50:09.127Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:node
[2021-04-06T17:50:09.134Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:powershell
[2021-04-06T17:50:09.140Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:python
[2021-04-06T17:50:09.141Z] Reading functions metadata
[2021-04-06T17:50:09.144Z] 0 functions found
[2021-04-06T17:50:09.152Z] 0 functions loaded
[2021-04-06T17:50:09.154Z] Loading extensions from S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\bin\output. BundleConfigured: False, PrecompiledFunctionApp: False, LegacyBundle: False
[2021-04-06T17:50:09.162Z] Loading startup extension 'Startup'
[2021-04-06T17:50:09.271Z] Loaded extension 'Startup' (1.0.0.0)
[2021-04-06T17:50:09.280Z] Loading startup extension 'AzureStorage'
[2021-04-06T17:50:09.316Z] Loaded extension 'AzureStorage' (4.0.4.0)
[2021-04-06T17:50:09.326Z] Reading host configuration file 'S:\source\repos\azure-functions-dotnet5-examples\ExampleFunction\bin\output\host.json'
[2021-04-06T17:50:09.327Z] Host configuration file read:
[2021-04-06T17:50:09.328Z] {
[2021-04-06T17:50:09.328Z] "version": "2.0"
[2021-04-06T17:50:09.329Z] }
[2021-04-06T17:50:09.676Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:java
[2021-04-06T17:50:09.677Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:node
[2021-04-06T17:50:09.678Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:powershell
[2021-04-06T17:50:09.679Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:python
[2021-04-06T17:50:09.805Z] Initializing Warmup Extension.
[2021-04-06T17:50:09.990Z] Initializing Host. OperationId: 'e0746809-2618-4123-b438-4fd0901afa67'.
[2021-04-06T17:50:09.997Z] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=e0746809-2618-4123-b438-4fd0901afa67
[2021-04-06T17:50:10.009Z] Loading functions metadata
[2021-04-06T17:50:10.010Z] Reading functions metadata
[2021-04-06T17:50:10.011Z] 0 functions found
[2021-04-06T17:50:10.078Z] 6 functions loaded
[2021-04-06T17:50:10.082Z] LoggerFilterOptions
[2021-04-06T17:50:10.082Z] {
[2021-04-06T17:50:10.083Z] "MinLevel": "None",
[2021-04-06T17:50:10.084Z] "Rules": [
[2021-04-06T17:50:10.085Z] {
[2021-04-06T17:50:10.085Z] "ProviderName": null,
[2021-04-06T17:50:10.086Z] "CategoryName": null,
[2021-04-06T17:50:10.087Z] "LogLevel": null,
[2021-04-06T17:50:10.087Z] "Filter": "<AddFilter>b__0"
[2021-04-06T17:50:10.088Z] },
[2021-04-06T17:50:10.089Z] {
[2021-04-06T17:50:10.089Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2021-04-06T17:50:10.090Z] "CategoryName": null,
[2021-04-06T17:50:10.090Z] "LogLevel": "None",
[2021-04-06T17:50:10.091Z] "Filter": null
[2021-04-06T17:50:10.091Z] },
[2021-04-06T17:50:10.092Z] {
[2021-04-06T17:50:10.092Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2021-04-06T17:50:10.093Z] "CategoryName": null,
[2021-04-06T17:50:10.093Z] "LogLevel": null,
[2021-04-06T17:50:10.094Z] "Filter": "<AddFilter>b__0"
[2021-04-06T17:50:10.095Z] },
[2021-04-06T17:50:10.095Z] {
[2021-04-06T17:50:10.096Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider",
[2021-04-06T17:50:10.096Z] "CategoryName": null,
[2021-04-06T17:50:10.097Z] "LogLevel": null,
[2021-04-06T17:50:10.097Z] "Filter": "<AddFilter>b__0"
[2021-04-06T17:50:10.098Z] }
[2021-04-06T17:50:10.098Z] ]
[2021-04-06T17:50:10.099Z] }
[2021-04-06T17:50:10.099Z] LoggerFilterOptions
[2021-04-06T17:50:10.100Z] {
[2021-04-06T17:50:10.100Z] "MinLevel": "None",
[2021-04-06T17:50:10.101Z] "Rules": [
[2021-04-06T17:50:10.101Z] {
[2021-04-06T17:50:10.102Z] "ProviderName": null,
[2021-04-06T17:50:10.102Z] "CategoryName": null,
[2021-04-06T17:50:10.103Z] "LogLevel": null,
[2021-04-06T17:50:10.104Z] "Filter": "<AddFilter>b__0"
[2021-04-06T17:50:10.104Z] },
[2021-04-06T17:50:10.105Z] {
[2021-04-06T17:50:10.106Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2021-04-06T17:50:10.107Z] "CategoryName": null,
[2021-04-06T17:50:10.107Z] "LogLevel": "None",
[2021-04-06T17:50:10.108Z] "Filter": null
[2021-04-06T17:50:10.109Z] },
[2021-04-06T17:50:10.110Z] {
[2021-04-06T17:50:10.110Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2021-04-06T17:50:10.111Z] "CategoryName": null,
[2021-04-06T17:50:10.112Z] "LogLevel": null,
[2021-04-06T17:50:10.113Z] "Filter": "<AddFilter>b__0"
[2021-04-06T17:50:10.113Z] },
[2021-04-06T17:50:10.114Z] {
[2021-04-06T17:50:10.115Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider",
[2021-04-06T17:50:10.115Z] "CategoryName": null,
[2021-04-06T17:50:10.116Z] "LogLevel": null,
[2021-04-06T17:50:10.117Z] "Filter": "<AddFilter>b__0"
[2021-04-06T17:50:10.118Z] }
[2021-04-06T17:50:10.118Z] ]
[2021-04-06T17:50:10.119Z] }
[2021-04-06T17:50:10.120Z] FunctionResultAggregatorOptions
[2021-04-06T17:50:10.120Z] {
[2021-04-06T17:50:10.121Z] "BatchSize": 1000,
[2021-04-06T17:50:10.121Z] "FlushTimeout": "00:00:30",
[2021-04-06T17:50:10.122Z] "IsEnabled": true
[2021-04-06T17:50:10.123Z] }
[2021-04-06T17:50:10.124Z] SingletonOptions
[2021-04-06T17:50:10.124Z] {
[2021-04-06T17:50:10.125Z] "LockPeriod": "00:00:15",
[2021-04-06T17:50:10.125Z] "ListenerLockPeriod": "00:00:15",
[2021-04-06T17:50:10.126Z] "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
[2021-04-06T17:50:10.126Z] "LockAcquisitionPollingInterval": "00:00:05",
[2021-04-06T17:50:10.127Z] "ListenerLockRecoveryPollingInterval": "00:01:00"
[2021-04-06T17:50:10.127Z] }
[2021-04-06T17:50:10.128Z] QueuesOptions
[2021-04-06T17:50:10.128Z] {
[2021-04-06T17:50:10.129Z] "BatchSize": 16,
[2021-04-06T17:50:10.129Z] "NewBatchThreshold": 64,
[2021-04-06T17:50:10.130Z] "MaxPollingInterval": "00:00:02",
[2021-04-06T17:50:10.130Z] "MaxDequeueCount": 5,
[2021-04-06T17:50:10.131Z] "VisibilityTimeout": "00:00:00"
[2021-04-06T17:50:10.131Z] }
[2021-04-06T17:50:10.132Z] BlobsOptions
[2021-04-06T17:50:10.132Z] {
[2021-04-06T17:50:10.133Z] "CentralizedPoisonQueue": false
[2021-04-06T17:50:10.133Z] }
[2021-04-06T17:50:10.134Z] HttpOptions
[2021-04-06T17:50:10.135Z] {
[2021-04-06T17:50:10.135Z] "DynamicThrottlesEnabled": false,
[2021-04-06T17:50:10.136Z] "MaxConcurrentRequests": -1,
[2021-04-06T17:50:10.137Z] "MaxOutstandingRequests": -1,
[2021-04-06T17:50:10.137Z] "RoutePrefix": "api"
[2021-04-06T17:50:10.138Z] }
[2021-04-06T17:50:10.140Z] Starting JobHost
[2021-04-06T17:50:10.142Z] Starting Host (HostId=desktopo9h84rc-1863323415, InstanceId=8b5c5e90-d1fa-48b4-9fbd-5dc88ce8a16a, Version=3.0.15371.0, ProcessId=14628, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
[2021-04-06T17:50:10.152Z] Loading functions metadata
[2021-04-06T17:50:10.153Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:java
[2021-04-06T17:50:10.154Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:node
[2021-04-06T17:50:10.155Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:powershell
[2021-04-06T17:50:10.155Z] FUNCTIONS_WORKER_RUNTIME set to dotnet-isolated. Skipping WorkerConfig for language:python
[2021-04-06T17:50:10.157Z] Reading functions metadata
[2021-04-06T17:50:10.157Z] 0 functions found
[2021-04-06T17:50:10.166Z] 6 functions loaded
[2021-04-06T17:50:10.202Z] Generating 6 job function(s)
[2021-04-06T17:50:10.264Z] Found the following functions:
[2021-04-06T17:50:10.264Z] Host.Functions.BlobFunction2
[2021-04-06T17:50:10.265Z] Host.Functions.HttpFunction1
[2021-04-06T17:50:10.266Z] Host.Functions.HttpFunction2
[2021-04-06T17:50:10.267Z] Host.Functions.MediaUploadProcessorFunction
[2021-04-06T17:50:10.267Z] Host.Functions.TimerFunction1
[2021-04-06T17:50:10.268Z] Host.Functions.TimerFunction2
[2021-04-06T17:50:10.269Z]
[2021-04-06T17:50:10.292Z] Initializing function HTTP routes
[2021-04-06T17:50:10.292Z] Mapped function route 'api/test' [get,post] to 'HttpFunction1'
[2021-04-06T17:50:10.293Z] Mapped function route 'api/testerror' [get,post] to 'HttpFunction2'
[2021-04-06T17:50:10.294Z]
[2021-04-06T17:50:10.304Z] Host initialized (151ms)
Functions:
HttpFunction1: [GET,POST] http://localhost:7071/api/test
HttpFunction2: [GET,POST] http://localhost:7071/api/testerror
BlobFunction2: BlobTrigger
MediaUploadProcessorFunction: BlobTrigger
TimerFunction1: TimerTrigger
TimerFunction2: TimerTrigger
[2021-04-06T17:50:10.521Z] {
[2021-04-06T17:50:10.521Z] "ProcessId": 3472,
[2021-04-06T17:50:10.522Z] "WorkerVersion": "1.0.0.0",
[2021-04-06T17:50:10.523Z] "ProductVersion": "1.0.0-local Commit hash: N/A\u002B4e5dc418dbdffa89b06f2dedaa8ba0f4070faae9",
[2021-04-06T17:50:10.524Z] "FrameworkDescription": ".NET 5.0.4",
[2021-04-06T17:50:10.524Z] "OSDescription": "Microsoft Windows 10.0.19041",
[2021-04-06T17:50:10.525Z] "OSArchitecture": "X64",
[2021-04-06T17:50:10.526Z] "RuntimeIdentifier": "win10-x64",
[2021-04-06T17:50:10.526Z] "CommandLine": "S:\\source\\repos\\azure-functions-dotnet5-examples\\ExampleFunction\\bin\\output\\ExampleFunction.dll --host 127.0.0.1 --port 55956 --workerId 2def2315-bfcc-4d03-9022-7afdf3044b05 --requestId f652ae5b-ebe2-4c26-912b-e9470d588f3c --grpcMaxMessageLength 2147483647"
[2021-04-06T17:50:10.527Z] }
[2021-04-06T17:50:10.553Z] Worker process started and initialized.
[2021-04-06T17:50:41.485Z] The listener for function 'Functions.TimerFunction1' was unable to start.
[2021-04-06T17:50:41.486Z] The listener for function 'Functions.TimerFunction1' was unable to start. Microsoft.Azure.Storage.Common: No connection could be made because the target machine actively refused it. System.Net.Http: No connection could be made because the target machine actively refused it. System.Private.CoreLib: No connection could be made because the target machine actively refused it.
[2021-04-06T17:50:42.375Z] The listener for function 'Functions.TimerFunction2' was unable to start.
[2021-04-06T17:50:42.380Z] The listener for function 'Functions.TimerFunction2' was unable to start. Microsoft.Azure.Storage.Common: No connection could be made because the target machine actively refused it. System.Net.Http: No connection could be made because the target machine actively refused it. System.Private.CoreLib: No connection could be made because the target machine actively refused it.
[2021-04-06T17:50:42.887Z] The listener for function 'Functions.BlobFunction2' was unable to start.
[2021-04-06T17:50:42.892Z] The listener for function 'Functions.BlobFunction2' was unable to start. Microsoft.Azure.Storage.Common: No connection could be made because the target machine actively refused it. System.Net.Http: No connection could be made because the target machine actively refused it. System.Private.CoreLib: No connection could be made because the target machine actively refused it.
[2021-04-06T17:50:42.904Z] Host started (32760ms)
[2021-04-06T17:50:42.906Z] Job host started
[2021-04-06T17:50:43.498Z] Retrying to start listener for function 'Functions.TimerFunction1' (Attempt 1)
[2021-04-06T17:50:43.651Z] An unhandled exception has occurred. Host is shutting down.
[2021-04-06T17:50:43.656Z] Microsoft.Azure.Storage.Common: No connection could be made because the target machine actively refused it. System.Net.Http: No connection could be made because the target machine actively refused it. System.Private.CoreLib: No connection could be made because the target machine actively refused it.
[2021-04-06T17:50:43.686Z] Stopping host...
[2021-04-06T17:50:43.715Z] Stopping JobHost
[2021-04-06T17:50:43.721Z] Stopping the listener 'Microsoft.Azure.WebJobs.Host.Blobs.Listeners.BlobListener' for function 'MediaUploadProcessorFunction'
[2021-04-06T17:50:43.730Z] Stopped the listener 'Microsoft.Azure.WebJobs.Host.Blobs.Listeners.BlobListener' for function 'MediaUploadProcessorFunction'
[2021-04-06T17:50:43.735Z] Job host stopped
[2021-04-06T17:50:43.736Z] The listener for function 'Functions.TimerFunction1' was unable to start.
[2021-04-06T17:50:43.739Z] The listener for function 'Functions.TimerFunction1' was unable to start. Microsoft.Azure.Storage.Common: The operation was canceled. System.Private.CoreLib: The operation was canceled.
[2021-04-06T17:50:43.764Z] Host shutdown completed.
(#346 )
seems to be related
@AFDevMike sorry for not getting back sooner. I have issue and identical logs running this when I have no storage emulator running.
For me the example works both with AzureStorageEmulator or Azurite (installed with on my devbox with npm).
@oscarvantol , thank you. I have since proceeded to downgrade back to .Net Core 3.1 so is no longer an issue.
I didn't save repro but in general was using(attempting to use) our actual live blobstorage Connection and avoided AzureStorageEmulator and am unfamiliar with Azurite . Either way thanks for response.
I also downgraded back to 3.1 I would very much like to move forward with .NET 5.0 though, so if somebody has some ideas on to why Blob Triggers are timing out I'm all ears. I have two timer triggers firing in my code that seem to be running fine, blob triggers do not.
@FamsQC apologies for the delayed response. It would be great if we had the ability to repro this for investigation. Do you have a repro and exact set of steps (including steps on how you're creating the blob, blob type, etc.)? Thanks!
@FamsQC apologies for the delayed response. It would be great if we had the ability to repro this for investigation. Do you have a repro and exact set of steps (including steps on how you're creating the blob, blob type, etc.)? Thanks!
No worries - I was getting the repo together and noticed it is now working. So perhaps something got fixed along the way. I'll close this.
It somewhat works but I guess I am wondering why Stream isn't supported (byte[] or string only?)
Function("BlobExample")] public static void Run([BlobTrigger("uploads/{name}", Connection = "AzureWebJobsStorage")] byte[] myBlob, string name, FunctionContext context)
Stream won't run properly. Small files seems to work, but large files with this signature won't fire. I uploaded a 400 MB file and it seems to blow up or not fire at all.
here is the repo: https://github.com/FamsQC/IsolatedDotNetAzureFunctions
That's a limitation of the worker bindings today. We have plans to address that in upcoming releases, but don't have an ETA I can share at this point.
Thanks for the follow up!
Ok thanks. I'll stick with NET 3.1 for awhile
Is there a working example for a BlobTrigger?
I cannot seem to get a BlobTrigger to actually fire properly. In Azure log stream of the function. The trigger fires, but it does not seem to find this method to execute and eventually after 5:00:00 times out.