Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location Cannot Be Null on last step of cert install #370

Open
rgamage opened this issue May 25, 2020 · 10 comments
Open

Location Cannot Be Null on last step of cert install #370

rgamage opened this issue May 25, 2020 · 10 comments

Comments

@rgamage
Copy link

rgamage commented May 25, 2020

I am using Azure app service, with LE extension 1.05 installed. I have used LE successfully for this app in the past. I have an existing certificate that I am unable to renew (will expire next week). When I go through the steps in the extension wizard, I get this stack trace on the last step:

Server Error in '/letsencrypt' Application.
'Location' cannot be null.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Rest.ValidationException: 'Location' cannot be null.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[ValidationException: 'Location' cannot be null.]
Microsoft.Azure.Management.WebSites.Models.Resource.Validate() +61
Microsoft.Azure.Management.WebSites.Models.SiteConfig.Validate() +32
Microsoft.Azure.Management.WebSites.Models.Site.Validate() +30
Microsoft.Azure.Management.WebSites.d__214.MoveNext() +202
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
Microsoft.Azure.Management.WebSites.d__419.MoveNext() +322
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
LetsEncrypt.Azure.Core.SiteSlotExtensions.BeginCreateOrUpdateSiteOrSlot(IWebAppsOperations sites, String resourceGroupName, String webAppName, String siteSlotName, Site s) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\SiteSlotExtensions.cs:77
LetsEncrypt.Azure.Core.Services.WebAppCertificateService.Install(ICertificateInstallModel model) in D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\WebAppCertificateService.cs:82
LetsEncrypt.Azure.Core.d__14.MoveNext() in D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:206
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
LetsEncrypt.SiteExtension.Controllers.d__7.MoveNext() in D:\a\1\s\LetsEncrypt-SiteExtension\Controllers\HomeController.cs:229
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +97
System.Web.Mvc.Async.<>c__DisplayClass37.b__36(IAsyncResult asyncResult) +17
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +50
System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +228
System.Web.Mvc.Async.<>c__DisplayClass33.b__32(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c() +26
System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.b__15(IAsyncResult asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +22 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar) +152
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +125

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3535.0

@Darkmace
Copy link

I am having the same problem. The setup with this extension and Azure App Service had been running with no problems for over a year and then started failing with this error on 05/23/2020 03:47 after having run with no problems 24 hours earlier.

It has now failed with this error 5 times in a row and switched over to getting a
429 "Error creating new cert :: too many certificates already issued for exact set of domains: *****.com: see https://letsencrypt.org/docs/rate-limits/"
response from the server. I assume this is due to the authentication failing 5 times in a row due to the original error and then hitting the LetsEncrypt rate limit of 5 failed authentications in a row.

@aluhrs13
Copy link

I am also hitting this.

@keenthinker
Copy link

keenthinker commented May 28, 2020

I also had the problem with version 0.6.7!
Don't panic 😃, you have two options to solve the issue:

  • I found out, that there is a newer version of the extension - 1.0.5.
    Update to this version!
    Deinstall your current version and then install the extension again - before doing this, write down your configuration entries, just in case!
    There are two versions now in the extensions list -> ### Azure Let's Encrypt and Azure Let's Encrypt (No WebJos)
    In my case I (was) am using Azure Let's Encrypt
    The nice thing is, that your previous entries are persisted and they are already filled in!
    The downside - this version needs a storage connection string, to store some settings. If you don't have one, you need to create one and get the connection string and add it to the settings of the extension.
    I also needed to add manually two connection strings in my application settings for the storage: AzureWebJobsStorage and AzureWebJobsDashboard. You can use the same connection string of course.

  • ooor the good news is this: I found out, that even though the update with the (old/current) version fails because of the empty location parameter, the certificate is created - it is just not bound, which you can do manually.

So, how and where:

  1. go to your application TLS/SSL Settings
  2. go to private key certificates -> you should find at least one new certificate
  3. write the name of the new certificate you want to use (normally the first couple of characters are enough)
  4. go to bindings and click your domain binding
  5. select your new certificate from the dropdown private certificate thumbnail and click ok
  6. et voila - enjoy your 3 months let's encrypt certificate 😃

1

2

Thank you @sjkp for this wonderful and helpful extension!

@JimBobSquarePants
Copy link

1.0.2? The OP is referring to version 1.0.5

@keenthinker
Copy link

@JimBobSquarePants You are right! My mistake (it was late as I wrote the answer) - I see now that the latest version in Azure (and the one that I installed) is 1.0.5.
I got the exact error as described from the OP with the old version (0.6.x) and IMO the certificate is created and can be used, regardless of the error with 1.0.5.

@rgamage
Copy link
Author

rgamage commented May 31, 2020 via email

@Darkmace
Copy link

Darkmace commented Jun 2, 2020

I was also running a (very) old version when i first hit this error. After updating to the latest version and giving it some time to get past the too many certificate (error code: 429) error it is now running without problems.

@samsmithnz
Copy link

I hit this error this morning, after using it for many years with no issues.

@khellang
Copy link

I had the exact same experience as most people here. Been running fine for 2+ years and suddenly it started failing now.

I didn't even have to uninstall the extension first. Just updated it, entered the newly required connection strings and then I hit the "too many certificates already issued for exact set of domains" error.

There was a bunch of valid certs already sitting in my website so all I had to do was manually bind one of them, like @keenthinker mentioned.

Hopefully the renewal process works fine 🤞

@Arrefelt
Copy link

Arrefelt commented Jul 10, 2020

Same thing here, been using Azure Let's Encrypt (No Web Jobs) for years without issues. Got the location null exception, saw this issue and updated to version 1.0.5. Inserted the newly required fields DashboardConnectionString and StorageConnectionString and after hitting next it asks me to wait while app settings are being applied. Problem is this never finishes, have waited for up to 15 minutes:

image

Clicking "click here" tells me DashboardConnectionString and StorageConnectionString are required.

UPDATE: I had inserted AzureWebJobsDashboard and AzureWebJobsStorage into Application settings by mistake, they should be in Connection strings. Once inserted there, it started working again just as before 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants