none
Windows Azure Web-Role Caching (Preview) “hangs” makes the emulator stuck in deploy loop

    Question

  • I'm trying to replace the Windows Azure AppFabric Cache with the newly released Role-based caching that was introduced in the June 2012 SDK release by following the guides on Microsoft's website.

    However, when checking the *"Enable Caching (Preview)"* in my Web Role, the emulator will not successfully instantiate the web site (emulator log: http://pastebin.com/dwbDvak2). It seems it is getting stuck in some kind of loop. Disabling the Web Role caching makes it work again. I have gotten the same result after uninstalling all previous Azure SDKs and re-installed the 1.7 version.

    Visual Studio is telling me that "Role instances are taking longer than expected to start. Do you want to continue waiting?" [Yes][No]. Pressing Yes keeps it waiting, and shows up over and over again.

    Are there anyone who might know how to solve the issue described above, or perhaps have tried the new web role caching functionality and got it working in the azure emulator?

    Below is a screen shot of Visual Studio when deploying to the azure emulator:
    http://s7.postimage.org/fh61tvpmj/Azure_Emulator_Stuck.jpg


    Thank you.
    Sunday, June 10, 2012 8:57 PM

Answers

  • Hi Andre,

    You may have the same issue as I've had. I couldn't get any reasonable understanding through the logs so I decompiled and profiled to see that it was GAC loading an AppFabric assembly. To load the type from config it goes off to the registry to find a Cache provider and seems to load a Windows Server AppFabric assembly from the cache instead of the local cache provider assembly.

    I'm not sure whether you have Windows Server AppFabric installed but this was my problem. I probably could have removed the Cache assembly but I have no need of AppFabric Server on my build so I just uninstalled it and the emulated cache worked fine.

    I've put a few notes on our blog post which may be helpful.

    http://blog.elastacloud.com/2012/06/09/using-the-windows-azure-cache-preview-with-sdk-1-7/

    Hope this works for you.

    Richard

    Tuesday, June 12, 2012 12:35 AM

All replies

  • I have updated the StackOverflow post with more details regarding the problem.

    In the EventViewer, there are 3 events related to what's happening. 2 errors and 1 information posts.

    Faulting application name: CacheInstaller.exe, version: 1.0.4655.0, time stamp: 0x4fb0f3f9
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
    Exception code: 0xe0434352
    Fault offset: 0x000000000000cacd
    Faulting process id: 0x17b4
    Faulting application start time: 0x01cd4750f5db0096
    Faulting application path: c:\users\anan\documents\visual studio 11\Projects\AzureCacheTest\AzureCacheTest\csx\Debug\roles\WebRole\plugins\Caching\CacheInstaller.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: 33a53608-b344-11e1-a8d6-402cf41c1e07

    And then:

    Application: CacheInstaller.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.MissingMethodException
    Stack:
       at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStoreIfRequired()
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ThreadHelper.ThreadStart()


    And:

    Faulting application name: CacheInstaller.exe, version: 1.0.4655.0, time stamp: 0x4fb0f3f9
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
    Exception code: 0xe0434352
    Fault offset: 0x000000000000cacd
    Faulting process id: 0x17b4
    Faulting application start time: 0x01cd4750f5db0096
    Faulting application path: c:\users\anan\documents\visual studio 11\Projects\AzureCacheTest\AzureCacheTest\csx\Debug\roles\WebRole\plugins\Caching\CacheInstaller.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: 33a53608-b344-11e1-a8d6-402cf41c1e07


    FYI: This is a Windows 7 x64 Enterprise edition, using Visual Studio 2012 RC.

    Sunday, June 10, 2012 9:53 PM
  • Do you mean as long as you check the CheckBox to enable cachine, this error occurs? This should not happen... It works fine on my machine. Are you creating a new project or upgrading an existing project? Try to create a new project.

    Also check the following logs:

    Attached files:
    C:\Users\anan\AppData\Local\Temp\WEREA8F.tmp.WERInternalMetadata.xml
     
    These files may be available here:
    C:\Users\anan\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_cacheinstaller.e_1fbc3b72afb6acf93335ca8611850d289906c25_2ddaf529


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Monday, June 11, 2012 3:49 AM
  • I also tried to create a completely new solution, and it was the same. Unfortunately those files are not to be found. I tried looking for them when I noticed the logs in the event viewer.
    Monday, June 11, 2012 7:46 AM
  • I am having the exact same problem. I have tried with an existing solution that I upgraded and also with a new solution. I would love to get an answer to this problem so if there is anything more I can provide, please let me know.

    GregP

    Monday, June 11, 2012 4:01 PM
  • Hi Greg,

    Let's see if we have any (un)similarities with our Windows setup etc.

    Hardware:

    HP EliteBook 8760w
    Intel Core i7 2.0 Ghz
    8 GB RAM

    - Windows 7 x64 Enterprise Edition, attached to a domain/AD.
    - Microsoft Forefront Client Security
    - Cisco VPN Client

    I've tried with both hardware virtualization on and off (not sure how they're doing the emulation, so I figured I'd try both). UAC turned off.

    I have tried with both VS 2010 Premium and VS 2012 RC Ultimate.

    I have tried with both v1.6 and v1.7 installed at the same time, and also tried to uninstall every azure SDK related, and then re-installed v1.7.

    What I haven't done, and frankly don't think would help is re-installed Visual Studio 2010/2012.

    Many thanks,
    Andre Andersen


    Monday, June 11, 2012 4:33 PM
  • Arwind,

    Can you please zip/send the project that you got working, and I can see if your project is working correctly?


    Monday, June 11, 2012 5:14 PM
  • Update:

    I spun up a virtual Windows 2012 RC server, and installed VS2012 with Azure SDK v1.7, created a new cloud project and used the same steps as before - and it works as a charm.

    So that leaves me wondering - is there something wrong with my operating system?

    Monday, June 11, 2012 5:37 PM
  • I am running Windows 7 Ultimate x64, but that is about the only similarity.

    • 6GB RAM
    • Dell Precision T3500
    • Intel Xeon 3.2GHz processor

    I am running VS 2010 Premium SP1


    GregP

    Monday, June 11, 2012 6:05 PM
  • Every time I attempt to start the role I get a pair of entries in the application log:

    Application: CacheInstaller.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.MissingMethodException
    Stack:
       at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStoreIfRequired()
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ThreadHelper.ThreadStart()

    And

    Faulting application name: CacheInstaller.exe, version: 1.0.4655.0, time stamp: 0x4fb0f3f9
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
    Exception code: 0xe0434352
    Fault offset: 0x000000000000cacd
    Faulting process id: 0x2500
    Faulting application start time: 0x01cd48039fb98964
    Faulting application path: D:\Dev\Test\NewCachingTest\NewCachingTest\csx\Debug\roles\CacheTestRole\plugins\Caching\CacheInstaller.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: de8bb824-b3f6-11e1-9ff1-bc305bec26f8


    GregP

    Monday, June 11, 2012 7:02 PM
  • Just for fun I ran CacheInstaller.exe from the location where the role is trying to run it from to see what would happen. I didn't expect it to work, but I was hoping to get some more information. Here is the message I got:


    GregP

    Monday, June 11, 2012 7:22 PM
  • Hi Greg,

    Can you pleae verify a couple of things on the machine -

    1. Do you have any 1.6 components left on your machine? Do you have the Client libraries from 1.6 on the machine?

    2. Did you install any Caching specific nuget package on the solution?

    3. Can you please verify the versions of Microsoft.ApplicationServer.Caching.AzureCommon.dll, Microsoft.ApplicationServer.Caching.Core.dll  present under C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-06\ref\CachingPreview ?

    Thanks,

    Gaurav

    Monday, June 11, 2012 8:42 PM
  • I also tried on another computer, but had no luck. Same problem.

    GregP

    Monday, June 11, 2012 8:42 PM
  • Guarav,

    Here is the version information on the DLL on my Windows 7 instance and Windows 2012 instance (It's working on Win 2012 - you have more details in previous posts). Seems to be the exactly same version... 

    

    Monday, June 11, 2012 8:49 PM
  • 1. I do have 1.6 components on this machine. I did not uninstall 1.6 prior to upgrading to 1.7. The docs said the two could reside side by side. I have no intention of removing 1.6 until I can trust 1.7 and 1.7 is not off to a good start in my eyes.

    2. According to this article, https://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/ I did install a caching specific nuget package titled 'Windows Azure Caching Preview'. I also did try to set up a similar project on a different computer but had no luck. I ran into the same problem, but on that machine I did not install any nuget package.

    3. The dlls you referenced both have version number 1.0.4655.0


    GregP

    Monday, June 11, 2012 8:56 PM
  • I just made an Azure/MVC Project that I got working on my virtual Windows 2012 - with the web role caching enabled of course. Still not working on Windows 7 though - just to demonstrate that it's actually working at one place, but not where I want it to... ARGH!!

    Code can be downloaded from http://db.tt/ouziHqkB or http://sdrv.ms/LiJtxq

    - Andre Andersen



    Monday, June 11, 2012 10:17 PM
  • Hi Andre,

    Can you find any logs on your dev 10 machine present under -

    C:\Users\<your_user_name>\AppData\Local\dftmp\Resources\<some-guid>\directory\Microsoft.WindowsAzure.Plugins.Caching.FileStore\ ?

    Any ETL logs in that location or any file called DedicatedCacheLogs_CacheInstaller_<xxxx>.txt

    You can try to get these by running the following simple steps to create project -

    1. Create a Cloud Service project with 1 ASP.NET web role

    2. Enable caching on the ASP.NET web role (by checking the check box)

    3. F5

    Thanks,

    Gaurav

    Monday, June 11, 2012 10:33 PM
  • Hi,

    The only file in this folder is "Dotnetupdate.cmd.log" which you can download here: http://db.tt/a00vBaBn

    Thanks,
    Andre Andersen

    Monday, June 11, 2012 10:41 PM
  • Guarav,

    Here is the entire "guid-folder": http://db.tt/pxdCuhHs

    Maybe that will help.

    Only thing left that I believe I can send you is my KERNELBASE.dll which is the faulting DLL-file. Let me know if that is of interest.
    Monday, June 11, 2012 10:48 PM
  • Hi Andre,

    You may have the same issue as I've had. I couldn't get any reasonable understanding through the logs so I decompiled and profiled to see that it was GAC loading an AppFabric assembly. To load the type from config it goes off to the registry to find a Cache provider and seems to load a Windows Server AppFabric assembly from the cache instead of the local cache provider assembly.

    I'm not sure whether you have Windows Server AppFabric installed but this was my problem. I probably could have removed the Cache assembly but I have no need of AppFabric Server on my build so I just uninstalled it and the emulated cache worked fine.

    I've put a few notes on our blog post which may be helpful.

    http://blog.elastacloud.com/2012/06/09/using-the-windows-azure-cache-preview-with-sdk-1-7/

    Hope this works for you.

    Richard

    Tuesday, June 12, 2012 12:35 AM
  • That actually explains a lot. I have Windows Server AppFabric installed on both machines I tried it on today and they both failed with what looks like a dll mismatch error (the fact that it loaded an assembly but couldn't find a function that it was looking for). It has always seemed odd to me that the AppFabric dlls and the Azure dlls have the same names.

    I just tried to run the new caching on my personal laptop, which has never had Windows Server AppFabric installed and it seemed to work perfectly.

    I'll be interested to give this a try when I get back to work tomorrow.


    GregP

    Tuesday, June 12, 2012 12:47 AM
  • Thank you, thank you, thank you!
    Tuesday, June 12, 2012 7:52 AM
  • elastacloud - That was the trick, thank you very much!

    GregP

    Tuesday, June 12, 2012 12:29 PM
  • I'm having the same problem, with the same errors showing up in the Event Logger.

    However I'm at a loss how to correct this.  I don't see AppFabric Server installed on my machine and I don't know what to deinstall from the GAC - I can't see anything with a name related to AppFabric or Azure caching.

    Can anyone offer advice on this?  It's been stalling me for weeks now.

    Thanks,

       John.

    • Proposed as answer by _mmjj_jjyy Wednesday, December 19, 2012 9:45 AM
    Thursday, December 13, 2012 1:28 AM
  • I put this on the stack overflow answer, but I'll copy here in case it helps someone reading this: 

    For me, the problem was that I was running my project off of a UNC Share (actually its running in a VM on my macbook).  When I'd start the debugger after checking the "Enable Caching" box on the worker role, it would just hang. Come to find out, about every 2 seconds it was creating a 160MB dump file in C:\Windows\System32\%LOCALAPPDATA%\CrashDumps. After debugging one of those, I could see the first error was when it tried to start cmd.exe on the caching stuff in my worker role and it said CMD cannot be run on a network share, so it would default to windows/system32 or something.

    That's when I found this handy dandy 7 year old MS KB article: http://support.microsoft.com/kb/156276 When I added `DisableUNCCheck REG_DWORD` and set the value to `0 x 1 (Hex)` under the registry path `HKEY_CURRENT_USER\Software\Microsoft\Command Processor` everything started up just like a champ. Hopefully this helps someone else.

    Monday, September 23, 2013 8:05 PM