0

We were able to connect to the keyvault from .NET 5 api running from my local machine till 2 days back. It is giving the below error recently

Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry. (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.)

we are accessing the keyvault using the DefaultAzureCredential (pls see the below code) and configured my email though Visual Studio -->Tools> Options-->Azure Service Authentication-->Account Selection--> "XXyemail@.com". This email has list access like (list, add, get ,delete, upddate) in access polices of KeyVault.

public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
        .ConfigureAppConfiguration((context, config) =>
        {
            var appSettings = config.Build();
            var credentialOptions = new DefaultAzureCredentialOptions();
            var credential = new DefaultAzureCredential(credentialOptions);
            config.AddAzureKeyVault(new Uri(appSettings["KeyVault:Url"]), credential);
        })
       .ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.UseSerilog();
                webBuilder.UseStartup<Startup>();
            });
}

Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry. (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.)

can anybody let me know what would be the reason for this ?

thanks,

Developer
  • 435
  • 4
  • 16
ezycoder
  • 103
  • 2
  • 9

1 Answers1

0

My understanding is that the Key Vault was not available for some reason or, since the error mentions an SSL connection, there was an error specifically with the SSL certificate. For example, we experienced a similar error when our Kubernetes cluster was modified (upgraded). The error could also have to do with Azure not being available or maybe even not having network connectivity for a while.

Developer
  • 435
  • 4
  • 16