問題
實作 Appfabric Caching Cluster與發生Some or all identity references could not be translated./Could not set permissions on configuration store
解決方法
環境:
- 要實作Appfabric Caching Cluster以實現HA(高可用性)時,Appfabric主機必須加入Domain控管!
- 且作業系統必須為Windows Sever Enterprise以上
而因為需要5台機器來架構起整個測試環境,因此配置如下:
AD DC(Domain Controller):AppfabricDC
Appfabric Server:Appfabric1/Appfabric2
SQL Server::WINSVR2K8R2(Appfabric)
WebServer:WIN7DEV
DOMAIN NAME為:APPFABRIC.COM
安裝Appfabric Server如下:
1.下載Web Platform Installer.
2.第一次執行時會安裝程式捷徑,安裝完不會提示,但已存在
3.安裝程式畫面,選擇左下角的”Option”
4.將"Enterprise"選項勾起來,點"OK"
5.之後畫面如下,選擇Application Server下的”Customize”
6.勾選"Windows Server Appfabric",點"Install"
7.預設上有些必要的程式會已經幫你選好,所以你不需自己點選,點"I Accept"
8.預設要輸入SQL 2008 Express的權限(我這邊慣用sa權限,故輸入sa密碼),點”Contiune”
9.進入正式安裝,安裝之前會先下載程式,故網路必須暢通
10.因IIS 7.5有重要更新必須安裝,過程中會出現需要重開機2次
11.到此就完成安裝了
安裝完畢之後要做些設定,在設定之前記得要將機器加入domain
請參考:http://charlesbc.blogspot.com/2010/07/appfabric-appfabric.html
與http://charlesbc.blogspot.com/search/label/Windows%20Server%20AppFabric
完成基本設定!!
在執行過程中,我一直無法成功,出現錯誤下:
(1)when i setting provider to database WINSVR2K8R2 then show error like this:
System.Management.Automation.CmdletInvocationException: ErrorCode<UnspecifiedErrorCode>:SubStatus<ES0001>:Some or all identity references could not be translated. ---> Microsoft.ApplicationServer.Caching.ConfigStoreException: ErrorCode<UnspecifiedErrorCode>:SubStatus<ES0001>:Some or all identity references could not be translated. ---> Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<UnspecifiedErrorCode>:SubStatus<ES0001>:Some or all identity references could not be translated. ---> System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
at System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess)
at System.Security.Principal.SecurityIdentifier.Translate(Type targetType)
at Microsoft.ApplicationServer.Caching.SecurityCommon.GetMachineAccount(String machine)
--- End of inner exception stack trace ---
at Microsoft.ApplicationServer.Caching.SecurityCommon.GetMachineAccount(String machine)
at Microsoft.ApplicationServer.Caching.SqlServerCustomProvider.GetUsername(String machine, String serviceAccountName, String sqlMachine)
at Microsoft.ApplicationServer.Caching.SqlServerCustomProvider.AddUser(String machine, String user)
--- End of inner exception stack trace ---
at Microsoft.ApplicationServer.Caching.SqlServerCustomProvider.AddUser(String machine, String user)
at Microsoft.ApplicationServer.Caching.Configuration.Commands.RegisterCacheHostCommand.SetCustomProviderPermissions(String provider, String connStr, String account, String serviceHost)
at Microsoft.ApplicationServer.Caching.Configuration.Commands.RegisterCacheHostCommand.BeginProcessing()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.Runspaces.Pipeline.Invoke()
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke()
at Microsoft.ApplicationServer.Configuration.DistributedCacheProxy.RegisterCacheHost(DistributedCacheSettings settings)
at Microsoft.ApplicationServer.Configuration.DistributedCacheNodePage.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)
(2)so i change providerto XML,but still ahow error like this:
System.Management.Automation.CmdletInvocationException: ErrorCode<PermissionsError>:SubStatus<ES0001>:Could not set permissions on configuration store : ErrorCode<UnspecifiedErrorCode>:SubStatus<ES0001>:Some or all identity references could not be translated.. Refer to the product documentation for manually configuring the store permissions. ---> Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<PermissionsError>:SubStatus<ES0001>:Could not set permissions on configuration store : ErrorCode<UnspecifiedErrorCode>:SubStatus<ES0001>:Some or all identity references could not be translated.. Refer to the product documentation for manually configuring the store permissions. ---> Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<UnspecifiedErrorCode>:SubStatus<ES0001>:Some or all identity references could not be translated. ---> System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
at System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess)
at System.Security.Principal.SecurityIdentifier.Translate(Type targetType)
at Microsoft.ApplicationServer.Caching.SecurityCommon.GetMachineAccount(String machine)
--- End of inner exception stack trace ---
at Microsoft.ApplicationServer.Caching.SecurityCommon.GetMachineAccount(String machine)
at Microsoft.ApplicationServer.Caching.Configuration.ConfigurationBase.GetIdRefsForUser(String user, String nwServerName, String serviceHost)
at Microsoft.ApplicationServer.Caching.Configuration.Commands.RegisterCacheHostCommand.SetNetworkSharePermissions(String velocityConfigPath, String account, String serviceHost)
at Microsoft.ApplicationServer.Caching.Configuration.Commands.RegisterCacheHostCommand.BeginProcessing()
--- End of inner exception stack trace ---
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.Runspaces.Pipeline.Invoke()
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke()
at Microsoft.ApplicationServer.Configuration.DistributedCacheProxy.RegisterCacheHost(DistributedCacheSettings settings)
at Microsoft.ApplicationServer.Configuration.DistributedCacheNodePage.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)
對此一直感到不解,因為這2種設定Caching錯誤中,一個是取不到MachineAcount,一個是取不到權限??????
因設定Appfabric Caching是透過NetworkService Account的權限去執行,所以查詢msdn了解這個帳戶的說明:http://msdn.microsoft.com/zh-tw/library/system.serviceprocess.serviceaccount.aspx
如此一來,心裡就有個底了=>一定跟網域管理有關,因此請教了文章的前輩http://charlesbc.blogspot.com/2010/09/appfabric-cache-cluster.html
接著嘗試著使用sysprep去重新取得新的machine SID,結果問題就解決了
沒有留言:
張貼留言