Azure Service Fabric 资源部署失败退出代码 -532462766
Azure Service Fabric Resource Deployment Failure Exit Code -532462766
通过 Azure 门户创建普通服务结构集群后,我在 VM 规模集上收到此错误。它发生在使用一系列不同的集群名称、大小和 VM 类型的情况下。
完整错误:
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionHandlerNonTransientError",
"message": "Handler 'Microsoft.Azure.ServiceFabric.ServiceFabricNode' has reported failure for VM Extension 'Test_ServiceFabricNode' with terminal error code '1009' and error message: 'Enable failed for plugin (name: Microsoft.Azure.ServiceFabric.ServiceFabricNode, version 1.0.0.33) with exception Command C:\Packages\Plugins\Microsoft.Azure.ServiceFabric.ServiceFabricNode\1.0.0.33 \ServiceFabricExtensionHandler.exe of Microsoft.Azure.ServiceFabric.ServiceFabricNode has exited with Exit code: -532462766'"
}
]
}
}
这是在我尝试将我的用户代码发布到集群之前,所以不太确定是什么原因造成的。对大多数事情使用默认设置。初始容量 3(测试集群)。青铜 Durability/Reliability
编辑:
连接到远程桌面中的其中一个 VM 时看到此问题。
Application: ServiceFabricExtensionHandler.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Azure.ServiceFabric.Extension.Core.AgentException
at Microsoft.Azure.ServiceFabric.Extension.Core.CertificateUtility.LoadClientCertificate(System.String, System.String)
at Microsoft.Azure.ServiceFabric.Extension.Core.CertificateUtility.LoadCertificateWrapper(Microsoft.Azure.ServiceFabric.Extension.Core.Models.CertificateSettings)
at Microsoft.Azure.ServiceFabric.Extension.Core.Models.HandlerSettings.AllowAccessToCerts()
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.ValidateDeployment(Microsoft.Azure.ServiceFabric.Extension.Core.Models.HandlerSettings)
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.InstallService()
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.InstallServiceWithRetry()
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.Enable()
at Microsoft.Azure.ServiceFabric.Extension.Handler.Program.Main(System.String[])
问题是 Service Fabric 找不到您配置的证书。这有几个常见的原因:
- 提供了错误的证书指纹。假设您使用的是 KeyVault,请确保您没有使用 KeyVault URL 的 ID 部分作为您的证书指纹。
- 您的证书指纹开头有一个隐藏的 Unicode 字符。如果您从 Windows 证书查看器对话框中获取指纹,这很常见,因为当您从该对话框中 copy/paste 时,它会在开头插入一个隐藏字符。解决方案是先复制到记事本(或任何其他 ASCII 编辑器)。
如果您通过 RDP 连接到其中一个虚拟机,您可以通过两种方式解决此问题:
- 检查位于 C:\WindowsAzure\Logs\WaAppAgent.logs 的 Azure 来宾代理日志。您将查找与安装 Microsoft.Azure.ServiceFabric.Extension 相关的条目,然后是 "Cannot find certificate with thumbprint "xxxx" ..." 之类的条目。确保指纹符合您的预期,并且指纹不是以问号“?xxx”开头,表示隐藏的 unicode 字符。
- 打开 Service Fabric 管理事件日志(eventvwr -> 应用程序和服务日志 -> Microsoft-ServiceFabric)。您应该会看到与无法加载证书相关的错误条目。
通过 Azure 门户创建普通服务结构集群后,我在 VM 规模集上收到此错误。它发生在使用一系列不同的集群名称、大小和 VM 类型的情况下。
完整错误:
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionHandlerNonTransientError",
"message": "Handler 'Microsoft.Azure.ServiceFabric.ServiceFabricNode' has reported failure for VM Extension 'Test_ServiceFabricNode' with terminal error code '1009' and error message: 'Enable failed for plugin (name: Microsoft.Azure.ServiceFabric.ServiceFabricNode, version 1.0.0.33) with exception Command C:\Packages\Plugins\Microsoft.Azure.ServiceFabric.ServiceFabricNode\1.0.0.33 \ServiceFabricExtensionHandler.exe of Microsoft.Azure.ServiceFabric.ServiceFabricNode has exited with Exit code: -532462766'"
}
]
}
}
这是在我尝试将我的用户代码发布到集群之前,所以不太确定是什么原因造成的。对大多数事情使用默认设置。初始容量 3(测试集群)。青铜 Durability/Reliability
编辑: 连接到远程桌面中的其中一个 VM 时看到此问题。
Application: ServiceFabricExtensionHandler.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Azure.ServiceFabric.Extension.Core.AgentException
at Microsoft.Azure.ServiceFabric.Extension.Core.CertificateUtility.LoadClientCertificate(System.String, System.String)
at Microsoft.Azure.ServiceFabric.Extension.Core.CertificateUtility.LoadCertificateWrapper(Microsoft.Azure.ServiceFabric.Extension.Core.Models.CertificateSettings)
at Microsoft.Azure.ServiceFabric.Extension.Core.Models.HandlerSettings.AllowAccessToCerts()
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.ValidateDeployment(Microsoft.Azure.ServiceFabric.Extension.Core.Models.HandlerSettings)
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.InstallService()
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.InstallServiceWithRetry()
at Microsoft.Azure.ServiceFabric.Extension.Core.VMExtensionHandler.Enable()
at Microsoft.Azure.ServiceFabric.Extension.Handler.Program.Main(System.String[])
问题是 Service Fabric 找不到您配置的证书。这有几个常见的原因:
- 提供了错误的证书指纹。假设您使用的是 KeyVault,请确保您没有使用 KeyVault URL 的 ID 部分作为您的证书指纹。
- 您的证书指纹开头有一个隐藏的 Unicode 字符。如果您从 Windows 证书查看器对话框中获取指纹,这很常见,因为当您从该对话框中 copy/paste 时,它会在开头插入一个隐藏字符。解决方案是先复制到记事本(或任何其他 ASCII 编辑器)。
如果您通过 RDP 连接到其中一个虚拟机,您可以通过两种方式解决此问题:
- 检查位于 C:\WindowsAzure\Logs\WaAppAgent.logs 的 Azure 来宾代理日志。您将查找与安装 Microsoft.Azure.ServiceFabric.Extension 相关的条目,然后是 "Cannot find certificate with thumbprint "xxxx" ..." 之类的条目。确保指纹符合您的预期,并且指纹不是以问号“?xxx”开头,表示隐藏的 unicode 字符。
- 打开 Service Fabric 管理事件日志(eventvwr -> 应用程序和服务日志 -> Microsoft-ServiceFabric)。您应该会看到与无法加载证书相关的错误条目。