Azure-Samples / azure-search-power-skills

A collection of useful functions to be deployed as custom skills for Azure Cognitive Search
MIT License
283 stars 168 forks source link

Errors in running the EmbeddingGenerator Azure function locally with VSCode #124

Closed Vivihung closed 11 months ago

Vivihung commented 1 year ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Clone the code
  2. Go to the \Vector\EmbeddinGenerator folder
  3. Create local.settings.json per instruction.
  4. Execute func start --python

Any log messages given by the failure

[2023-08-10T23:48:18.670Z] There was an error performing a read operation on the Blob Storage Secret Repository.
[2023-08-10T23:48:18.671Z] Azure.Core: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Http: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Sockets: No connection could be made because the target machine actively refused it.
[2023-08-10T23:48:18.703Z] A host error has occurred during startup operation 'b816d542-5f6c-4417-b694-ff2100d8e6c5'.
[2023-08-10T23:48:18.705Z] Azure.Core: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Http: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Sockets: No connection could be made because the target machine actively refused it.
[2023-08-10T23:48:55.647Z] There was an error performing a read operation on the Blob Storage Secret Repository.
[2023-08-10T23:48:55.649Z] Azure.Core: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Http: No connection could be made because the target machine actively refused it. (127.0.0.1:10000). System.Net.Sockets: No connection could be made because the target machine actively refused it.
Value cannot be null. (Parameter 'provider')

image

Expected/desired behavior

The function can run locally without errors

OS and Version?

Windows 10

Versions

Mention any other details that might be useful

Vivihung commented 1 year ago

Adding "AzureWebJobsSecretStorageType": "files", in local.settings.json fixed the error.

example:

{
    "IsEncrypted": false,
    "Values": {
      "FUNCTIONS_WORKER_RUNTIME": "python",
      "AzureWebJobsStorage": "UseDevelopmentStorage=true",
      "AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
      "AzureWebJobsSecretStorageType": "files",
      ...
    }
  }