Azure Storage Emulator – TimeoutException

The Azure Storage Emulator continues to have random issues for me. The latest one, is that for some reason when I went to run the emulator I get the error:

Unhandled Exception: System.TimeoutException: Unable to open wait handle.
   at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessController.InternalWaitForStorageEmulator(Int32 timeoutInMilliseconds)
   at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessController.EnsureRunning(Int32 timeoutInMilliseconds)
   at Microsoft.WindowsAzure.Storage.Emulator.Commands.StartCommand.RunCommand()
   at Microsoft.WindowsAzure.Storage.Emulator.Program.Main(String[] args)

I ran thru a bunch of my standard tricks to try to get it to function again, but in the end, here is what the ultimate solution was:

  • Run the command:  AzureStorageEmulator.exe start -inprocess
  • This will startup the Storage Emulator and run it in your active window.  Just hit CTRL-C and cancel it.   The emulator will stopped once you do this.
  • Then run the emulator as normal: AzureStorageEmulator.exe start
I can’t figure out how or why it got into this bizarre state, and why running the emulator in process seemed to fix it, but at least its working now.