Access denied attempt to start appfabric cache cluster from powershell

I have code that uses appfabric and gets server unavailability errors. Following the instructions at http://msdn.microsoft.com/en-us/library/ff921031.aspx , I found that the cache cluster is not working. I opened the dispatch service as an administrator and launched Start-CacheCluster. After a few minutes, I get an error message:

Start-CacheCluster : Could not start cluster: ErrorCode<ERRCAdmin025>:SubStatus
<ES0001>:Time-out occurred in starting the cluster.
At line:1 char:19
+ Start-CacheCluster <<<<
    + CategoryInfo          : NotSpecified: (:) [Start-CacheCluster], DataCach
   eException
    + FullyQualifiedErrorId : ERRCAdmin025,Microsoft.ApplicationServer.Caching
   .Commands.StartCacheClusterCommand

Checking the event logs shows this:

Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.ApplicationServer.Caching.ConfigManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Fabric.Common.ConsoleSink' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied. (C:\Windows\System32\AppFabric\DistributedCacheService.exe.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBU...

Has anyone with more experience with AppFabric seen this before?

-Thank

+5
source share
6 answers

Microsoft, Windows, Application Server-System Services Admin log. , . . .

. , , , , , AppFabric ( , ).

, AppFabric Caching Service , DistributedCacheService.exe.config, (DB XML).

+7

" Windows PowerShell" .

+4

, AppFabricCachingService DistributedCacheService.exe.config?

XML "CacheConfig". , "AppFabric" . PowerShell script config:

Register-CacheHost -Provider XML -ConnectionString "\\MY-HOST\CacheConfig" -Account "AppFabric" -CachePort 22233 -ClusterPort 22234  -ArbitrationPort 22235 -ReplicationPort 22236 -HostName MY-HOST
Add-CacheHost -Provider XML -ConnectionString "\\MY-HOST\CacheConfig" -Account "AppFabric"
#...
Start-CacheCluster
#...

script, Start-CacheCluster , . AppFabricCachingService , . C:\Windows\System32\AppFabric\DistributedCacheService.exe.config, , AppFabric , NETWORK SERVICE. , Register-CacheHost Add-CacheHost , .

NETWORK SERVICE .

+2

, AppFabric - . , . , , , - / AppFabric. . , !

0

I had the same problem because I installed the application caching service more than once. Each time hostId has been changed, it must be the same hostId with ClusterConfig.xml and the DistributedCacheService.exe.config file

0
source

All Articles