You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a console app which restarts a servicefabric service . I am using Microsoft.ServiceFabric.Client.IServiceFabricClient to restart any service fabric service. This console app works fine when published as win-x64 to restart servicefabric services deployed on windows but the same application throws exception and does not restart service fabric application when published as linux-x64 on ubuntu VM to restart servicefabric services on ubuntu cluster.
To Reproduce
public async Task Test()
{
try
{
var service = $"{config.Tenant}/{config.ServiceName}";
var clientTask = new Microsoft.ServiceFabric.Client.ServiceFabricClientBuilder()
.UseEndpoints(new Uri($"https://{_config.ClusterDNS}:19080"))
.UseX509Security((ct) =>
{
// get the X509Certificate2 either from Certificate store or from file.
var clientCert = new X509Certificate2("cert.pfx", "");
var remoteSecuritySettings = new RemoteX509SecuritySettings(new List<string> { _config.ClusterCertificateThumbPrint });
return Task.FromResult<SecuritySettings>(new X509SecuritySettings(clientCert, remoteSecuritySettings));
})
.BuildAsync();
var client = await clientTask;
var partitionInfo = await client.Partitions.GetPartitionInfoListAsync(service);
var partitionID = partitionInfo.Data.First().PartitionInformation.Id;
Console.WriteLine($"partitionID:{partitionID}");
var restartOperation = Guid.NewGuid();
await client.Faults.StartPartitionRestartAsync(service, partitionID, restartOperation, Microsoft.ServiceFabric.Common.RestartPartitionMode.AllReplicasOrInstances);
}
catch (Microsoft.ServiceFabric.Common.Exceptions.ServiceFabricException ex)
{
Console.WriteLine("ErrorCode" + ex.ErrorCode);
Console.WriteLine("IsTransient" + ex.IsTransient);
Console.WriteLine("HelpLink" + ex.HelpLink);
_logger.LogError(ex, "ServiceFabricException");
}
catch (Exception ex)
{
_logger.LogError(ex, "Test error");
}
}
Expected behavior
Service fabric service should restart
Additional context
This is exception
2022-06-03 06:14:44.0501|INFO|Program|Start of application
Service url: Galore/VectorStreams
partitionID:5dd33937-a166-4ab0-8f2b-acac463d69cf
2022-06-03 06:14:45.7945|DEBUG|TimescaleMigrationTool.TestClass|partitionID:5dd33937-a166-4ab0-8f2b-acac463d69cf
ErrorCodeUNKNOWN
IsTransientFalse
HelpLink
2022-06-03 06:14:45.8833|ERROR|TimescaleMigrationTool.TestClass|ServiceFabricException Microsoft.ServiceFabric.Common.Exceptions.ServiceFabricException: Null
at Microsoft.ServiceFabric.Client.Http.ServiceFabricHttpClient.SendAsyncHandleUnsuccessfulResponse(Func1 requestFunc, Uri requestUri, String clientRequestId, CancellationToken cancellati onToken) at Microsoft.ServiceFabric.Client.Http.ServiceFabricHttpClient.SendAsync(Func1 requestFunc, String relativeUri, String requestId, CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered:
I have a console app which restarts a servicefabric service . I am using Microsoft.ServiceFabric.Client.IServiceFabricClient to restart any service fabric service. This console app works fine when published as win-x64 to restart servicefabric services deployed on windows but the same application throws exception and does not restart service fabric application when published as linux-x64 on ubuntu VM to restart servicefabric services on ubuntu cluster.
To Reproduce
public async Task Test()
{
try
{
var service = $"{config.Tenant}/{config.ServiceName}";
Expected behavior
Service fabric service should restart
Additional context
This is exception
2022-06-03 06:14:44.0501|INFO|Program|Start of application
Service url: Galore/VectorStreams
partitionID:5dd33937-a166-4ab0-8f2b-acac463d69cf
2022-06-03 06:14:45.7945|DEBUG|TimescaleMigrationTool.TestClass|partitionID:5dd33937-a166-4ab0-8f2b-acac463d69cf
ErrorCodeUNKNOWN
IsTransientFalse
HelpLink
2022-06-03 06:14:45.8833|ERROR|TimescaleMigrationTool.TestClass|ServiceFabricException Microsoft.ServiceFabric.Common.Exceptions.ServiceFabricException: Null
at Microsoft.ServiceFabric.Client.Http.ServiceFabricHttpClient.SendAsyncHandleUnsuccessfulResponse(Func
1 requestFunc, Uri requestUri, String clientRequestId, CancellationToken cancellati onToken) at Microsoft.ServiceFabric.Client.Http.ServiceFabricHttpClient.SendAsync(Func
1 requestFunc, String relativeUri, String requestId, CancellationToken cancellationToken)The text was updated successfully, but these errors were encountered: