Azure: CacheInstaller and ConfigStoreException

I am trying to use a shared cache. And during the launch of the cloud emulator, I get the following exception:

Application: CacheInstaller.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Microsoft.ApplicationServer.Caching.ConfigStoreException Stack: at Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility.RetryExponentialTask(System.Func`1<Boolean>, System.Predicate`1<System.Exception>, System.TimeSpan, System.TimeSpan, System.TimeSpan, Int32) at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStore(Microsoft.ApplicationServer.Caching.ICustomProvider) 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() 

My configuration:

  <dataCacheClients> <tracing sinkType="DiagnosticSink" traceLevel="Error" /> <dataCacheClient name="default"> <autoDiscover isEnabled="true" identifier="Web" /> </dataCacheClient> </dataCacheClients> 

Can someone help me? :)

Edited

I am using VS 2010 SP1, Windows 7. I removed the SDK 1.6 and reinstalled 1.7.

Cloud configuration (web role):

 <ServiceConfiguration serviceName="Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" schemaVersion="2012-05.1.7"> <Role name="Web"> <Instances count="1" /> <ConfigurationSettings> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="..." /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="..." /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="..." /> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="..." /> <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=...;AccountKey=..." /> <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=...;AccountKey=..." /> <Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{&quot;caches&quot;:[{&quot;name&quot;:&quot;default&quot;,&quot;policy&quot;:{&quot;eviction&quot;:{&quot;type&quot;:0},&quot;expiration&quot;:{&quot;defaultTTL&quot;:10,&quot;isExpirable&quot;:true,&quot;type&quot;:1},&quot;serverNotification&quot;:{&quot;isEnabled&quot;:false}},&quot;secondaries&quot;:0}]}" /> <Setting name="Microsoft.WindowsAzure.Plugins.Caching.Loglevel" value="" /> <Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" /> <Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="UseDevelopmentStorage=true" /> </ConfigurationSettings> <Certificates> <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="..." thumbprintAlgorithm="sha1" /> </Certificates> </Role> </ServiceConfiguration> 

Edited 2 :

I tried to create an empty test project:

  • Windows Azure Cloud Service Project Created
  • Selected ASP.NET Web Role
  • Enabled cache on web role property caching tab (co-located)
  • Installed Windows Azure Caching Preview
  • Cloud Initial Project with NuGet
  • Same exception

Edited 3 :

I installed VS 2012 RC and tried to create a test project. The same problem arose.

Edited 4 :

Exception Details:

 Microsoft.ApplicationServer.Caching.ConfigStoreException: Windows Azure Storage Service is not ready/available. StorageAccountName = DevStorage, BlobNamePrefix = deployment17(44)__Web ---> Microsoft.WindowsAzure.StorageClient.StorageClientException: ERROR ---> System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebRequest req, IAsyncResult asyncResult, EventHandler`1 handler, Object sender) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() at Microsoft.WindowsAzure.StorageClient.CommonUtils.<LazyEnumerateSegmented>d__0`1.MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at Microsoft.ApplicationServer.Caching.WindowsAzureBlobProvider.IsInitialized() --- End of inner exception stack trace --- at Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility.RetryExponentialTask(Func`1 doTask, Predicate`1 shouldRethrow, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff, Int32 retryCount) at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStore(ICustomProvider customProvider) at Microsoft.ApplicationServer.Caching.AzureCommon.Package.InitializeExternalStoreIfRequired() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 
+6
source share
1 answer

It seems to me that there was a problem when it tries to initialize the backup storage for the cache. You get 400 Bad Request from your Blob storage provider. Without caching configured, from another test project can you access your BLOB repository in your dev repository? Does devstorage emulator work?

Verify that the storage emulator is running by looking at the / systray notification area and right-clicking on the small Azure emulator icon. If one of the content menus is “Run Storage Emulator”, the storage service is not running, click on it. If he thinks he is running, click on "Show Storage Emulator" and make sure that Blob and other services are checked and have a startup status. If this is the case, try reading / writing to the blob development repository using another test application or a third-party tool such as Cerebrata Cloud Storage Studio.

The caching system is trying to create a folder in the BLOB repository called cacheclusterconfigs, where each member of the cluster can come to the configuration. For any reason, you do not have access to the BLOB repository to do this.

To answer your other question, yes, CacheInstaller makes a log. When you start your instance, even before it reaches the goal, you can look at the calculation emulator and select the instance. Then right-click the instance and select "open local store." This will open an explorer window where the emulator places files for each instance. It will be something like C: \ Users {user} \ AppData \ Local \ dftmp \ Resources \ 8d403f60-3b09-481a-8b9c-86ab9e06954b. GUID is an instance. From this window, go to the following directory: \ directory \ Microsoft.WindowsAzure.Plugins.Caching.FileStore. Here you will see the log files from the caching service. If your installation is complete, you should see a file in this directory, for example, DedicatedCacheLogs_CacheInstaller_xxxx.log (xxxx are numbers). This can help you. Note that after the cache installation is complete, there seems to be a service that sweeps this directory and places old files in the LogsBackup X directory, which is also located in this folder.

Please note that the file cacheinstaller.exe.config and the associated executable file are actually copied to the package, and then to the copy for the emulator from C: \ Program Files \ Microsoft SDKs \ Windows Azure.NET SDK \ 2012-06 \ bin \ plugins \ Caching directory. You may be able to add another tracelistener to exe.config from this SDK directory and get it to spit out additional information if you cannot find what you need from the instance directory above.

Hope these tips help you. I could not recreate the problem at my end if I did not give it a bad account address for the account in Azure, and even then it was not a 100% match for your error.

+2
source

Source: https://habr.com/ru/post/918165/


All Articles