Skip to content

Python Worker exceeds retry count #537

@bnm91

Description

@bnm91

Investigative information

Please provide the following:

  • Timestamp: 9/1/2019 10:12AM PT
  • Core Tools version: 2.7.1585
  • Python Version: Python 3.6.4

Repro steps

  1. Follow the simplest python azure function tutorial https://docs.microsoft.com/en-us/azure/azure-functions/tutorial-vs-code-serverless-python
  2. Run the function
  3. Observe the function seemingly start up briefly only to fail immediately

Expected behavior

After I perform step 2, I expect the function to run locally, allowing me to test the function.

Actual behavior

> Executing task: .venv\Scripts\python -m pip install -r requirements.txt <

You must give at least one requirement to install (see "pip help install")
You are using pip version 9.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Terminal will be reused by tasks, press any key to close it.


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

Azure Functions Core Tools (2.7.1585 Commit hash: 9a2b7239b937148e3b76e6f7999798629a82134a)
Function Runtime Version: 2.0.12641.0
[9/1/2019 4:52:05 PM] Building host: startup suppressed:False, configuration suppressed: False
[9/1/2019 4:52:06 PM] Initializing Host.
[9/1/2019 4:52:06 PM] Host initialization: ConsecutiveErrors=0, StartupCount=1
[9/1/2019 4:52:06 PM] LoggerFilterOptions
[9/1/2019 4:52:06 PM] {
[9/1/2019 4:52:06 PM]   "MinLevel": "None",
[9/1/2019 4:52:06 PM]   "Rules": [
[9/1/2019 4:52:06 PM]     {
[9/1/2019 4:52:06 PM]       "ProviderName": null,
[9/1/2019 4:52:06 PM]       "CategoryName": null,
[9/1/2019 4:52:06 PM]       "LogLevel": null,
[9/1/2019 4:52:06 PM]       "Filter": "<AddFilter>b__0"
[9/1/2019 4:52:06 PM]     },
[9/1/2019 4:52:06 PM]     {
[9/1/2019 4:52:06 PM]       "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[9/1/2019 4:52:06 PM]       "CategoryName": null,
[9/1/2019 4:52:06 PM]       "LogLevel": "None",
[9/1/2019 4:52:06 PM]       "Filter": null
[9/1/2019 4:52:06 PM]     },
[9/1/2019 4:52:06 PM]     {
[9/1/2019 4:52:06 PM]       "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[9/1/2019 4:52:06 PM]       "CategoryName": null,
[9/1/2019 4:52:06 PM]       "LogLevel": null,
[9/1/2019 4:52:06 PM]       "Filter": "<AddFilter>b__0"
[9/1/2019 4:52:06 PM]     }
[9/1/2019 4:52:06 PM]   ]
[9/1/2019 4:52:06 PM] }
[9/1/2019 4:52:06 PM] FunctionResultAggregatorOptions
[9/1/2019 4:52:06 PM] {
[9/1/2019 4:52:06 PM]   "BatchSize": 1000,
[9/1/2019 4:52:06 PM]   "FlushTimeout": "00:00:30",
[9/1/2019 4:52:06 PM]   "IsEnabled": true
[9/1/2019 4:52:06 PM] }
[9/1/2019 4:52:06 PM] SingletonOptions
[9/1/2019 4:52:06 PM] {
[9/1/2019 4:52:06 PM]   "LockPeriod": "00:00:15",
[9/1/2019 4:52:06 PM]   "ListenerLockPeriod": "00:00:15",
[9/1/2019 4:52:06 PM]   "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
[9/1/2019 4:52:06 PM]   "LockAcquisitionPollingInterval": "00:00:05",
[9/1/2019 4:52:06 PM]   "ListenerLockRecoveryPollingInterval": "00:01:00"
[9/1/2019 4:52:06 PM] }
[9/1/2019 4:52:06 PM] HttpOptions
[9/1/2019 4:52:06 PM] {
[9/1/2019 4:52:06 PM]   "DynamicThrottlesEnabled": false,
[9/1/2019 4:52:06 PM]   "MaxConcurrentRequests": -1,
[9/1/2019 4:52:06 PM]   "MaxOutstandingRequests": -1,
[9/1/2019 4:52:06 PM]   "RoutePrefix": "api"
[9/1/2019 4:52:06 PM] }
[9/1/2019 4:52:06 PM] Starting JobHost
[9/1/2019 4:52:06 PM] Starting Host (HostId=desktoph2na7th-555883459, InstanceId=412e51b2-0949-43bd-b434-09ba2c49cda1, Version=2.0.12641.0, ProcessId=304, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=)
[9/1/2019 4:52:06 PM] Loading functions metadata
[9/1/2019 4:52:06 PM] 1 functions loaded
[9/1/2019 4:52:06 PM] Loading proxies metadata
[9/1/2019 4:52:06 PM] Initializing Azure Function proxies
[9/1/2019 4:52:06 PM] 0 proxies loaded
[9/1/2019 4:52:06 PM] Starting language worker process:python  C:\Users\First Last\.vscode\extensions\ms-python.python-2019.3.6558\pythonFiles\ptvsd_launcher.py --default --host 127.0.0.1 --port 9091 --wait "C:\Users\First
Last\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\worker.py" --host 127.0.0.1 --port 64975 --workerId 576f52d9-a5d9-4bb0-9b2b-65f3b3d453f3 --requestId ce8c1f30-1fb6-429d-b81b-8a7839aa65d1 --grpcMaxMessageLength 134217728
[9/1/2019 4:52:06 PM] python process with Id=15796 started
[9/1/2019 4:52:06 PM] Generating 1 job function(s)
[9/1/2019 4:52:06 PM] Starting language worker process:python  C:\Users\First Last\.vscode\extensions\ms-python.python-2019.3.6558\pythonFiles\ptvsd_launcher.py --default --host 127.0.0.1 --port 9091 --wait "C:\Users\First
Last\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\worker.py" --host 127.0.0.1 --port 64975 --workerId 46d131df-5b17-44e1-809f-9d517423e41a --requestId 503144f6-ce9e-48b6-a49e-40e1c35230d8 --grpcMaxMessageLength 134217728
[9/1/2019 4:52:06 PM] python process with Id=10776 started
[9/1/2019 4:52:07 PM] Found the following functions:
[9/1/2019 4:52:07 PM] Host.Functions.HttpTriggerTest
[9/1/2019 4:52:07 PM]
[9/1/2019 4:52:07 PM] Host initialized (573ms)
[9/1/2019 4:52:07 PM] Host started (590ms)
[9/1/2019 4:52:07 PM] Job host started
[9/1/2019 4:52:07 PM] python: can't open file 'C:\Users\First': [Errno 2] No such file or directory
[9/1/2019 4:52:07 PM] python: can't open file 'C:\Users\First': [Errno 2] No such file or directory
[9/1/2019 4:52:07 PM] Starting language worker process:python  C:\Users\First Last\.vscode\extensions\ms-python.python-2019.3.6558\pythonFiles\ptvsd_launcher.py --default --host 127.0.0.1 --port 9091 --wait "C:\Users\First
Last\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\python\worker.py" --host 127.0.0.1 --port 64975 --workerId e9dc059f-128f-4e11-8363-797b4f1eeb1b --requestId c857107a-6b99-4d5a-9b71-d27827bfcad3 --grpcMaxMessageLength 134217728
[9/1/2019 4:52:07 PM] python process with Id=20920 started
Hosting environment: Production
Content root path: C:\personal_location\Dev\PythonDev\MyAzureFunctions
Now listening on: http://0.0.0.0:7071
Application started. Press Ctrl+C to shut down.

Http Functions:

        HttpTriggerTest: [GET,POST] http://localhost:7071/api/HttpTriggerTest

[9/1/2019 4:52:07 PM] python: can't open file 'C:\Users\First': [Errno 2] No such file or directory
[9/1/2019 4:52:07 PM] Exceeded language worker restart retry count for runtime:python. Shutting down Functions Host
[9/1/2019 4:52:07 PM] Stopping host...
[9/1/2019 4:52:07 PM] Stopping JobHost
[9/1/2019 4:52:07 PM] Job host stopped
[9/1/2019 4:52:07 PM] Host shutdown completed.
Application is shutting down...

Terminal will be reused by tasks, press any key to close it.

I notice that one of the warnings says "python: can't open file 'C:\Users\First':" because no such file or directory exists which is true. I believe the directory it should be looking for is "C:\Users\First Last". I wonder if perhaps folder names with spaces which are supported on windows are not supported here?

Any help appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions