2016-09-07 76 views
2

我有一個運行單個應用程序的5節點服務架構羣集。我的應用程序設置使用自簽名證書加密。這個證書上傳到keyvault,並且我已經將這個URL提供給我的應用程序。我可以看到證書正在安裝在我的虛擬機上,運行Invoke-ServiceFabricDecryptText也會返回正確的解密值。然而,看着我的管理控制檯時,我看到這個錯誤:服務Fabric羣集節點無法從證書獲取私鑰

Error event: SourceId='System.Hosting', Property='Activation:1.0'. 
There was an error during activation.Failed to ACL folders or certificates required by application. Error:0x80090014 

展望節點日誌,我看到這些條目上述錯誤對應:

2016-9-7 20:09:44.541,Informational,2148,2580,Common.CryptoUtility,GetCertificate(LocalMachine, MY, FindByThumbprint:) 
2016-9-7 20:09:44.541,Informational,2148,2580,Common.CryptoUtility,GetCertificate: match found: thumbprint = [thumbprint], expiration = 2017-09-02 16:08:04.000 
2016-9-7 20:09:44.541,Error,2148,2580,Common.CryptoUtility,CryptAcquireCertificatePrivateKey failed. Error:0x80090014 
2016-9-7 20:09:44.541,Error,2148,2580,Common.SecurityUtility,Failed to get the Certificate's private key. [thumbprint]. Error: 0x80090014 
2016-9-7 20:09:44.541,Warning,2148,2580,Hosting.ProcessActivationManager,ACLing private key filename for thumbprint [thumbprint]. ErrorCode=0x80090014 

我在一個失利。

回答

2

最終成爲一個不好的證書。我最初上傳到Keyvault的那個是現有的使用New-SelfSignedCertificate的證書。然後,我通過使用帶有-CreateSelfSignedCertificate開關的Invoke-AddCertToKeyVault命令隨時將其添加到Key Vault,並且它工作正常。

0

這通常意味着羣集證書當前未創建。由於其私鑰不可檢索。

如果您使用ServiceFabricRPHelpers.psm1(帶有-CreateSelfSignedCertificate的Invoke-AddCertToKeyVault)創建自簽名證書 - 您應該知道它會創建此類無效證書,除非安裝了PSPKI版本3.2.5。即使您使用PSPKI版本3.2.6(或未安裝PSPKI),由於ServiceFabricRPHelpers.psm1中的錯誤,它也會創建無效的證書。 我固定這裏的問題(但它尚未合併) https://github.com/ChackDan/Service-Fabric/pull/31

作爲一種變通方法, 1.安裝從https://pspki.codeplex.com/releases/view/625365 2.最新PSPKI運行調用-AddCertToKeyVault之前,這裏應用修復https://github.com/ChackDan/Service-Fabric/pull/31到ServiceFabricRPHelpers.psm1

修復程序合併後,我將更新此線程...

相關問題