question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unabled [sic] to create Azure Web Site Management client

See original GitHub issue

Receiving this error when the WebJob is running. I’m running the latest code (from master) commit 611773f so I’m wondering if something has broken since the last release (I see a lot of dependencies had changed)

It’s happening after “Deleting answer” (which is after the existence of the files has been verified by the Let’s Encrypt service).

AzureLetsEncryptRenewer.exe Error: 0 : Unabled to create Azure Web Site Management client System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at ACMESharp.PKI.CertificateProvider.GetProvider(String name, IReadOnlyDictionary2 initParams) at LetsEncrypt.Azure.Core.Services.AcmeService.GetCertificate(AcmeClient client) at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__10.MoveNext() ERROR: Encountered exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at ACMESharp.PKI.CertificateProvider.GetProvider(String name, IReadOnlyDictionary2 initParams) at LetsEncrypt.Azure.Core.Services.AcmeService.GetCertificate(AcmeClient client) at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__10.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at LetsEncrypt.Azure.Core.CertificateManager.RequestAndInstallInternal(IAcmeConfig config) at LetsEncrypt.Azure.Core.CertificateManager.AddCertificate() at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.Renew(RenewalParameters renewParams) in d:\a\1\s\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 53 at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.Renew() in d:\a\1\s\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 31

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MatthewSteeplescommented, Oct 9, 2017

I updated the dependencies on my own fork to deploy (as I’m just experimenting currently so not expecting a stable release) and got past most of the certificate generation issues. I now get a failure (but no Exception) when trying to save the .pfx file so I’ll probably hold out for the next official releases of the dependencies before trying again. I’ve written a Powershell add-in for ACMESharp that will allow us to use DNS auth with DNSMadeEasy so I’m not in a massive rush for this, just thought I’d try and help out where I could

0reactions
ohadschncommented, Oct 9, 2017

So clearly the last trace you’re seeing is coming from this line. I’m not sure exactly what binary you’re running but that part of the source hasn’t changed for a while which is weird for two reasons

  1. If you say the file was created, presumably that means the file stream was opened successfully so I would expect any error during the cert export to be caught by the catch block there and therefore trace the exact error.
  2. The error code your webjob is getting implies a heap corruption. Interestingly, This SO thread mentions the same exit code and it too deals with certificates in WebJobs.

The latter thread suggested his executable ran fine on his local machine. Could you try that out?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Baseline highly available zone-redundant web application
It details guidance for designing a secure, zone-redundant, and highly available web application on Azure. The architecture exposes a public endpoint via Azure...
Read more >
Connect to an internal virtual network using Azure API ...
Learn how to set up and configure Azure API Management in a virtual network using internal mode.
Read more >
Azure API Management - Overview and key concepts
Introduction to key scenarios, capabilities, and concepts of the Azure API Management service. API Management supports the full API ...
Read more >
Enable Azure Active Directory Kerberos authentication for ...
Learn how to enable identity-based Kerberos authentication for hybrid user identities over Server Message Block (SMB) for Azure Files ...
Read more >
Configure HTTPS on a Front Door (classic) custom domain
In this tutorial, you learn how to enable and disable HTTPS on your Azure Front Door (classic) configuration for a custom domain.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found