locked
Azure storage emulator stopped working RRS feed

  • Question

  • Hi All,

    Out of the blue, the windows storage emulator stopped working. The same issue happened before on a different machine a couple of months ago which resulted in the need to reinstall my windows. This time the exact same issue happened with the exact same error messages on a new laptop (freshly bought and a clean windows 8.1 installation for a couple of weeks).

    Tracking back the event log, the only thing that could hint at causing the issue was the installation of Visio 2013SP1 yesterday. After which i didn't run the storage emulator since. (Before installing visio, i've used the storage emulator actively).

    A couple of hours ago when starting the storage emulator (v3.3.0.0) again, i got the following error: 

    Application: WAStorageEmulator.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.OverflowException
    Stack: at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)

    Not sure why this happened and not really caring I assumed that the storage emulator database was in a corrupted state so i decided to delete the sqllocaldb instance and its local files in "...\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0" as well as the "C:\Users\xxx\WAStorageEmulatorDb33*" in combination with the necessary commands from a console window under admin rights.

    c:\temp\was\root>SqlLocalDb stop v11.0
    LocalDB instance "v11.0" stopped.
    
    c:\temp\was\root>SqlLocalDb delete v11.0
    LocalDB instance "v11.0" deleted.
    
    c:\temp\was\root>SqlLocalDb create v11.0
    LocalDB instance "v11.0" created with version 11.0.
    
    c:\temp\was\root>SqlLocalDb start v11.0
    LocalDB instance "v11.0" started.

    (In hindsight this was a mistake because now i dont have access to the sqllocaldb log files anymore)

    Following this i try to initialize the storage emulator database however that now yields an error, like:

    c:\temp\was\root>WAStorageEmulator.exe init -forcecreate
    Windows Azure Storage Emulator 3.3.0.0 command line tool
    Error: Cannot create database.

    Interrestingly enough, when trying to run it inprocess i get a different output:

    c:\temp\was\root>WAStorageEmulator.exe init -inprocess
    Windows Azure Storage Emulator 3.3.0.0 command line tool
    Added reservation for http://127.0.0.1:10000/ in user account XXX\Xxx.
    Added reservation for http://127.0.0.1:10001/ in user account XXX\Xxx.
    Added reservation for http://127.0.0.1:10002/ in user account XXX\Xxx.
    
    Found SQL Instance (localdb)\v11.0.
    Creating database WAStorageEmulatorDb33 on SQL instance '(localdb)\v11.0'.
    Cannot create database 'WAStorageEmulatorDb33' : Arithmetic operation resulted i
    n an overflow..
    One or more initialization actions have failed. Resolve these errors before atte
    mpting to run the storage emulator again.
    Error: Cannot create database 'WAStorageEmulatorDb33' : Arithmetic operation res
    ulted in an overflow..

    Now looking in the LocalDb's error.log i see the following error:

    2014-08-28 00:45:02.74 Logon       Error: 18456, Severity: 14, State: 38.
    2014-08-28 00:45:02.74 Logon       Login failed for user 'XXX\Xxx'. Reason: Failed to open the explicitly specified database 'WAStorageEmulatorDb33'. [CLIENT: <named pipe>]

    In response i downloaded sql management studio 2014, logged in to the localdb v11.0 instance (which seems to be running just fine), ensure that XXX\Xxx had all possible rights without any luck. Furthermore i tried to manually create the database from SMS2014 which seems to do something however starting the storage emulator again yields an OverflowException on open (possibly because the table structure is not there?) (Also WAStorageEmulator.exe init -forcecreate ends up in a login failed error again). Looking at the profiler trace file while trying to init- I only get 1 log entry which is the Audit login failed.

    Finally, other things I've tried are trying to use a v12.0 localdb instance and (after downloading and installing after the facts) trying SQLEXPRESS. Neither worked and both came with the same generic error. Finally i also tried to reinstall the storage emulator without any changes either.

    Right now i'm testing on a live storage account which is far from ideal since half the time i wont have internet. So far i have lost days of productive work trying to get things together and reinstalling windows on my old machine. Any help would be very much appreciated. 

    Thanks!



    Wednesday, August 27, 2014 4:59 PM

Answers

  • hi Polity,

    Please try to renaming the local DB name "'WAStorageEmulatorDb33' " or delete it to see if that create a new one.

    Also, after rename it or delete it, you could try to reinstall the Azure storage emulator. Please try it.

    Any results, please let me know.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 2, 2014 1:34 AM

All replies

  • hi Polity,

    Thanks for your posting!

    I am looking into this issue and come back to you as soon as possible. There might be some time delay. Appreciate your patience.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 28, 2014 7:39 AM
  • Dear Will,

    any update?

    Sunday, August 31, 2014 8:36 AM
  • hi Polity,

    Please try to renaming the local DB name "'WAStorageEmulatorDb33' " or delete it to see if that create a new one.

    Also, after rename it or delete it, you could try to reinstall the Azure storage emulator. Please try it.

    Any results, please let me know.

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 2, 2014 1:34 AM
  • hi Polity

    I will mark this this thread as answer,if you find it no help,please fell free to unmark.
    Thanks!
    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 5, 2014 5:14 AM
  • I have this exact same problem when trying to install Azure Storage Emulator 4.1. I have already deleted and recreated the database (localdb)\MSSQLLocalDB as well as removing any files such as C:\Users\{username}\AzureStorageEmulatorDb41.*. However, the same error log appears when I tries to install the emulator:

    09/25/2015 15:47:13,Logon,Unknown,Login failed for user 'HY-DELL-PC\nguye'. Reason: Failed to open the explicitly specified database 'AzureStorageEmulatorDb41'. [CLIENT: <named pipe>]
    09/25/2015 15:47:13,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 38.

    Friday, September 25, 2015 8:27 AM
  • Hi Nguyen,

    Can you try a couple of things to confirm:

    1. Reinstall the emulator with the following steps, if not already followed in the exact order:

    Delete the SQL instance:

         sqllocaldb stop MSSQLLocalDB

        sqllocaldb delete MSSQLLocalDB

     Delete the database files:

         %USERPROFILE%\AzureStorageEmulatorDb*.mdf

        %USERPROFILE%\AzureStorageEmulatorDb*.ldf

     Recreate the sql instance:

         sqllocaldb start MSSQLLocalDB

     Install emulator from the download link.

    2. If that fails, Install SQL Management Studio and try to connect to any database like Master to confirm you can connect to the instance successfully.

    3. Look at the AzureStorageEmulatorDb41 database and verify what database access has been specified for your user. Also, confirm under SQL logins that your user 'HY-DELL-PC\nguye' does have sysadmin server role  

    4. Send us the errorlog please if you are still seeing errors.

    --Dinesh

    Wednesday, September 30, 2015 5:49 PM