2011-09-07 62 views
5

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

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 

检查事件日志揭示了这一点:

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... 

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

-Thanks

回答

7

尝试MicrosoftWindowsApplication Server-System ServicesAdmin日志。有时候这个日志会给你一些更多的信息,这些信息并不存在于常规的事件日志中。有关缓存集群监视的更多信息,请参阅Health Monitoring Tools

关于你的问题。我只想说,启动缓存集群后,它会加载配置,因为它失败了,它最终会崩溃AppFabric缓存服务(您会在上面提到的事件日志中看到这些信息)。

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

+3

授予服务帐户权限位于\ Program Files文件\的AppFabric 1.1的Windows Server \的DistributedCacheService.exe.config文件做我的诡计。谢谢戴夫! –

4

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

+0

它的工作原理,谢谢 –

2

你是否检查AppFabricCachingService登录已读DistributedCacheService.exe.config访问?

就我而言,我使用的是XML提供程序,并具有名为“CacheConfig”的配置共享。我的服务器未加入域,因此我为缓存主机配置了本地“AppFabric”用户。我使用的PowerShell脚本的配置:

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 
#... 

当我跑了Start-CacheCluster语句失败与同一接入剧本被拒绝错误在你的问题。然后我检查了AppFabricCachingService登录并发现它被设置为NETWORK SERVICE。当我在C:\ Windows \ System32 \ AppFabric \ DistributedCacheService.exe.config上检查了文件权限时,发现对AppFabric用户有读取权限,但对NETWORK SERVICE没有权限。这表明Register-CacheHostAdd-CacheHost applet假定缓存主机帐户和服务帐户将是相同的。

在我的情况下,我为网络服务添加了文件的读取权限,并解决了该问题。

0

我也碰到了这个问题,因为我的AppFabric的服务器遭受了未知的东西。我花了很多时间寻找解决方案。最后,我尝试成功的唯一方法是卸载/重新安装AppFabric。并再次配置设置。希望这可以帮助 !

0

我有同样的问题,因为我安装AppFabric的缓存服务,而不是一个倍以上。每个时代主机标识改为它必须是相同的主机标识与ClusterConfig.xml和DistributedCacheService.exe.config文件

相关问题