Remy
Remy

Reputation: 12693

Sudden System.Net.Http.HttpRequestException with Azure KeyVault

We're using Azure KeyVault since a few weeks and last week we suddenly had a few services fail with this error message:

System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
 ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)

The funky thing is that we have multiple web apps running on the same server. For some it works and for some it doesn't. Also, it was working for all of them for some time. And some came back, others not.

Any idea what this could be? I don't think our IP is blocked or WebSockets are not configured, otherwise it would not work for all apps. The only difference is that the currently working apps are .NET and the non-working ones .NET Core. But as I said, even .NET Core was working until Friday. All services do get the same secrets (E.g. same Database login data) and every runs on Azure.

I've seen some other posts about this issue, but the only solution was that they built a caching layer on top of it. Which seems more like a bandaid and not a solution.

Upvotes: 0

Views: 1340

Answers (2)

Gagan Bodduluru
Gagan Bodduluru

Reputation: 43

The issue is still there with the latest version 3.1.8 of library Microsoft.Extensions.Configuration.AzureKeyVault. Downgrading to 2.2.0 worked for me as well.

Upvotes: 1

Peter
Peter

Reputation: 781

For that issue I've opened a ticket at the Microsoft support. The final recommendation they gave me is downgrading the library Microsoft.Extensions.Configuration.AzureKeyVault to version 2.2.0. Before we used 3.1.3.

That worked well so far. We hadn't have that exception anymore.

I would appreciate, if anyone could share her/his experience, whether newer versions of that lib are working properly as well.

Upvotes: 3

Related Questions