%3CLINGO-SUB%20id%3D%22lingo-sub-2031756%22%20slang%3D%22en-US%22%3ETroubleshooting%20expired%20certificate%20Azure%20Service%20Fabric%20Standalone%20Cluster%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031756%22%20slang%3D%22en-US%22%3E%3CP%3ESometime%20either%20primary%20or%20secondary%20cluster%20certificates%20get%20expired%20before%20you%20can%20rotate%20with%20new%20certificate%20which%20can%20cause%20cluster%20to%20be%20inaccessible%20or%20unreachable%20then%20you%20can%20follow%20these%20steps%20to%20recover%20standalone%20Service%20Fabric%20cluster.%20If%20you%20looking%20to%20rotate%20a%20near%20expiry%20certificate%20refer%20to%20previous%20article%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fcertificate-rotation-azure-service-fabric-standalone-cluster%2Fba-p%2F2028360%22%20target%3D%22_blank%22%3ECertificate%20rotation%20Azure%20Service%20Fabric%20Standalone%20cluster%20-%20Microsoft%20Tech%20Community%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1942512522%22%20class%3D%22heading-anchor%22%20id%3D%22toc-hId-1943231325%22%20id%3D%22toc-hId-1943231413%22%3E%3CFONT%20size%3D%224%22%20color%3D%22%23333333%22%3EThis%20article%20assumes%20you%20are%20running%20cluster%20with%20thumbprint%20approach.%20In%20general%2C%20the%20common%20name%20approach%20is%20recommended%20for%20easy%20certificate%20management.%20More%20information%20about%20certificate%20on%20Standalone%20cluster%20refer%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-windows-cluster-x509-security%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESecure%20a%20cluster%20on%20Windows%20by%20using%20certificates%20-%20Azure%20Service%20Fabric%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ERecover%20Azure%20Service%20Fabric%20Standalone%20Cluster%20which%20is%20inaccessible%20or%20unreachable%20due%20to%20expired%20cluster%20certificates%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%20data-aria-posinset%3D%221%22%20data-aria-level%3D%222%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3ECreate%20or%20get%20the%20new%20certificate.%E2%80%AF%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-aria-posinset%3D%222%22%20data-aria-level%3D%222%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EDeploy%20the%20new%20cert%20to%20all%20nodes%20manually%20by%20following%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fpkiclient%2Fimport-pfxcertificate%3Fview%3Dwin10-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fpkiclient%2Fimport-pfxcertificate%3Fview%3Dwin10-ps%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EOr%20using%26nbsp%3B%3CA%20style%3D%22font-family%3A%20inherit%3B%20background-color%3A%20%23ffffff%3B%22%20href%3D%22onenote%3A%23Deploy%2520Certificate%2520to%2520Standalone%2520Cluster%26amp%3Bsection-id%3D%7B6B53EAD4-D902-4099-B750-E5275B30D651%7D%26amp%3Bpage-id%3D%7B27A8FCFB-BF48-48DF-B18E-8877FAC9D574%7D%26amp%3Bend%26amp%3Bbase-path%3Dhttps%3A%2F%2Fmicrosoft.sharepoint.com%2Fteams%2FDSHome%2Fazure%2FAzureTechnologies%2FServiceFabric%2FSiteAssets%2FService%2520Fabric%2520(PaaS%2520v2)%2520Notebook%2FOnPrem-Windows.one%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EDeploy%20Certificate%20to%20Standalone%20Cluster%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B3.%20RDP%20into%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eeach%20VM%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Band%20make%20sure%20certificate%20is%20present%20and%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eprivate%20key%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bis%20already%20ACL'd%20to%26nbsp%3B%20'Network%20Service'%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20a%20)%20Run%20certlm.msc%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20b)%20Find%20the%20new%20certificate%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20c)%26nbsp%3B%3CSPAN%20data-contrast%3D%22auto%22%3ERight%20click%20cert%2C%20Manage%20Private%20Keys%2C%20ensure%20NETWORK%20SERVICE%20has%20full%20permissions%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Note%3A%20if%20you%20are%20using%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22onenote%3A%23Deploy%2520Certificate%2520to%2520Standalone%2520Cluster%26amp%3Bsection-id%3D%7B6B53EAD4-D902-4099-B750-E5275B30D651%7D%26amp%3Bpage-id%3D%7B27A8FCFB-BF48-48DF-B18E-8877FAC9D574%7D%26amp%3Bend%26amp%3Bbase-path%3Dhttps%3A%2F%2Fmicrosoft.sharepoint.com%2Fteams%2FDSHome%2Fazure%2FAzureTechnologies%2FServiceFabric%2FSiteAssets%2FService%2520Fabric%2520(PaaS%2520v2)%2520Notebook%2FOnPrem-Windows.one%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EDeploy%20Certificate%20to%20Standalone%20Cluster%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%2C%20you%20can%20skip%20this%20step%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%204.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EStop%26nbsp%3B%20and%20disable%20%22Microsoft%20Service%20Fabric%20Host%20Service%22%20service%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bin%20command%20prompt%20with%20administrative%20rights.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESet-Service%20-ServiceName%20FabricHostSvc%20-StartupType%20disabled%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Bnet%20stop%20FabricHostSvc%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B5.%26nbsp%3B%20L%3CSPAN%20class%3D%22TextRun%20SCXO111624056%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO111624056%20BCX8%22%3Eocate%20ClusterManifest.current.xml%20in%20the%20cluster%20root%20folder%20like%20%22C%3A%5CProgramData%5CSF%5CFabric%5CClusterManifest.current.xml%22%20according%20to%20actual%20datapath%20deployed%2C%20and%20copy%20to%20somewhere%20like%20C%3A%5CTemp%5CclusterManifest.xml%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO111624056%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B6.%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3ERemove%20clusterManifest.xml%20read-only%20attribute%20and%20Modify%20the%20C%3A%5CTemp%5CclusterManifest.xml%20and%20update%20with%20new%20thumbprint.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Ba)%20Replace%20all%20occurrences%20of%20old%20cert%20with%20the%20new%20thumbprint%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B7.%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO264013254%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO264013254%20BCX8%22%3ELocate%20InfrastructureManifest.xml%20from%20.%5CFabric%5CFabric.Data%5CInfrastructureManifest.xml%20path%2C%20for%20my%20case%2C%20it%20is%20C%3A%5CProgramData%5CSF%5Cvm0%5CFabric%5CFabric.Data%5CInfrastructureManifest.xml%20as%20dataroot%20is%20at%20C%3A%5CProgramData%2C%20and%20copy%20to%20c%3A%5Ctemp%20too.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO264013254%20BCX8%22%3E%3CSPAN%20class%3D%22SCXO264013254%20BCX8%22%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO264013254%20BCX8%22%3E%26nbsp%3B%208.%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EModify%20the%20C%3A%5CTemp%5CInfrastructureManifest.xml%20and%20update%20with%20new%20thumbprint.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20a)%20Replace%20all%20occurrences%20of%20old%20cert%20with%20the%20new%20thumbprint%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%20%26nbsp%3B9.%26nbsp%3B%20Run%20following%20cmdlet%20to%20update%20the%20Service%20Fabric%20cluster%2C%20replace%20the%20SvcFab%20path%20according%20to%20the%20actual%20path.%E2%80%AF%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENew-ServiceFabricNodeConfiguration%26nbsp%3B%22C%3A%5CProgramData%5CSF%22%20-FabricLogRoot%20%22C%3A%5CProgramData%5CSF%5Clog%22%20-ClusterManifestPath%20%22C%3A%5CTemp%5CclusterManifest.xml%22%20-InfrastructureManifestPath%20%22C%3A%5Ctemp%5CInfrastructureManifest.xml%22%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%2010.%26nbsp%3B%20L%3CSPAN%20data-contrast%3D%22auto%22%3Eook%26nbsp%3B%20for%20%E2%80%AF%22C%3A%5CProgramData%5CSF%5Cvm0%5CFabric%5CFabric.Package.current.xml%22%3C%2FSPAN%3E%26nbsp%3B%20and%20note%26nbsp%3B%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bthe%20%22Configuration%20version%22%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22GetImage.png%22%20style%3D%22width%3A%20748px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F244214i9FFD3889F6E63BC9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22GetImage.png%22%20alt%3D%22GetImage.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22TextRun%20SCXO233880637%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO233880637%20BCX8%22%3ECd%20into%20the%20corresponding%20folder%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO233880637%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22EOP%20SCXO233880637%20BCX8%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22GetImage%20(1).png%22%20style%3D%22width%3A%20769px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F244215i25D4BBBA04CD1360%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22GetImage%20(1).png%22%20alt%3D%22GetImage%20(1).png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22EOP%20SCXO233880637%20BCX8%22%3E%3CSPAN%20class%3D%22TextRun%20SCXO185358521%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO185358521%20BCX8%22%3EEdit%20%22C%3A%5CProgramData%5CSF%5Cvm0%5CFabric%5CFabric.Config.0.131572537807340469%5CSettings.xml%22%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO185358521%20BCX8%22%3E%26nbsp%3B%20and%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO81806799%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO81806799%20BCX8%22%3EReplace%20all%20occurrences%20of%20old%20cert%20with%20the%20new%20thumbprint%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO81806799%20BCX8%22%3E%26nbsp%3B.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22EOP%20SCXO233880637%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO185358521%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO81806799%20BCX8%22%3E11.%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESet%20the%20services%20%22Microsoft%20Service%20Fabric%20Host%20Service%22%20startup%20type%20and%20start%20it%20again%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESet-Service%20-ServiceName%20FabricHostSvc%20-StartupType%20automatic%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3Enet%20start%20FabricHostSvc%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CU%3E12.%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO93045047%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO93045047%20BCX8%22%3ERepeat%20the%20above%20steps%20on%20every%20cluster%20node.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E%3CSPAN%20class%3D%22SCXO93045047%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FU%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E13.%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO208101735%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO208101735%20BCX8%22%3EAfter%20step%2012%20you%20should%20able%20to%20reconnect%20to%20the%20cluster%20over%20SFX%20and%20PowerShell.%E2%80%AF%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO208101735%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO208101735%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO208101735%20BCX8%22%3E14.%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO267878288%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO267878288%20BCX8%22%3ENow%2C%20even%20the%20SFX%20is%20working%2C%20and%20you%20can%20call%20Connect-ServiceFabricCluster%20from%20one%20of%20cluster%20node%20and%20secure%20connection%20is%20fine%2C%20but%20Get-ServiceFabricClusterConfiguration%20still%20give%20you%20the%20old%20cluster%20thumbprint%20in%20deployment%20JSON%20file.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO267878288%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO208101735%20BCX8%22%3E%3CSPAN%20class%3D%22TextRun%20SCXO223204758%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO223204758%20BCX8%22%3EGet-ServiceFabricClusterConfiguration%20still%20outputs%20the%20old%20cluster%20cert%20thumbprint%20expired%20as%20expected.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO223204758%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO208101735%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO223204758%20BCX8%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22GetImage.jpeg%22%20style%3D%22width%3A%20527px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F244216i1CE174C97F762A28%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22GetImage.jpeg%22%20alt%3D%22GetImage.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22LineBreakBlob%20BlobObject%20DragDrop%20SCXO93045047%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO208101735%20BCX8%22%3E%3CSPAN%20class%3D%22EOP%20SCXO223204758%20BCX8%22%3E15.%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO249482361%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO249482361%20BCX8%22%3EWe%20will%20have%20to%20use%26nbsp%3B%20set-ServiceFabricUpgradeOrchestrationServiceState%20to%20get%20into%20the%20cluster%20state%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO249482361%20BCX8%22%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3COL%20style%3D%22font-weight%3A%20400%3B%22%3E%0A%3CLI%20data-aria-posinset%3D%221%22%20data-aria-level%3D%223%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EConnect-ServiceFabricCluster%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-aria-posinset%3D%222%22%20data-aria-level%3D%223%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EGet-ServiceFabricUpgradeOrchestrationServiceState%20%7C%20Out-File%20.%5Cstate.json%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-aria-posinset%3D%223%22%20data-aria-level%3D%223%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%3CSPAN%3EReplace%20the%20old%20thumbprint%20in%20state.json%20file%20with%20the%20new%20thumbprint.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-aria-posinset%3D%224%22%20data-aria-level%3D%223%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%3CSPAN%3ESet%20it%20back%20%22set-ServiceFabricUpgradeOrchestrationServiceState%20-StateFilePath%20c%3A%5C60CU2%5Cstate.json%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%3E16.%26nbsp%3B%3CSPAN%20class%3D%22TextRun%20SCXO23865684%20BCX8%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXO23865684%20BCX8%22%3ERun%20Get-ServiceFabricClusterConfiguration%20cmdlet%20again%2C%20you%20should%20see%20the%20updated%20cert%20info.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXO23865684%20BCX8%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2031756%22%20slang%3D%22en-US%22%3E%3CP%3ESometime%20either%20primary%20or%20secondary%20cluster%20certificates%20get%20expired%20before%20you%20can%20rotate%20with%20new%20certificate%20which%20can%20cause%20cluster%20to%20be%20inaccessible%20or%20unreachable%20then%20you%20can%20follow%20these%20steps%20to%20recover%20standalone%20Service%20Fabric%20cluster.%20If%20you%20looking%20to%20rotate%20a%20near%20expiry%20certificate%20refer%20to%20previous%20article%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fcertificate-rotation-azure-service-fabric-standalone-cluster%2Fba-p%2F2028360%22%20target%3D%22_blank%22%3ECertificate%20rotation%20Azure%20Service%20Fabric%20Standalone%20cluster%20-%20Microsoft%20Tech%20Community%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2031756%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Service%20Fabric%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Sometime either primary or secondary cluster certificates get expired before you can rotate with new certificate which can cause cluster to be inaccessible or unreachable then you can follow these steps to recover standalone Service Fabric cluster. If you looking to rotate a near expiry certificate refer to previous article : Certificate rotation Azure Service Fabric Standalone cluster - Microsoft Tech Community

This article assumes you are running cluster with thumbprint approach. In general, the common name approach is recommended for easy certificate management. More information about certificate on Standalone cluster refer to Secure a cluster on Windows by using certificates - Azure Service Fabric | Microsoft Docs

 

Recover Azure Service Fabric Standalone Cluster which is inaccessible or unreachable due to expired cluster certificates:

 

  1. Create or get the new certificate.  
  2. Deploy the new cert to all nodes manually by following https://docs.microsoft.com/en-us/powershell/module/pkiclient/import-pfxcertificate?view=win10-ps  

     3. RDP into each VM and make sure certificate is present and the private key is already ACL'd to  'Network Service' 

          a ) Run certlm.msc 

          b) Find the new certificate

          c) Right click cert, Manage Private Keys, ensure NETWORK SERVICE has full permissions 

 

    4. Stop  and disable "Microsoft Service Fabric Host Service" service in command prompt with administrative rights. 

         Set-Service -ServiceName FabricHostSvc -StartupType disabled 

         net stop FabricHostSvc 

   5.  Locate ClusterManifest.current.xml in the cluster root folder like "C:\ProgramData\SF\Fabric\ClusterManifest.current.xml" according to actual datapath deployed, and copy to somewhere like C:\Temp\clusterManifest.xml 

   

   6.  Remove clusterManifest.xml read-only attribute and Modify the C:\Temp\clusterManifest.xml and update with new thumbprint. 

     a) Replace all occurrences of old cert with the new thumbprint .

  

   7. Locate InfrastructureManifest.xml from .\Fabric\Fabric.Data\InfrastructureManifest.xml path, for my case, it is C:\ProgramData\SF\vm0\Fabric\Fabric.Data\InfrastructureManifest.xml as dataroot is at C:\ProgramData, and copy to c:\temp too.  

 

  8. Modify the C:\Temp\InfrastructureManifest.xml and update with new thumbprint. 

      a) Replace all occurrences of old cert with the new thumbprint 

 

   9.  Run following cmdlet to update the Service Fabric cluster, replace the SvcFab path according to the actual path.   

New-ServiceFabricNodeConfiguration "C:\ProgramData\SF" -FabricLogRoot "C:\ProgramData\SF\log" -ClusterManifestPath "C:\Temp\clusterManifest.xml" -InfrastructureManifestPath "C:\temp\InfrastructureManifest.xml" 

 

  10.  Look  for  "C:\ProgramData\SF\vm0\Fabric\Fabric.Package.current.xml"  and note  the "Configuration version" 

GetImage.png

 

Cd into the corresponding folder 

GetImage (1).png

 

Edit "C:\ProgramData\SF\vm0\Fabric\Fabric.Config.0.131572537807340469\Settings.xml"  and Replace all occurrences of old cert with the new thumbprint .

 

11. Set the services "Microsoft Service Fabric Host Service" startup type and start it again 

Set-Service -ServiceName FabricHostSvc -StartupType automatic 

net start FabricHostSvc 

 

12. Repeat the above steps on every cluster node. 

 

13. After step 12 you should able to reconnect to the cluster over SFX and PowerShell.   

 

14. Now, even the SFX is working, and you can call Connect-ServiceFabricCluster from one of cluster node and secure connection is fine, but Get-ServiceFabricClusterConfiguration still give you the old cluster thumbprint in deployment JSON file. 

 

Get-ServiceFabricClusterConfiguration still outputs the old cluster cert thumbprint expired as expected. 

GetImage.jpeg

 

15. We will have to use  set-ServiceFabricUpgradeOrchestrationServiceState to get into the cluster state  

  1. Connect-ServiceFabricCluster 
  2. Get-ServiceFabricUpgradeOrchestrationServiceState | Out-File .\state.json 
  3. Replace the old thumbprint in state.json file with the new thumbprint. 
  4. Set it back "set-ServiceFabricUpgradeOrchestrationServiceState -StateFilePath c:\60CU2\state.json

16. Run Get-ServiceFabricClusterConfiguration cmdlet again, you should see the updated cert info.