aspnet / Configuration

[Archived] Interfaces and providers for accessing configuration files. Project moved to https://github.com/aspnet/Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuration.AddAzureKeyVault fails on application startup

anthonybouton opened this issue · comments

Hello,

First of all, this is my first contribution to github, so I'm sorry if I have missed anything,

Anyway, here I go

I have added the extension nuget package Configuration.AzureKeyVault so that the secrets from my azurekeyvault are added to my configuration.

This works as intended, expect that it sometimes doesn't, I'll explain.
Sometimes my application will just throw a error 500 in IIS production, looking at the log files ( attached to this issue ) its coming from the AzureKeyVault libraries.

After recycling the applicationpool for this website, everything works again for a few days, until the same exact error appears and I have to recycle again.

This is pretty annoying since the website isn't reliable at this point, I have monitoring tools running so I can see when the error 500 gets thrown and I can take actions to resolve it.

I wanted to create this issue so maybe other users have experienced it before, and I wanted to share it because I didn't find any related issues to this, if there are any, I do apologize up front.

Application pool settings:

  • .NET CLR VERSION : No Managed Code
  • Managed Pipeline: Classic

Please find following attachments

  • VM_SPECS.png - this is just a simple systeminfo from where the application is running
  • DOTNET_INFO.png -this is also ran at the server where the application is running
  • IIS_INFO.png - screenshot taken from the IIS console
  • application-pool.png - screenshot with the advanced application pool settings
  • packages-project.png - screenshot with the referenced nuget packages for the website
  • the full stack trace containing the error in txt format,

The application itself is a MVC project that references the 2.1 .net core framework

application-pool
dotnet_info
iis_info
packages-project
vm_specs
cartilles.txt_1864_2018622182222.log

No such host is known is usually caused by DNS resolution error.

Do you have custom DNS server? In the time of failure are you able to resolve your keyvault host using nslookup hostname in cmd?

Hi there @pakrym
I do not use any custom DNS server.
In the time of the failure, I can resolve the host mentioning the method you describe.

I think since it occurs every now and then its hard to debug it.
I'm using google DNS now, will see if that improves the situation.

Unless there is an alternative DNS I could use

@pakrym
4 days have past since I use the google DNS instead of the default DNS on my EC2 instance.
No issues occured since then, looks like this can be closed.
So sorry for your time you've wasted on this ticket.