Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

windows azure development storage blob service not starting

When I start development storage emulator, I get an error

The process cannot access the file because it is being used by another process

I guess this is happening only for BLOB, other services i.e. Queue and Tables start successfully

What could be the problem? I am using Azure SDK v1.4

Development Storage Emulator start error

like image 386
ajay_whiz Avatar asked Jun 20 '11 17:06

ajay_whiz


People also ask

How do I access Azure Blob storage on Windows?

If you are trying to access the blob you need to specify the container name and the blob name. Suppose, you have a blob by name "MyBlob" present in "mycontainer",you can retrieve it by specifying http://my_storageAcount.blob.core.windows.net/mycontainer/MyBlob.

What is azurite emulator?

The Azurite open-source emulator provides a free local environment for testing your Azure blob, queue storage, and table storage applications. When you're satisfied with how your application is working locally, switch to using an Azure Storage account in the cloud.


2 Answers

Stop BitTorrent. In my experience, this error is usually a port conflict, and BitTorrent does typically grab port 10000. If it's not BitTorrent, look for other apps that might be holding on to port 10000. Netstat can probably help.

like image 114
user94559 Avatar answered Sep 24 '22 07:09

user94559


This might be another process using the port that Azure dev storage is using.

To figure out which app is that, run netstat first:

netstat -p tcp -ano | findstr :10000

You will get a process id (PID) in the last column:

  TCP    0.0.0.0:10000          0.0.0.0:0              LISTENING       2204

It means that process listening to this port is ID 2204. Then run taklist:

tasklist /fi "pid eq 2204"

So you will see something like this:

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
SMSvcHost.exe                 2204 Services                   0     29 300 K

So now you know that SMSvcHost.exe is listening on that port.

If you can't stop the process using the port, there's a way to remap the ports used by DevFabric. The solution is taken from this blog post:

You could do that by navigating to C:\Program Files\Windows Azure SDK\v1.4\bin\devstore (replace 1.4 with your SDK version) and opening DSService.exe.config. From there you could change the configuration and make your services listen to other ports.

For me in v1.6 the path was C:\Program Files\Windows Azure Emulator\emulator\devstore\DSService.exe.config

For SDK v2.5 / Storage v3.4 the path is %ProgramFiles(x86)%\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe.config

For Emulator v4+ the path is %ProgramFiles(x86)%\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe.config

But be careful, because you will not be able to use UseDevelopmentStorage=true in your connection string anymore (e.g. connect with Azure Storage Explorer).

  • DsInit doesn't help
  • Specifying the connection string this way https://stackoverflow.com/a/7037036/182371 doesn't help either.

In order to connect, use a custom connection string that is targeting the new endpoint ports you defined. You'll still want to connect using the standard, well-known storage emulator account name and key. An example connection string can be found here.

like image 30
Nikita R. Avatar answered Sep 20 '22 07:09

Nikita R.