azure-functions-durable-js: local testing of the Time Triggers and DurabelHTTP function. Not work!11
Describe the bug I want to test locally the TimeTriggers and DurabelHTTP functions. But I can’t.
Investigative information
- Durable Functions extension version: 1.8.6
- Durable-functions: 1.4.3
- JavaScript
- Node.js version: 12.4.1
To Reproduce Steps to reproduce the behavior:
- func start
While not required, providing your orchestrator’s source code in anonymized form is often very helpful when investigating unexpected orchestrator behavior.
Expected behavior
local.setting.json
{ "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "AzureWebJobsDashboard": "UseDevelopmentStorage=true", "FUNCTIONS_WORKER_RUNTIME": "node" } }
func start
logs:
` user@WIN-O975L0V8NGO MINGW64 ~/Desktop/azure_developers (master) $ npm run dev
azure_developers@1.0.0 dev C:\Users\user\Desktop\azure_developers func start
%%%%%%
%%%%%%
@ %%%%%% @
@@ %%%%%% @@
@@@ %%%%%%%%%%% @@@
@@ %%%%%%%%%% @@
@@ %%%% @@
@@ %%% @@
@@ %% @@
%%
%
Azure Functions Core Tools (3.0.2630 Commit hash: beec61496e1c5de8aa4ba38d1884f7b48233a7ab)
Function Runtime Version: 3.0.13901.0
[06.08.2020 8:18:35] Building host: startup suppressed: ‘False’, configuration suppressed: ‘False’, startup operation id: ‘3c410f71-0b82-413c-9cb7-59c038c3c02a’
[06.08.2020 8:18:35] Reading host configuration file ‘C:\Users\user\Desktop\azure_developers\host.json’
[06.08.2020 8:18:35] Host configuration file read:
[06.08.2020 8:18:35] {
[06.08.2020 8:18:35] “version”: “2.0”,
[06.08.2020 8:18:35] “logging”: {
[06.08.2020 8:18:35] “applicationInsights”: {
[06.08.2020 8:18:36] “samplingSettings”: {
[06.08.2020 8:18:36] “isEnabled”: true,
[06.08.2020 8:18:36] “excludedTypes”: “Request”
[06.08.2020 8:18:36] }
[06.08.2020 8:18:36] }
[06.08.2020 8:18:36] },
[06.08.2020 8:18:36] “extensionBundle”: {
[06.08.2020 8:18:36] “id”: “Microsoft.Azure.Functions.ExtensionBundle”,
[06.08.2020 8:18:36] “version”: “[1.*, 2.0.0)”
[06.08.2020 8:18:36] }
[06.08.2020 8:18:36] }
[06.08.2020 8:18:36] FUNCTIONS_WORKER_RUNTIME set to node. Skipping WorkerConfig for language:java
[06.08.2020 8:18:36] File ‘C:\Program Files\dotnet\dotnet.exe’ is not found, ‘dotnet’ invocation will rely on the PATH environment variable.
[06.08.2020 8:18:36] FUNCTIONS_WORKER_RUNTIME set to node. Skipping WorkerConfig for language:powershell
[06.08.2020 8:18:36] FUNCTIONS_WORKER_RUNTIME set to node. Skipping WorkerConfig for language:python
[06.08.2020 8:18:36] Loading functions metadata
[06.08.2020 8:18:36] Reading functions metadata
[06.08.2020 8:18:36] 3 functions found
[06.08.2020 8:18:37] 3 functions loaded
[06.08.2020 8:18:37] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at C:\Users\user\AppData\Local\Temp\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle
[06.08.2020 8:18:37] Found a matching extension bundle at C:\Users\user\AppData\Local\Temp\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\1.3.0
[06.08.2020 8:18:37] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[06.08.2020 8:18:37] Skipping bundle download since it already exists at path C:\Users\user\AppData\Local\Temp\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\1.3.0
[06.08.2020 8:18:37] Loading extension bundle from C:\Users\user\AppData\Local\Temp\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\1.3.0
[06.08.2020 8:18:38] FUNCTIONS_WORKER_RUNTIME set to node. Skipping WorkerConfig for language:java
[06.08.2020 8:18:38] File ‘C:\Program Files\dotnet\dotnet.exe’ is not found, ‘dotnet’ invocation will rely on the PATH environment variable.
[06.08.2020 8:18:38] FUNCTIONS_WORKER_RUNTIME set to node. Skipping WorkerConfig for language:powershell
[06.08.2020 8:18:38] FUNCTIONS_WORKER_RUNTIME set to node. Skipping WorkerConfig for language:python
[06.08.2020 8:18:38] Initializing Warmup Extension.
[06.08.2020 8:18:38] Initializing Host. OperationId: ‘3c410f71-0b82-413c-9cb7-59c038c3c02a’.
[06.08.2020 8:18:39] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=3c410f71-0b82-413c-9cb7-59c038c3c02a
[06.08.2020 8:18:39] LoggerFilterOptions
[06.08.2020 8:18:39] {
[06.08.2020 8:18:39] “MinLevel”: “None”,
[06.08.2020 8:18:39] “Rules”: [
[06.08.2020 8:18:39] {
[06.08.2020 8:18:39] “ProviderName”: null,
[06.08.2020 8:18:40] “CategoryName”: null,
[06.08.2020 8:18:40] “LogLevel”: null,
[06.08.2020 8:18:40] “Filter”: “<AddFilter>b__0”
[06.08.2020 8:18:40] },
[06.08.2020 8:18:40] {
[06.08.2020 8:18:40] “ProviderName”: “Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider”,
[06.08.2020 8:18:40] “CategoryName”: null,
[06.08.2020 8:18:40] “LogLevel”: “None”,
[06.08.2020 8:18:40] “Filter”: null
[06.08.2020 8:18:40] },
[06.08.2020 8:18:40] {
[06.08.2020 8:18:40] “ProviderName”: “Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider”,
[06.08.2020 8:18:40] “CategoryName”: null,
[06.08.2020 8:18:40] “LogLevel”: null,
[06.08.2020 8:18:40] “Filter”: “<AddFilter>b__0”
[06.08.2020 8:18:40] }
[06.08.2020 8:18:40] ]
[06.08.2020 8:18:40] }
[06.08.2020 8:18:40] FunctionResultAggregatorOptions
[06.08.2020 8:18:40] {
[06.08.2020 8:18:40] “BatchSize”: 1000,
[06.08.2020 8:18:41] “FlushTimeout”: “00:00:30”,
[06.08.2020 8:18:41] “IsEnabled”: true
[06.08.2020 8:18:41] }
[06.08.2020 8:18:41] SingletonOptions
[06.08.2020 8:18:41] {
[06.08.2020 8:18:41] “LockPeriod”: “00:00:15”,
[06.08.2020 8:18:41] “ListenerLockPeriod”: “00:00:15”,
[06.08.2020 8:18:41] “LockAcquisitionTimeout”: “10675199.02:48:05.4775807”,
[06.08.2020 8:18:41] “LockAcquisitionPollingInterval”: “00:00:05”,
[06.08.2020 8:18:41] “ListenerLockRecoveryPollingInterval”: “00:01:00”
[06.08.2020 8:18:41] }
[06.08.2020 8:18:41] HttpOptions
[06.08.2020 8:18:41] {
[06.08.2020 8:18:41] “DynamicThrottlesEnabled”: false,
[06.08.2020 8:18:41] “MaxConcurrentRequests”: -1,
[06.08.2020 8:18:41] “MaxOutstandingRequests”: -1,
[06.08.2020 8:18:41] “RoutePrefix”: “api”
[06.08.2020 8:18:41] }
[06.08.2020 8:18:41] Starting JobHost
[06.08.2020 8:18:41] Starting Host (HostId=wino975l0v8ngo-1007751352, InstanceId=446fa29f-6a3e-433e-91f7-d859085b98d6, Version=3.0.13901.0, ProcessId=9868, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
[06.08.2020 8:18:42] Loading functions metadata
[06.08.2020 8:18:42] Loading proxies metadata
[06.08.2020 8:18:42] Initializing Azure Function proxies
[06.08.2020 8:18:42] 0 proxies loaded
[06.08.2020 8:18:42] 3 functions loaded
[06.08.2020 8:18:42] Starting worker process:node “C:\Users\user\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\dist/src/nodejsWorker.js” --host 127.0.0.1 --port 61308 --workerId ef01d1ec-f3a0-4b7a-9df7-3a66d65b8188 --requestId 406196c2-80c9-473d-8016-c2c8cb807b33 --grpcMaxMessageLength 2147483647
[06.08.2020 8:18:42] node process with Id=12536 started
[06.08.2020 8:18:43] Generating 2 job function(s)
[06.08.2020 8:18:43] Worker ef01d1ec-f3a0-4b7a-9df7-3a66d65b8188 connecting on 127.0.0.1:61308
[06.08.2020 8:18:43] Found the following functions:
[06.08.2020 8:18:43] Host.Functions.HttpTrigger1Test
[06.08.2020 8:18:43] Host.Functions.TimerTrigger1
[06.08.2020 8:18:43]
[06.08.2020 8:18:43] Initializing function HTTP routes
[06.08.2020 8:18:43] Mapped function route ‘api/HttpTrigger1Test’ [get,post] to ‘HttpTrigger1Test’
[06.08.2020 8:18:43]
[06.08.2020 8:18:43] Host initialized (1265ms)
Http Functions:
HttpTrigger1Test: [GET,POST] http://localhost:7071/api/HttpTrigger1Test
[06.08.2020 8:19:15] The listener for function ‘Functions.TimerTrigger1’ was unable to start. [06.08.2020 8:19:15] The listener for function ‘Functions.TimerTrigger1’ was unable to start. Microsoft.Azure.Storage.Common: The connection is not established. the destination computer rejected the connection request. System.Net.Http: Connection not established because the destination computer rejected the connection request. System.Private.CoreLib: Connection not established because the destination computer rejected the connection request. [06.08.2020 8:19:15] Host started (33595ms) [06.08.2020 8:19:15] Job host started [06.08.2020 8:19:15] The ‘DurableFunctionsHttpStart1’ function is in error: The binding type(s) ‘orchestrationClient’ were not found in the configured extension bundle. Please ensure the type is correct and the correct version of extension bundle is configured. Hosting environment: Production Content root path: C:\Users\user\Desktop\azure_developers Now listening on: http://0.0.0.0:7071 Application started. Press Ctrl+C to shut down.
` Additional context
- Development environment Visual Studio
- Repository Source Code: https://github.com/IDONTSUDO/azure_developers
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 19 (1 by maintainers)
There was an error performing a read operation on the Blob Storage Secret Repository. Please ensure the 'AzureWebJobsStorage' connection string is valid.
this error seems to be a bug with the azure-function-app-core-tools. I have effectively recreated it on my end and to solve it I just provided a valid Azure Storage connection string.In your
local.settings.json
the fieldAzureWebJobsStorage
replace the current value with a real Azure Storage connection string from the cloud and it should work."AzureWebJobsStorage": "UseDevelopmentStorage=true"
replaceUseDevelopmentStorage=true
with the Connection String from the cloudConnection String looks like this:
DefaultEndpointsProtocol=https;AccountName=yourstoragenamehere;AccountKey=somereallylongkeygeneratedbyAzure;EndpointSuffix=core.windows.net
To explain a little the difference between storage
emulator
and storageconnection string
. Theconnection string
links directly to a real storage account in your Azure Cloud subscription. Thestorage emulator
is meant to act like a real storage account but in reality it doesn’t exist and it’s just for testing purposes. Having the valueUseDevelopmentStorage=true
tells your code that you will be using theemulator
which means you need to get it up and running since it expects to use it.There is some documentation on the emulator here:
https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator
And some documentation on connection strings and the local.settings.json file here:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash#local-settings-file
I generally stick to using real connection strings because even in my dev environment I need dev values from my real storage.
ITS WORKS!111 thx ALL
Just if anyone finds this issue, please use azurite for local storage emulation, the storage emulator was deprecated.
I had the same problem. I will explain how I fixed it below, but first let me mention a few things.
The ExtensionsBundle uses an old version of durable functions. v 1.8.5, which is known to have certain bugs. I suggest getting the newest version because it is 1) more reliable 2)won’t give you these issues.
What I did was first delete that entire piece of code from my host.json
"extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[1.*, 2.0.0)" }
Then run the command
func extensions install
, this should effectively generate an extensions.csproj file for you in your project folder. Then test by runningfunc start
If you still want to use the version of durable-functions that you currently have, you can go into the extensions.csproj file and change the version number for the durable extension. and then run the command
func extensions install
again.same problem