Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.8k stars 320 forks source link

Invalid storage account when calling Azurite from Azure Functions V4 (both in Kubernetes) #1677

Open calasto123 opened 2 years ago

calasto123 commented 2 years ago

Which service(blob, file, queue, table) does this issue concern?

Blob.

Which version of the Azurite was used?

3.19.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

DockerHub

What's the Node.js version?

In Docker image.

What problem was encountered?

I have a .Net 6 Azure Function V4, and when that tries to call Azurite emulator all I get back is a 400, both the Azure function and Azurite live in a Kubernetes cluster. The functions app is using v12.12.0 of the blob storage API which as far as I can tell should be compatible with Azurite v3.19.0.

Capture

Steps to reproduce the issue?

blueww commented 2 years ago

@calasto123

Would you please share:

  1. how you started Azurite, with which command , or docker-compose.yaml?
  2. The code to send the request to Azurite with v12.12.0 of the blob storage
  3. The Azurite debug log for the failure.

BTW, https://github.com/Azure/Azurite/issues/1574 has same error message with this issue. It use wrong format to set customized storage account in docker-compose.yaml. You might can reference it and see if you have same issue.

NawafSwe commented 1 year ago

Hello @calasto123, I was facing the same issue, this issue was occurring because I created the Azure function from the portal, and there was no option to link the function with account storage, however, I managed to solve this by making the function using Azure Functions extension in VSCode where it gave the option to link the Azure function with a storage account.

justinmchase commented 1 year ago

Were you ever able to solve this?

blueww commented 1 year ago

@justinmchase The original issue looks can be caused by some incorrect configuration of Azurite. If you also meet the similar issue, you might can open a new issue, by following the issue template. Please give the detail Azurite version, repro steps/code/configuration, and Azurite debug log. Then we can look deep into it.