Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Status code 404, (empty body) : when creating queue with Java SDK

Open LutherWest opened this issue 3 years ago • 0 comments

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

queue

Which version of the Azurite was used?

latest (3.18.0)

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

DockerHub

What's the Node.js version?

From Dockerfile - node:lts-alpine3.10

What problem was encountered?

Running Azurite in docker and using com.azure:azure-storage-queue:12.14.0 Java SDK, attempt to create queue fails with com.azure.storage.queue.models.QueueStorageException: Status code 404, (empty body).

Steps to reproduce the issue?

Run docker container with the following command:

docker run -d --rm -p 10001:10001 mcr.microsoft.com/azure-storage/azurite azurite -d /opt/azurite/debug.log

Execute the following java code snippet:

final QueueServiceClient client = new QueueServiceClientBuilder()
        .credential(new StorageSharedKeyCredential(
                "devstoreaccount1",
                "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
        ))
        .endpoint("http://127.0.0.1:10001/devstoreaccount1")
        .buildClient();
client.getQueueClient("messages").createIfNotExists();

Error:

Exception in thread "main" com.azure.storage.queue.models.QueueStorageException: Status code 404, (empty body)

Logs from Azurite:

2022-08-12T14:29:48.096Z         info: Azurite Blob service is starting on 127.0.0.1:10000
2022-08-12T14:29:48.097Z         info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2022-08-12T14:29:48.097Z         info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2022-08-12T14:29:48.106Z         info: BlobGCManager:start() Starting BlobGCManager. Set status to Initializing.
2022-08-12T14:29:48.106Z         info: BlobGCManager:start() Trigger mark and sweep loop. Set status to Running.
2022-08-12T14:29:48.106Z         info: BlobGCManager:markSweepLoop() Start next mark and sweep.
2022-08-12T14:29:48.106Z         info: BlobGCManager:markSweep() Get all extents.
2022-08-12T14:29:48.106Z         info: BlobGCManager:start() BlobGCManager successfully started.
2022-08-12T14:29:48.108Z         info: BlobGCManager:markSweep() Got 0 extents.
2022-08-12T14:29:48.108Z         info: BlobGCManager:markSweep() Get referred extents.
2022-08-12T14:29:48.108Z         info: BlobGCManager:markSweep() Got referred extents, unreferenced extents count is 0.
2022-08-12T14:29:48.108Z         info: BlobGCManager:markSweepLoop() Mark and sweep finished, taken 2ms.
2022-08-12T14:29:48.108Z         info: BlobGCManager:markSweepLoop() Sleep for 600000ms.
2022-08-12T14:29:48.109Z         info: Azurite Blob service successfully listens on http://127.0.0.1:10000
2022-08-12T14:29:48.109Z         info: Azurite Queue service is starting on 127.0.0.1:10001
2022-08-12T14:29:48.110Z         info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2022-08-12T14:29:48.110Z         info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2022-08-12T14:29:48.115Z         info: QueueGCManager:start() Starting QueueGCManager, set status to Initializing
2022-08-12T14:29:48.115Z         info: QueueGCManager:start() Trigger mark and sweep loop, set status to Running.
2022-08-12T14:29:48.115Z         info: QueueGCManager:markSweepLoop() Start new mark and sweep.
2022-08-12T14:29:48.115Z         info: QueueGCManger:markSweep() Get all extents.
2022-08-12T14:29:48.115Z         info: QueueGCManager:start() QueueGCManager successfully started.
2022-08-12T14:29:48.116Z         info: QueueGCManager:marksweep() Get 0 extents.
2022-08-12T14:29:48.116Z         info: QueueGCManager:markSweep() Get referred extents, then remove from allExtents.
2022-08-12T14:29:48.116Z         info: QueueGCManager:markSweep() Got referred extents, unreferenced extents count is 0.
2022-08-12T14:29:48.116Z         info: QueueGCManager:markSweepLoop() Mark and sweep finished, take 1ms.
2022-08-12T14:29:48.116Z         info: QueueGCManager:markSweepLoop() Sleep for 60000
2022-08-12T14:29:48.116Z         info: Azurite Queue service successfully listens on http://127.0.0.1:10001
2022-08-12T14:29:48.116Z         info: Azurite Table service is starting on 127.0.0.1:10002
2022-08-12T14:29:48.116Z         info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2022-08-12T14:29:48.116Z         info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2022-08-12T14:29:48.119Z         info: Azurite Table service successfully listens on http://127.0.0.1:10002
2022-08-12T14:30:48.103Z         info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2022-08-12T14:30:48.103Z         info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2022-08-12T14:30:48.110Z         info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2022-08-12T14:30:48.110Z         info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2022-08-12T14:30:48.117Z         info: QueueGCManager:markSweepLoop() Start new mark and sweep.
2022-08-12T14:30:48.117Z         info: QueueGCManger:markSweep() Get all extents.
2022-08-12T14:30:48.118Z         info: QueueGCManager:marksweep() Get 0 extents.
2022-08-12T14:30:48.118Z         info: QueueGCManager:markSweep() Get referred extents, then remove from allExtents.
2022-08-12T14:30:48.118Z         info: QueueGCManager:markSweep() Got referred extents, unreferenced extents count is 0.
2022-08-12T14:30:48.118Z         info: QueueGCManager:markSweepLoop() Mark and sweep finished, take 1ms.
2022-08-12T14:30:48.118Z         info: QueueGCManager:markSweepLoop() Sleep for 60000
2022-08-12T14:30:48.118Z         info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2022-08-12T14:30:48.118Z         info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.

Have you found a mitigation/solution?

Nothing helped

LutherWest avatar Aug 12 '22 14:08 LutherWest