Powershell 当我尝试为故障转移测试运行PS脚本时,它为服务结构提供了以下错误
/PS脚本Powershell 当我尝试为故障转移测试运行PS脚本时,它为服务结构提供了以下错误,powershell,azure,azure-service-fabric,Powershell,Azure,Azure Service Fabric,/PS脚本 $connection = "localhost:19000" $timeToRun = 60 $maxStabilizationTimeSecs = 180 $waitTimeBetweenFaultsSec = 10 $serviceName = "fabric:/****.OnServiceFabric.Policy.Deploy" Connect-ServiceFabricCluster $connection Invoke-ServiceFabricFailoverTe
$connection = "localhost:19000"
$timeToRun = 60
$maxStabilizationTimeSecs = 180
$waitTimeBetweenFaultsSec = 10
$serviceName = "fabric:/****.OnServiceFabric.Policy.Deploy"
Connect-ServiceFabricCluster $connection
Invoke-ServiceFabricFailoverTestScenario -TimeToRunMinute $timeToRun -MaxServiceStabilizationTimeoutSec $maxStabilizationTimeSecs -WaitTimeBetweenFaultsSec $waitTimeBetweenFaultsSec -ServiceName $serviceName -PartitionKindSingleton
Pause
//尝试运行服务时出错
PS C:\Temp> C:\Temp\failovertest.ps1
True
Invoke-ServiceFabricFailoverTestScenario : GetServiceDescription for service fabric:/****.OnServiceFabric.Policy.Deploy with timeout 00:01:00 failed with 2147949517. The error code is not in success &
retry error codes.
At C:\Temp\failovertest.ps1:9 char:1
+ Invoke-ServiceFabricFailoverTestScenario -TimeToRunMinute $timeToRun -MaxService ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Servi...usterConnection:TestabilityClusterConnection) [Invoke-ServiceFabricFailoverTestScenario], FabricServiceNotFoundException
+ FullyQualifiedErrorId : InvokeFailoverTestErrorId,Microsoft.ServiceFabric.Testability.Powershell.InvokeFailoverTestScenario
Press Enter to continue...:
我在虚拟机上运行它,因此在进程监视器中显示****.CloudServices.OnServiceFabric.Host。我也用过这个,但它不起作用试着让标题和正文更简洁、更好formatted@Mikhail路径不正确。终于修好了:-)