TestingFramework icon indicating copy to clipboard operation
TestingFramework copied to clipboard

Azure Functions process timeout

Open zzznz27 opened this issue 1 year ago • 4 comments

Azure core function tools process always times out but after the timeout the output in the console shows that it had started and was waiting to be triggered

Something is causing it to not identify when the process has started

Using VScode with extension C# Dev kit v1.10.18 Azure Core Function tools v4.0.6280 image

zzznz27 avatar Sep 15 '24 05:09 zzznz27

I'm having the same issue. I do get a warning/error about a missing blob, but I think it's not related.

When I manually run "func start" I can ping to the localhost URL so it seems to work fine.

Selected out-of-process host.

                  %%%%%%
                 %%%%%%
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@
         @@      %%%       @@
           @@    %%      @@
                %%
                %


Azure Functions Core Tools
Core Tools Version:       4.0.6610 Commit hash: N/A +0d55b5d7efe83d85d2b5c6e0b0a9c1b213e96256 (64-bit)
Function Runtime Version: 4.1036.1.23224

[2024-12-19T21:25:30.047Z] Service starting: serviceName='Microsoft-Azure-Workflows', name='', value='', version='1.94.32.0.6c9fc2f AzureUX-BPM.release_2024w40_slots_lav2 (FB7DEBD3437C.241205-2351)+365541a3f355c823eab883d22781caa264db92a7', message='Starting the worker app with environment name 'Flow function extension', Number of cores: '12'.Memory: '180924416'.', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.94.32.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.

Functions:

        wf-echo:  http://localhost:7071/api/wf-echo/triggers/When_a_HTTP_request_is_received/invoke

        WorkflowDispatcher: edgeWorkflowRuntimeTrigger

[2024-12-19T21:25:30.170Z] Service started: serviceName='Microsoft-Azure-Workflows', version='1.94.32.0.6c9fc2f AzureUX-BPM.release_2024w40_slots_lav2 (FB7DEBD3437C.241205-2351)+365541a3f355c823eab883d22781caa264db92a7', name='', value='', message='Started the worker app with environment name 'Flow function extension', Number of cores: '12'. Memory: '185507840'.', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.94.32.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.
[2024-12-19T21:25:34.912Z] Error response [727340e5-2c5e-4448-8392-31bd03baea01] 404 The specified blob does not exist. (00.0s)
[2024-12-19T21:25:34.915Z] Server:Azurite-Blob/3.33.0
[2024-12-19T21:25:34.916Z] x-ms-error-code:BlobNotFound
[2024-12-19T21:25:34.916Z] x-ms-request-id:d43b01db-cd56-4a77-abdf-0841c6d7293c
[2024-12-19T21:25:34.917Z] Date:Thu, 19 Dec 2024 21:25:34 GMT
[2024-12-19T21:25:34.918Z] Connection:keep-alive
[2024-12-19T21:25:34.919Z] Keep-Alive:REDACTED
[2024-12-19T21:25:34.920Z]
[2024-12-19T21:25:34.932Z] Error response [dbbe192f-23f8-4b39-a1ef-af27cdb51782] 404 The specified blob does not exist. (00.0s)
[2024-12-19T21:25:34.933Z] Server:Azurite-Blob/3.33.0
[2024-12-19T21:25:34.937Z] x-ms-error-code:BlobNotFound
[2024-12-19T21:25:34.938Z] x-ms-request-id:2764766d-6422-444b-b44c-af52ac0a42d1
[2024-12-19T21:25:34.939Z] Date:Thu, 19 Dec 2024 21:25:34 GMT
[2024-12-19T21:25:34.940Z] Connection:keep-alive
[2024-12-19T21:25:34.943Z] Keep-Alive:REDACTED
[2024-12-19T21:25:34.944Z] Transfer-Encoding:chunked
[2024-12-19T21:25:34.946Z] Content-Type:application/xml
[2024-12-19T21:25:34.946Z]
[2024-12-19T21:25:35.000Z] Host lock lease acquired by instance ID '000000000000000000000000A6E48AEE'.

FocusedHawk avatar Dec 19 '24 22:12 FocusedHawk

I did some more digging. I'm testing with a very simple hello workflow. Once I replace it with this workflow as the only workflow to my LA, the response now also includes Worker process started and initialized. However, it still times out as it looks for Host started.

Azure Functions Core Tools
Core Tools Version:       4.0.6610 Commit hash: N/A +0d55b5d7efe83d85d2b5c6e0b0a9c1b213e96256 (64-bit)
Function Runtime Version: 4.1036.1.23224

[2024-12-22T19:26:13.239Z] Service starting: serviceName='Microsoft-Azure-Workflows', name='', value='', version='1.94.32.0.6c9fc2f AzureUX-BPM.release_2024w40_slots_lav2 (FB7DEBD3437C.241205-2351)+365541a3f355c823eab883d22781caa264db92a7', message='Starting the worker app with environment name 'Flow function extension', Number of cores: '12'.Memory: '186404864'.', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.94.32.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.       

Functions:

        wf-echo:  http://localhost:7072/api/wf-echo/triggers/When_a_HTTP_request_is_received/invoke

        WorkflowDispatcher: edgeWorkflowRuntimeTrigger

        XsltNetFxLanguageWorkerFunction: NetFxTrigger

For detailed output, run func with --verbose flag.
[2024-12-22T19:26:13.386Z] Service started: serviceName='Microsoft-Azure-Workflows', version='1.94.32.0.6c9fc2f AzureUX-BPM.release_2024w40_slots_lav2 (FB7DEBD3437C.241205-2351)+365541a3f355c823eab883d22781caa264db92a7', name='', value='', message='Started the worker app with environment name 'Flow function extension', Number of cores: '12'. Memory: '190869504'.', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.94.32.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.        
[2024-12-22T19:26:14.260Z] Worker process started and initialized.
[2024-12-22T19:26:18.116Z] Host lock lease acquired by instance ID '000000000000000000000000A6E48AEE'.

FocusedHawk avatar Dec 22 '24 19:12 FocusedHawk

@FocusedHawk , that's strange. Can you enable the function host start up logging (https://github.com/LogicAppUnit/TestingFramework/wiki/Test-Execution-Logs#enable-functions-runtime-start-up-logging) and share the detailed logs please.

mark-abrams avatar Dec 22 '24 19:12 mark-abrams

@mark-abrams sure, see below

   
--------------------------------------------------------------------------------
-                              INITIALIZING TEST                               -
--------------------------------------------------------------------------------

Azurite is listening on ports 10000 (Blob service), 10001 (Queue service) and 10002 (Table service).
Workflow 'wf-echo' is Stateful
Using local settings file: local.settings.json
The artifacts directory does not exist: echo-message\Artifacts
Using custom library directory: lib\custom

--------------------------------------------------------------------------------
-                             STARTING TEST RUNNER                             -
--------------------------------------------------------------------------------

Test Working Directory: REDACTED\Debug\net8.0\707acdb2-d707-473b-b252-2210caf381ae
Path for Azure Function Core tools: C:\Program Files\Microsoft\Azure Functions Core Tools\func.exe
Selected out-of-process host.

                  %%%%%%
                 %%%%%%
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@
         @@      %%%       @@
           @@    %%      @@
                %%
                %


Azure Functions Core Tools
Core Tools Version:       4.0.6610 Commit hash: N/A +0d55b5d7efe83d85d2b5c6e0b0a9c1b213e96256 (64-bit)
Function Runtime Version: 4.1036.1.23224

[2024-12-22T19:59:20.085Z] Service starting: serviceName='Microsoft-Azure-Workflows', name='', value='', version='1.94.32.0.6c9fc2f AzureUX-BPM.release_2024w40_slots_lav2 (FB7DEBD3437C.241205-2351)+365541a3f355c823eab883d22781caa264db92a7', message='Starting the worker app with environment name 'Flow function extension', Number of cores: '12'.Memory: '189231104'.', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.94.32.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.

Functions:

	wf-echo:  http://localhost:7071/api/wf-echo/triggers/When_a_HTTP_request_is_received/invoke

	WorkflowDispatcher: edgeWorkflowRuntimeTrigger

	XsltNetFxLanguageWorkerFunction: NetFxTrigger

[2024-12-22T19:59:20.226Z] Service started: serviceName='Microsoft-Azure-Workflows', version='1.94.32.0.6c9fc2f AzureUX-BPM.release_2024w40_slots_lav2 (FB7DEBD3437C.241205-2351)+365541a3f355c823eab883d22781caa264db92a7', name='', value='', message='Started the worker app with environment name 'Flow function extension', Number of cores: '12'. Memory: '195330048'.', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.94.32.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.
[2024-12-22T19:59:20.889Z] Worker process started and initialized.
[2024-12-22T19:59:24.953Z] Error response [b9a5cfa4-2967-436e-b732-3119fe5e4a5e] 404 The specified blob does not exist. (00.0s)
[2024-12-22T19:59:24.956Z] Server:Azurite-Blob/3.33.0
[2024-12-22T19:59:24.959Z] x-ms-error-code:BlobNotFound
[2024-12-22T19:59:24.961Z] x-ms-request-id:f4d934f6-5e95-49a6-a21e-4269cc803bcc
[2024-12-22T19:59:24.966Z] Date:Sun, 22 Dec 2024 19:59:24 GMT
[2024-12-22T19:59:24.968Z] Connection:keep-alive
[2024-12-22T19:59:24.970Z] Keep-Alive:REDACTED
[2024-12-22T19:59:24.971Z] 
[2024-12-22T19:59:24.982Z] Error response [e2ab8b1a-cd45-49a7-b2e7-85d72ae6755b] 404 The specified blob does not exist. (00.0s)
[2024-12-22T19:59:24.984Z] Server:Azurite-Blob/3.33.0
[2024-12-22T19:59:24.986Z] x-ms-error-code:BlobNotFound
[2024-12-22T19:59:24.987Z] x-ms-request-id:829b6726-97e5-403e-8c5a-2c208a5e7f7d
[2024-12-22T19:59:24.988Z] Date:Sun, 22 Dec 2024 19:59:24 GMT
[2024-12-22T19:59:24.988Z] Connection:keep-alive
[2024-12-22T19:59:24.989Z] Keep-Alive:REDACTED
[2024-12-22T19:59:24.990Z] Transfer-Encoding:chunked
[2024-12-22T19:59:24.991Z] Content-Type:application/xml
[2024-12-22T19:59:24.991Z] 
[2024-12-22T19:59:25.020Z] Host lock lease acquired by instance ID '000000000000000000000000A6E48AEE'.
LogicAppUnit.TestException: Functions runtime did not start properly. Please make sure you have the latest Azure Functions Core Tools installed and available on your PATH environment variable, and that Azurite is running.
   at LogicAppUnit.Hosting.WorkflowTestHost.StartFunctionRuntime()

FocusedHawk avatar Dec 22 '24 20:12 FocusedHawk