Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Cannot connect to emulator in azure storage explorer when only running table service

Open smargoli2 opened this issue 1 year ago • 3 comments

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

Table

Which version of the Azurite was used?

Latest

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

npm, running with docker

What's the Node.js version?

What problem was encountered?

When I run docker run -p 10002:10002 mcr.microsoft.com/azure-storage/azurite azurite-table --tableHost 0.0.0.0 --tablePort 10002 in the vs code powershell cli, the output I see looks like this:

Azurite Table service is starting on 0.0.0.0:10002
Azurite Table service successfully started on 0.0.0.0:10002

Notice it does not say 'Azurite Table service listening on 0.0.0.0:10002'. When I try to view the emulator in Azure Storage Explorer, it says 'You are attempting to access an emulator storage account without a running emulator. Storage Explorer does not ship with an emulator, you must install your own. It is recommended that you use Azurite. Once you have installed an emulator you can start it and refresh this node.' image

Steps to reproduce the issue?

Do what I did. If possible, please provide the debug log using the -d parameter, replacing <pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:

-d "<pathtodebuglog>"

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.

Have you found a mitigation/solution?

Nope. I just run all the services together, but I really only need the table service.

smargoli2 avatar Jan 23 '24 17:01 smargoli2

Hi @smargoli2 ,

I can connect to Azurite with Storage Explorer, with following steps:

  1. start Azurite with only table service with command like: docker run -p 10002:10002 mcr.microsoft.com/azure-storage/azurite azurite-table --tableHost 0.0.0.0 --tablePort 10002

2.In storage explorer, add connection to Azurite's table service: image

  1. Clear blobs port and queue port to avoid to connect to blob or queue service which is not started in Azurite: image

Can you have a try with the above steps and share results to us?

EmmaZhu avatar Jan 24 '24 02:01 EmmaZhu

Okay, I can successfully follow those steps. But how do I map the location to a different folder? I tried this docker run -p 10002:10002 -v "$PWD/src/support/azurite:/data" mcr.microsoft.com/azure-storage/azurite azurite-table --tableHost 0.0.0.0 --tablePort 10002 and it does not show the data that is in the files in the storage explorer.

smargoli2 avatar Jan 24 '24 12:01 smargoli2

@smargoli2 , For this issue, I may need to take some time to investigate.

The location mapping works well when starting all three services, but doesn't work when only starting table service.

Will get back to you with any progress.

EmmaZhu avatar Jan 25 '24 03:01 EmmaZhu