1
votes

Whyle starting cloud application (Azure storage emulator v 2.3) I got error:

Failed to initialize Windows Azure storage emulator

I have used this to configure sql express for this purpose and I was able to create database - WAStorageEmulatorDb32. But still got above error. Any idea? Thanks.

Edit

Here is what I get when started storage emulator with -inprocess option:

enter image description here

2
I have had this issue in the past and found clearing down old versions of tools and reinstalling 2.3 did the trick. I should also note I have never configured this, it has just worked out of the box.Steve Newton

2 Answers

5
votes

I encountered similar issues when updating to v2.5. I tried everything outlined in the various blogs and technet forums with no luck but it seems like the advice given was correct, just slightly different for my case.

  • Uninstall all previous version of azure sdks
    • Optional and probably not related to fixing my issue. I uninstalled all azure sdks, authoring tools, azure tools for VS, azure libraries for .Net, storage emulators and compute emulators.
  • Delete WAStorageEmulatorDb files
    • Next up was to clean up any previous WAStorageEmulator database files. For most users these appear to be kept in c:\users\{user}\WAStorageEmulatorDb*.*.
      • sqllocaldb stop v11.0
      • sqllocaldb delete v11.0
      • manually delete c:\users\{user}\WAStorageEmulatorDb*.*
      • sqllocaldb create v11.0
  • At this point reinstalling Azure SDK 2.5 via Web Platform Installer failed to install with the following error.
    • CAQuietExec: Windows Azure Storage Emulator 3.0.0.0 command line tool CAQuietExec: Error: Cannot create database. CAQuietExec: Error 0xfffffff3: Command line returned an error. CAQuietExec: Error 0xfffffff3: CAQuietExec Failed
  • This is where I noticed my environment was different. Running sqllocaldb info I noticed I had 4 instances, V11.0, two instances which hosted personal databases and a 4th one called MSSQLLocalDB. If you open (localdb)\MSSQLLocalDB in Visual Studio - SQL Server Object Explorer you should should see WAStorageEmulatorDb. The problem for me was that my WAStorageEmulatorDb wasn't being stored in v11.0 as it was for other people, so deleting v11.0 didn't help.
  • Delete WAStorageEmulatorDb files again. So now that I knew where my WAStorageEmulatorDb was, I re-ran the following
    • sqllocaldb stop MSSQLLocalDB
    • sqllocaldb delete MSSQLLocalDB
    • sqllocaldb create MSSQLLocalDB
  • Re-install Azure SDK 2.5 via Web Platform Installer completed successfully.
  • Lastly, running c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe init followed by c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\WAStorageEmulator.exe start started successfully.
    • To verify you should also have new c:\users\{user}\WAStorageEmulatorDb34.* files.

I hope this helps someone who comes across this in the future.

0
votes

I had a similar problem.

Refer Azure storage emulator failed to initialize for the solution.

It solved my problem.

I hope this helps you.