获取访问被拒绝尝试从powershell启动appfabric缓存集群

Wil*_*iam 6 powershell appfabric

我有一些使用appfabric的代码,并且正在获得服务器不可用错误.按照http://msdn.microsoft.com/en-us/library/ff921031.aspx上的说明,我发现我的缓存群集已关闭.我以管理员身份打开了PowerShell并运行了Start-CacheCluster.几分钟后,我收到一条错误消息:

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
Run Code Online (Sandbox Code Playgroud)

检查事件日志会显示:

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...
Run Code Online (Sandbox Code Playgroud)

有没有更多AppFabric经验的人见过这个?

-谢谢

Dav*_*uda 9

尝试Microsoft,Windows,Application Server-System ServicesAdmin日志.有时,此日志会为您提供常规事件日志中不存在的更多信息.有关缓存集群监视的详细信息请参见健康监测工具.

关于你的问题.我唯一想到的是,在启动缓存集群后,它会加载配置,因为它失败,最终会导致AppFabric缓存服务崩溃(您将在上面提到的事件日志中看到该信息).

确保将AppFabric缓存服务配置为在可以访问配置文件DistributedCacheService.exe.config以及配置存储库(Velocity配置DB或配置XML)的帐户下运行.

  • 将服务帐户权限授予位于\ Program Files\AppFabric 1.1 for Windows Server \下的DistributedCacheService.exe.config文件,这对我来说很有用.谢谢戴夫! (4认同)

hak*_*sor 5

您需要以管理员身份运行“缓存管理Windows PowerShell”。