2011-09-07 65 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文件

相關問題