Giter VIP home page Giter VIP logo

letsencrypt-webapp-renewer's Introduction

Build status

!! IMPORTANT - YOU PROBABLY DON'T NEED THIS !!

Microsoft has implemented fully-fledged free managed certificate support (including apex/root/naked domains), so it is highly recommended you use that instead: https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-certificate#create-a-free-managed-certificate

However, there might be some edge cases where you'd still need the extension, primarily:

  • Wildcard certs (DNS challenge)
  • Internationalized/punycode domains

If that is the case, read on, but understand:

Since I'm not actively using the project myself, I will not actively develop it, and all new releases (if at all), will be betas

letsencrypt-webapp-renewer

A WebJob-ready console application for renewing Azure Web App TLS/SSL certificates (based on letsencrypt-siteextension and letsencrypt-azure). Officially recommended by Microsoft for Web App Let's Encrypt integration (prior to native feature availability).

Motivation

HTTPS is the pervasive standard for all websites, regardless of size or field. The Mozilla foundation has gone so far as to announce their intent to completely phase out HTTP. Unfortunately, the procurement, maintenance, and renewal of SSL/TLS certificates has been an expensive and manual process for many. Microsoft have recently added built-in support for free SSL certificate renewal (in preview), but at the time of writing it is not available for naked (AKA bare/root/apex) domains. So unless you're OK with your clients encountering a certificate error navigating to https://yoursite.com, that won't be good enough for you.

Enter Let's Encrypt - a free, automated, and open Certificate Authority. Shortly after its release, Simon J.K. Pedersen created the excellent letsencrypt-siteextension Azure Web App extension for easy integration with Azure Web Apps. However, at the time of writing it suffers from several issues:

  • The extension must be installed on the same web app as your site.
    • This means you must install the extension on each and every Web App you own.
    • Worse, if you happen to publish your Web App with the "Delete Existing files", it will silently delete the WebJob created by the extension, effectively nullifying it.
  • The extension setup wizard has been known to fall out of sync with the underlying WebJob it's installing (e.g. fail on missing Web App configuraion)
  • There are no e-mail notifications (you could set some basic ones with Zapier but they won't contain details on the actual renewals that took place).
  • It relies on an Azure Storage account which has to be configured in a certain way, which is an unneeded possible point of failure.
  • The extension can only be run in the context of a web app. You might want to run it as a command-line tool (e.g. from your CI system).

Solution

letsencrypt-webapp-renewer is a WebJob-ready command-line executable that builds upon letsencrypt.azure.core (the core component behind letsencrypt-siteextension) to provide the following features:

  • Install on any Web App (doesn't have to be the same web app for which you want to manage SSL certs).
    • Multiple Web App management is supported.
    • Publishing with "Delete Existing files" has no effect when the WebJob is deployed to a different (preferably dedicated) Web App.
  • Trade off a little convenience (no extension with a setup wizrad) for a higher degree of consistency and reliability
  • E-mail notifications are built in (via SendGrid).
  • No external dependencies other than Let's Encrypt.
  • Can be executed as a plain command-line tool from any environment.

Walkthrough

Microsoft MVP Dixin Yan wrote an end-to-end guide for using letsencrypt-webapp-renewer which you can find here. Feel free to follow it for your convenience, but it is still recommended to read and understand the full documentation as detailed in the sections below.

Preparation

Create an AAD service principal with the proper permissions, as explained here and here. You can skip the parts about configuring the Azure Storage account and the site extension, but while you're there note down the parameters you'll need for the WebJob configuration below: SubscriptionId, TenantId, ResourceGroup, WebApp, ClientId, and ClientSecret.

Configuration

The letsencrypt-webapp-renewer WebJob is configured via Web App Settings. You might as well configure it before installing so that it doesn't run with no/partial configuration by mistake. Note that these settings should be configured on the Web App where the letsencrypt-webapp-renewer WebJob is deployed (NOT on the Web Apps to be renewed). You can also use the configuration script to set/update these values.

  1. Set letsencrypt:webApps to a semicolon-delimited list of Azure Web App names for which certificate renewal should take place.
  2. For each Web App specified in letsencrypt:webApps, set the following app setting with the proper values as noted down in the preparation above (replacing webAppName with the actual Web App name):
    1. letsencrypt:webAppName-subscriptionId
    2. letsencrypt:webAppName-tenantId
    3. letsencrypt:webAppName-resourceGroup
    4. letsencrypt:webAppName-hosts (semicolon-delimited)
    5. letsencrypt:webAppName-email (will be used for both Let's Encrypt registration and e-mail notifications)
    6. letsencrypt:webAppName-fromEmail (will be used for both Let's Encrypt registration and e-mail notifications)
    7. letsencrypt:webAppName-clientId
    8. letsencrypt:webAppName-clientSecret (should be set as a connection string)
    9. letsencrypt:webAppName-servicePlanResourceGroup (optional, defaults to the Web App Resource Group)
    10. letsencrypt:webAppName-useIpBasedSsl (optional, defaults to false)
    11. letsencrypt:webAppName-rsaKeyLength (optional, defaults to 2048)
    12. letsencrypt:webAppName-acmeBaseUri (optional, defaults to https://acme-v02.api.letsencrypt.org/directory)
    13. letsencrypt:webAppName-webRootPath (optional, defaults to %HOME%\site\wwwroot or in case of running from package: %HOME%\site\letsencrypt)
    14. letsencrypt:webAppName-renewXNumberOfDaysBeforeExpiration (optional, defaults to -1 which means renewal will take place regardless of the expiry time)

For more information about the various renewal settings see: https://github.com/sjkp/letsencrypt-siteextension.

Sample configuration

  • letsencrypt:webApps: ohadsoft;howlongtobeatsteam
  • letsencrypt:ohadsoft-subscriptionId: e432f869-4777-4380-a654-3440216992a2
  • letsencrypt:ohadsoft-tenantId: ohadsoft.onmicrosoft.com
  • letsencrypt:ohadsoft-resourceGroup: ohadsoft-rg
  • letsencrypt:ohadsoft-hosts: www.ohadsoft.com;ohadsoft.com;myümlautdomain.de (note the Internationalized Domain Name [IDN] support)
  • letsencrypt:ohadsoft-email: [email protected]
  • letsencrypt:ohadsoft-fromEmail: [email protected]
  • letsencrypt:ohadsoft-clientId: 5e1346b6-7db5-4eae-b9fa-7b3d5e42e6c7
  • (connection string) letsencrypt:ohadsoft-clientSecret: MySecretPassword123
  • letsencrypt:howlongtobeatsteam-subscriptionId: e432f869-4777-4380-a654-3440216992a2
  • letsencrypt:howlongtobeatsteam-tenantId: ohadsoft.onmicrosoft.com
  • letsencrypt:howlongtobeatsteam-resourceGroup: hltbs-rg
  • letsencrypt:howlongtobeatsteam-hosts: www.howlongtobeatsteam.com;howlongtobeatsteam.com
  • letsencrypt:howlongtobeatsteam-email: [email protected]
  • letsencrypt:howlongtobeatsteam-fromEmail: [email protected]
  • letsencrypt:howlongtobeatsteam-clientId: 5e1346b6-7db5-4eae-b9fa-7b3d5e42e6c7
  • (connection string) letsencrypt:howlongtobeatsteam-clientSecret: MySecretPassword123

Sovereign Cloud (Mooncake, BlackForest, etc.)

The following settings are required in order to renew certificates on sovereign clouds:

  1. letsencrypt:webAppName-azureAuthenticationEndpoint
  2. letsencrypt:webAppName-azureTokenAudience
  3. letsencrypt:webAppName-azureManagementEndpoint
  4. letsencrypt:webAppName-azureDefaultWebSiteDomainName

You can run the Get-AzureEnvironment PowerShell cmdlet to get the required values. For more information about configuring sovereign clouds see: https://github.com/sjkp/letsencrypt-siteextension/wiki/Azure-Germany,-US-or-China.

DNS Challenge

You may use the ACME DNS challenge instead of the HTTP challenge. Currently only Azure or GoDaddy DNS is supported.

Azure DNS can be activated using the following configuration:

  1. letsencrypt:webAppName-azureDnsZoneName (e.g. yourDomain.com, note that for Internationalized Domain Names [IDNs] you must use the punycode name e.g xn--mymlautdomain-xob.de)
  2. letsencrypt:webAppName-azureDnsRelativeRecordSetName (e.g. yourSubDomain)
  3. letsencrypt:webAppName-azureDnsTenantId (optional, defaults to Web App Tenant ID)
  4. letsencrypt:webAppName-azureDnsSubscriptionId (optional, defaults to Web App Subscription ID)
  5. letsencrypt:webAppName-azureDnsResourceGroup (optional, defaults to Web App Resource Group)
  6. letsencrypt:webAppName-azureDnsClientId (optional, defaults to Web App Client ID)
  7. letsencrypt:webAppName-azureDnsClientSecret (optional, defaults to Web App Client Secret)

GoDaddy DNS can be activated using the following configuration:

  1. letsencrypt:webAppName-goDaddyDnsApiKey
  2. letsencrypt:webAppName-goDaddyDnsApiSecret
  3. letsencrypt:webAppName-goDaddyDnsDomain (e.g. yourDomain.com)
  4. letsencrypt:webAppName-goDaddyDnsShopperId

DNS Challenge Limitations

  • Only wildcard host names are supported (must begin with *.)
  • App Service Plan and App Service must reside in the same resource group (Azure DNS)
  • renewXNumberOfDaysBeforeExpiration is not supported

Site Deployment Slots

In order to specify a Site Deployment Slot for a given web app, use the following syntax for the web app's name: webAppName{siteSlotName}. For example, if you have a foo site with no deployment slots and a bar site with staging and prod deployment slots, configure letsencrypt:webApps to be foo;bar{staging};bar{prod}. Different deployment slots are treated as different web apps and the normal setting rules apply, so you would still need to configure the regular settings for each of them (e.g. letsencrypt:foo-subscriptionId, letsencrypt:bar{staging}-subscriptionId, letsencrypt:bar{prod}-subscriptionId and so forth).

Shared configuration

It is sometimes useful to share configuraiton settings beween web apps. For example, you might be using the same client credentials, the same subscription ID, or the same resource group for multiple web apps. In order to share a configuration setting between web apps, simply omit the webAppName- component of the configuration key. For example, in order to configure shared client credentials, set the letsencrypt:clientId app setting and letsencrypt:clientSecret connection string. These values will now be used by default for all configured web apps, unless explicitly overriden by setting the fully WebApp-qualified key name (by including the webAppName- component, e.g. letsencrypt:mySpecialSite-clientId).

All settings except hostsmay be shared.

Multiple certificates for a single site

If you have a site that supports many domain names, it can be useful to group them into separate certificates. In order to handle renewing multiple certificates associated with a single site, use the following syntax for the web app's name: webAppName[groupName] or webAppName{siteSlotName}[groupName]. For example, if you have a foo site that has two certificates that need to be updated, configure letsencrypt:webApps to be foo;foo[Group2]. You would still need to configure the regular settings for each of them (e.g. letsencrypt:foo-subscriptionId, letsencrypt:foo[Group2]-subscriptionId and so forth).

Using the configuration script

There is a PowerShell configuration-script Set-LetsEncryptConfiguration.ps1 which can be used to streamline the configuration of multiple Web Apps. Running the script is straightfoward, and further documentation resides inside it.

Installation

  1. (optional but highly recommended) Create a new dedicated Web App for cert renewal, to which you will deploy the letsencrypt-webapp-renewer WebJob. This will drastically decrease the likelihood of accidental deletion of the renewal WebJob (e.g. upon deployment of a different app to the same Web App using Delete Existing files)
  2. Download the latest letsencrypt-webapp-renewer WebJob zip file.
  3. Deploy the WebJob zip file you downloaded above to the Web App where you want cert renewal to execute using one of the following scheduling methods:
    1. CRON based is simple to set up but REQUIRES YOUR CERT RENEWAL WEB APP (THE ONE WHERE THE letsencrypt-webapp-renewer WEBJOB WILL BE RUNNING) TO BE CONFIGURED AS "ALWAYS ON". Note that a settings.job file as described in the docs is unnecessary - when you upload the WebJob in the portal simply select Triggered in the Type field and Scheduled in the Triggers field to be given an option to specify a CRON expression. The recommended Let's Encrypt renewal period is 60 days, so you could use a CRON expression that fires once every two months, for example: 0 0 0 1 1,3,5,7,9,11 *.
    2. Azure Function based is a good option if your App Service plan does not support Always On (Free or Shared).
    3. Azure Logic App based is another good option that does not require Always On
      1. Logic Apps can be configured to run periodically (e.g every 60 days)
      2. Allows easy configuration of notifications (send O365 email, Twilio SMS, etc), as an alternative (or in addition) to SendGrid
      3. Requires one-time configuration of user/password authentication to initiate the WebJob.

ASP.NET Core

  1. Enable ServeUnknownFileTypes for the /.well-known/acme-challenge request path of your Web App.
  2. When targeting a Linux based ASP.NET Core Web App, set the webRootPath to the following (relative) path: ./site/wwwroot/wwwroot.

Notifications

The following are optional but highly recommended.

  1. Set up SendGrid email notifications to notify you of successful renewals:
    1. Set the letsencrypt:SendGridApiKey connection string to your SendGrid API key. At the time of writing, SendGrid offer a free plan in the Azure Marketplace which should easily suffice for this use case.
    2. Configure Single Sender Verification for the email address that SendGrid should send email as.
  2. Set up Zapier to send you notifications on letsencrypt-webapp-renewer WebJob runs. While e-mail notifications are supported as described above, they will not be fired when the WebJob has failed for any reason (this is intentional - a WebJob cannot reliably handle any possible failure it might encounter). By contrast, Zapier operates externally to the WebJob and should be able to report any error that might have caused the WebJob to fail. At the time of writing, Zapier offer a free account which should easily suffice for any reasonable SSL renewal notification needs.
  3. If you created a Logic App to schedule the Web Job, set up notifications using any number of connectors
    1. Gmail
    2. Office 365
    3. Twilio
    4. Or choose another connector

Note that Let's Encrypt will send out expiration e-mails if anything went wrong with the cert renewal process: https://letsencrypt.org/docs/expiration-emails/. However, Let's Encrypt are not aware of Azure Web Apps, so if the cert was renewed successfully but some failure prevented it from actually being installed to your Web App, they would not know and hence no expiration e-mail would be sent from their system. This highlights the importance of the Zapier configuration above.

Verification

Test the WebJob by triggering it manually. You should see a new certificate served when you visit your site.

Command Line usage

When executed outside of a WebJob context (as determined by the absence of the WEBJOBS_NAME environment variable), the WebJob executable (AzureLetsEncryptRenewer.exe) functions as a standalone command-line tool with the following options:

Flag Details
-s, --subscriptionId Required. Subscription ID
-t, --tenantId Required. Tenant ID
-r, --resourceGroup Required. Resource Group
-w, --webApp Required. Web App
-o, --hosts Required. Semicolon-delimited list of hosts to include in the certificate - the first will comprise the Subject Name (SN) and the rest will comprise the Subject Alternative Names (SANs)
-e, --email Required. Recipient (to:) e-mail for Let's Encrypt registration and expiry notifications
--fromEmail Required. Originating (from:) e-mail for Let's Encrypt registration and expiry notifications
-c, --clientId Required. Client ID
-l, --clientSecret Required. Client Secret
-p, --servicePlanResourceGroup Service Plan Resource Group (if not specified, the provided Web App resource group will be used)
-f, --azureDnsTenantId Azure DNS Tenant ID, defaults to Web App Tenant ID
-g, --azureDnsSubscriptionId Azure DNS Subscription ID, defaults to Web App Subscription ID
-j, --azureDnsResourceGroup Azure DNS Resource Group, defaults to Web App Resource Group
-q, --azureDnsClientId Azure DNS Client ID, defaults to Web App Client ID
-v, --azureDnsClientSecret Azure DNS Client Secret, defaults to Web App Client Secret
-z, --azureDnsZoneName Azure DNS Zone Name (e.g. yourDomain.com)
-y, --azureDnsRelativeRecordSetName Azure DNS Relative Record Set Name (e.g. yourSubDomain)
--goDaddyDnsApiKey GoDaddy DNS API key
--goDaddyDnsApiSecret GoDaddy DNS API secret
--goDaddyDnsDomain GoDaddy DNS domain name (e.g. 'yourDomain.com')
--goDaddyDnsShopperId GoDaddy DNS shopper ID
-d, --siteSlotName Site Deployment Slot
-i, --useIpBasedSsl (Default: false) Use IP Based SSL
-k, --rsaKeyLength (Default: 2048) Certificate RSA key length
-a, --acmeBaseUri ACME base URI, defaults to: https://acme-v02.api.letsencrypt.org/directory (for staging use https://acme-staging-v02.api.letsencrypt.org/directory)
-x, --webRootPath Web Root Path for HTTP challenge answer
-n, --renewXNumberOfDaysBeforeExpiration (Default: -1) Number of days before certificate expiry to renew, defaults to a negative value meaning renewal will take place regardless of the expiry time
-h, --azureAuthenticationEndpoint The Active Directory Authority, defaults to: https://login.windows.net/
-u, --azureTokenAudience The Active Directory Service Endpoint Resource ID, defaults to: https://management.core.windows.net/
-m, --azureManagementEndpoint The Resource Manager URL, defaults to: https://management.azure.com
-b, --azureDefaultWebSiteDomainName The Azure Web Sites default domain name, defaults to: azurewebsites.net
--help Display the help screen.
--version Display version information.

Example

AzureLetsEncryptRenewer.exe -s e432f869-4777-4380-a654-3440216992a2 -t ohadsoft.onmicrosoft.com -r ohadsoft-rg -w ohadsoft -o "www.ohadsoft.com;ohadsoft.com" -e [email protected] --fromEmail [email protected] -c 5e1346b6-7db5-4eae-b9fa-7b3d5e42e6c7 -l MySecretPassword123

Exit codes

  • 0 - Success
  • 1 - Bad argument(s)
  • 2 - Unexpected error

Telemetry

letsencrypt-webapp-renewer gathers anonymous telemetry for usage analysis and error reporting. You can disable it by setting the LETSENCRYPT_DISABLE_TELEMETRY environment variable to any non-empty value.

Limitations & Disclaimer

Since this project relies on https://github.com/sjkp/letsencrypt-siteextension, some of its limitations apply as well:

This site-extension is NOT supported by Microsoft it is my own work based on https://github.com/ebekker/ACMESharp and https://github.com/Lone-Coder/letsencrypt-win-simple - this means don't expect 24x7 support, I use it for several of my own smaller sites, but if you are running sites that are important you should consider spending the few $ on a certificate and go with a Microsoft supported way of enabling SSL, so you have someone to blame :)

Note that Let's Encrypt works by providing automated certificates of a short (currently three month) duration. This extension is BETA SOFTWARE. You will need to keep this extension updated or risk losing SSL access when your certificate expires.

Due to rate limiting of Let's Encrypt servers, you can only request five certificates per domain name per week. Configuration errors or errors in this site extension may render you unable to retrieve a new certificate for seven days. If up-time is critical, have a plan for deploying a SSL certificate from another source in place.

No support for multi-region web apps, so if you use traffic manager or some other load balancer to route traffic between web apps in different regions please don't use this extension.

The site-extension will not work with Azure App Service Local Cache

Please take note that this Site-Extension is beta-software, so use at your own risk.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYLEFT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Consult the Let's Encrypt documentation for rate limits: https://letsencrypt.org/docs/rate-limits/

Powered by Resharper

Resharper

letsencrypt-webapp-renewer's People

Contributors

andrewiankidd avatar chrfin avatar djones-rdm avatar haacked avatar intexx avatar jaykay-design avatar johnnyprimus avatar jstack-rdm avatar kijanawoodard avatar lpperras avatar ohadschn avatar profet23 avatar shanselman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

letsencrypt-webapp-renewer's Issues

RenewXNumberOfDaysBeforeExpiration default config value

The default value of -1 for the configuration RenewXNumberOfDaysBeforeExpiration will not work correctly when used with the letsencrypt-siteextension library.

In the library this value will be used to determine which certificates are about to expire by adding it to DateTime.Now. So a -1 would only detect already expired certificates.

I propose to keep this configuration property but align it's default value with the library's - 22 days - and update the readme/code accordingly.

Or, document that if a forced renewal is required set the value to 90 which is the maximum lifetime of a Let'sEncrypt cert, this would then detect any LE certificate as about to expire.

option to use letsencrypt staging environment

When the webjob is misconfigured it restarts over and over again and very quickly blows through the 5 cert/week limit, so it would be great if there was an option to use the letsencrypt staging environment which has much higher limits

Doesn't work together with the local cache feature

Azure App Service has a feature called "Local Cache" that cached the file system of the web app on each instance, see https://docs.microsoft.com/en-us/azure/app-service/app-service-local-cache-overview

I think the problem here is the following:

  • On instance startup, the file system is copied to the instance
  • When the renewer renews the certificate, it stores a verification file in the web apps source storage
  • Since the filesystem of each instance is cached and not shared, the instances don't see the file until the next restart
  • The verification request from Letsencrypt to .well-known/acme-challenge/ fails, because to verification file can't be found in the instance local cache

Any ideas how to work around this? Maybe the verification file could be saved to an Azure Blob Storage instance that is then server from the host instance?

Fails to validate cert when site is deployed using "run from package" option

I ran into an issue where I deployed a new azure web site using the "run from package" approach (https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package).

Because this approach deploys a site in read-only mode, the /.well-known folder needed for the LetsEncrypt validation can't be created on the file system, causing the certificate renewal process to fail.

There's no message indicating this is the specific problem, beyond a 404 when trying to hit the URL. It should be detectable via the presence of a WEBSITE_RUN_FROM_PACKAGE setting.

It also might be worth adding a note to the readme to indicate this is a constraint and that sites should be zip or web deployed instead.

Do you want contributions for this?

Tries to renew every time it runs

I have the feeling that this app tries to renew all certificates every time it runs. It doesn't seem to respect the expiration times.
I have set it to run every day and I am being rate limited although I have only two certificates configured.
I plan on configuring it with a lot more certificates in the future. To avoid the rate limitation, it really should take into consideration the expiration of the certificate. The siteextension even has a setting for that: letsencrypt:RenewXNumberOfDaysBeforeExpiration

Or am I missing something?

ARM Template Deployment

I am struggling to find documentation on how to install the web job via an ARM template deployment. Is this possible using either of the installation methods you recommend? (CRON based or Azure Scheduler)

No Binding to Web App Created

I followed the install instructions and everything worked well except the binding for the SSL was not added to the web app. Once I added it manually, the SSL worked fine.

Is there something missing in the instructions so this binding can be automated?

Create site extension

Would allow for easier deployment (see #9).
Basically the extension will simply install the WebJob.

Shared configuration

In the documentation, it suggests that a shared config may be used by omitting the site info

Shared configuration
It is sometimes useful to share configuraiton settings beween web apps. For example, you might be using the same client credentials, the same subscription ID, or the same resource group for multiple web apps. In order to share a configuration setting between web apps, simply omit the webAppName- component of the configuration key. For example, in order to configure shared client credentials, set the letsencrypt:clientId app setting and letsencrypt:clientSecret connection string. These values will now be used by default for all configured web apps, unless explicitly overriden by setting the fully WebApp-qualified key name (by including the webAppName- component, e.g. letsencrypt:mySpecialSite-clientId).
All settings except hostsmay be shared.

Is this the case? I get the following error, but I have definitely set letsencrypt:clientSecret, so my understanding is that I shouldn't have to set letsencrypt:cpDataCore-clientSecret. Is this right?
config

[06/12/2019 06:45:14 > 7bd804: ERR ]
[06/12/2019 06:45:14 > 7bd804: ERR ] Unhandled Exception: System.Configuration.ConfigurationErrorsException: Missing connection string 'letsencrypt:cpDataCore-clientSecret'
[06/12/2019 06:45:14 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsReader.GetConnectionString(String key) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsReader.cs:line 168
[06/12/2019 06:45:14 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewalParamsReader.ResolveConnectionString(String key, String webApp, String commonConnectionString) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewalParamsReader.cs:line 259
[06/12/2019 06:45:14 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewalParamsReader.GetWebAppRenewalInfo(String webApp, SharedRenewalParameters sharedRenewalParams) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewalParamsReader.cs:line 103
[06/12/2019 06:45:14 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewalParamsReader.<>c__DisplayClass2_0.b__0(String wa) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewalParamsReader.cs:line 35
[06/12/2019 06:45:14 > 7bd804: ERR ] at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() [06/12/2019 06:45:14 > 7bd804: ERR ] at System.Linq.Buffer1..ctor(IEnumerable1 source) [06/12/2019 06:45:14 > 7bd804: ERR ] at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
[06/12/2019 06:45:14 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewalParamsReader.Read() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewalParamsReader.cs:line 35
[06/12/2019 06:45:14 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 29
[06/12/2019 06:45:15 > 7bd804: ERR ] --- End of stack trace from previous location where exception was thrown ---
[06/12/2019 06:45:15 > 7bd804: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[06/12/2019 06:45:15 > 7bd804: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[06/12/2019 06:45:15 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 60
[06/12/2019 06:45:15 > 7bd804: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.Main(String[] args) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 35

renewXNumberOfDaysBeforeExpiration is skipping app on first run

I just created a new web app and used my "65" default for renewXNumberOfDaysBeforeExpiration and was wondering why no certs are created, but then saw in the logs the message:

No certificates installed issued by Let's Encrypt that are about to expire within the next 65 days. Skipping.

I think this is the wrong behavior, even if the message is correct - there is no cert expiring, but only because there is none at all -> if there is no cert I would expect it to request one and not skip it.

Another Option for Scheduling

Hi there!

Aside from some windows file/directory length issues when publishing locally, everything went very smoothly with the use of your app, and I like not relying on web app extensions as much as possible.

Since I am mostly serverless, I do not have a basic or greater app service, and therefore looked to your Scheduler-based recommendation. Scheduler is now also not free ($14/mo at time of writing).

So, I came up with an Azure Functions based approach (Free, or the nearest to Free imaginable): https://github.com/eformedpartners/AzureWebJobScheduler/

What would be required to use your app with it:

  • Delete or stop copying settings.job to deploy.
  • Fill out all of the characteristics of the web app they installed this app on into the Functions App.
  • Set the TimerCRONInterval appsetting with desired CRON (can copy yours if desired).

And that's it!

Just thought I would post it here for others. Up to you if you replace scheduler in the readme with it instead.

Allow re-use of app settings

I find myself re-applying a lot of the same values to multiple sites in a resource groups. A lot could be shared (e.g. letsencrypt:default-subscriptionId, letsencrypt:default-tenantId, etc).

Then when I set up my resource groups correctly, I would only have to add different values for this:

letsencrypt:my-web-app-hosts: mywebhost.mydomain.com

Wrong connection string key for SendGrid

According to the readme, under section Notifications, SendGrid should be configured via "letsencrypt:webAppName-SendGridApiKey Application Setting".

The readme should be updated as the actual configuration is through a connection string with key letsencrypt:SendGridApiKey

Doesn't update site

I looked through the closed issues and didn't see this.
It could also be something I missed in the docs...

I have a dedicated web app with letsencrypt-webapp-renewer running as a web job.
The logs look good and I get an email confirming the new cert.
Wehn I go to the web app that needs https, I see the new cert added to the list of certs, but it's not assigned to the web app.

Is this a known limitation?
Is there something I can do to make this 100% hands free?

Fwiw, this is so much easier than what I was doing with ssl for free that if I have to go in and manually set the cert, so be it. Thanks for working on this!

End-of-Life for All TLS-SNI-01 Validation Support

Hello,

I have received an email about end of TLS-SNI-01 and I am not sure, if this will affect functionality of this awesome project? I am using Azure WebJob Renewal tool from this repo for multiple projects and it works flawlessly - at least for now.

Thank you very much for your work!

Hello,
Action is required to prevent your Let's Encrypt certificate renewals from breaking.
Your Let’s Encrypt client used ACME TLS-SNI-01 domain validation to issue a certificate in the past 60 days.
TLS-SNI-01 validation is reaching end-of-life and will stop working on February 13th, 2019.
You need to update your ACME client to use an alternative validation method (HTTP-01, DNS-01 or TLS-ALPN-01) before this date or your certificate renewals will break and existing certificates will start to expire.

If you need help updating your ACME client, please open a new topic in the Help category of the Let's Encrypt community forum:
https://community.letsencrypt.org/c/help
Please answer all of the questions in the topic template so we can help you.

For more information about the TLS-SNI-01 end-of-life please see our API announcement:
https://community.letsencrypt.org/t/february-13-2019-end-of-life-for-all-tls-sni-01-validation-support/74209
Thank you,
Let's Encrypt Staff

Web Root Path

My Azure Web App (Running a Blazer Application) was always redirecting every request to a subfolder of wwwroot. So that the ACME Challange (.well-known directory) could not be found on the server.

After checking the code of LetsEncrypt.SiteExtension.Core I found the configuration parameter:
letsencrypt:WebRootPath. With this parameter the path of the .well-known directory could be changed.

I suggest adding that parameter into the PowerShell script.

How to deploy to multiple slots with the same site name?

First of all, thanks for this great extension, it's already working great in production. I couldn't find the free scheduled azure tasks, so I went for a free instance and will run it manually every 2 months.

All of my websites have a production and staging version. I have found the letsencrypt:webAppName-siteSlotName setting, but that only allows a single slot to be used for a site?

What I am trying to achieve:

  1. mywebapp
  2. mywebapp-staging:siteSlotName: staging

They are using the same sitename though and use different urls (e.g. myapp.mydomain.com and myapp-staging.mydomain.com).

I also tried creating multiple sites (e.g. postfixing all the settings for a site with -staging), but that didn't seem to work either.

Any ideas how this can be accomplished?

Doesn't create a certificate for the first time

Web job will renew a certificate that already exists, but doesn't create a certificate for the first time like the letsencrypt extension.

This limits it's usefulness, especially for multi-tenanted apps where new domains are added on a regular basis.

Only send single summary email for provioning

Currently you get one email per app service certificate renewal. It'd be nice if this was just a single email with something along the lines of

app-service-name: success
app-service-name: renewal not required
...etc

Cheers!

ARM Template Deployment

I am struggling to find documentation on how to install the web job via an ARM template deployment. Is this possible using either of the installation methods you recommend? (CRON based or Azure Scheduler)

Renewal fails during scheduled job run, but works when web job is started manually.

When the web job runs we get the error below. However, running it manually works. Any help would be appreciated.

[11/01/2018 00:00:30 > b0c2e2: SYS INFO] Status changed to Initializing
[11/01/2018 00:00:38 > b0c2e2: SYS INFO] Run script 'AzureLetsEncryptRenewer.exe' with script host - 'WindowsScriptHost'
[11/01/2018 00:00:38 > b0c2e2: SYS INFO] Status changed to Running
[11/01/2018 00:00:39 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Web App SSL renewal job (renewer) started
[11/01/2018 00:00:39 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Parsing Web Apps for SSL renewal from webjob/site configuration...
[11/01/2018 00:00:39 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Parsed web apps for SSL renewal: spool{beta}; spool; tlstitch
[11/01/2018 00:00:39 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Parsed shared parameters: ResourceGroup: , SubscriptionId: be89b0c3-5854-4dcb-a456-aaabe7d91a5f, TenantId: ser266cornell.onmicrosoft.com, ClientId: 57325623-4186-45f6-8d38-bac45edb5e51, ClientSecret: <SCRUBBED>, Email: [email protected], ServicePlanResourceGroup: , UseIpBasedSsl: , RsaKeyLength: , AcmeBaseUri: , RenewXNumberOfDaysBeforeExpiration: , AuthenticationUri: , AzureTokenAudience: , AzureManagementEndpoint: , AzureDefaultWebsiteDomainName: 
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Parsing SSL renewal parameters for web app 'spool{beta}'...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Parsing SSL renewal parameters for web app 'spool'...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Parsing SSL renewal parameters for web app 'tlstitch'...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Completed parsing of Web App SSL cert renewal information
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Generating SSL certificate with parameters: SubscriptionId: be89b0c3-5854-4dcb-a456-aaabe7d91a5f, TenantId: ser266cornell.onmicrosoft.com, ResourceGroup: spool, WebApp: spool, Hosts: System.String[], Email: [email protected], ClientId: 57325623-4186-45f6-8d38-bac45edb5e51, ClientSecret: <SCRUBBED>, ServicePlanResourceGroup: , SiteSlotName: beta, UseIpBasedSsl: False, RsaKeyLength: 2048, AcmeBaseUri: , RenewXNumberOfDaysBeforeExpiration: -1, AuthenticationUri: , AzureTokenAudience: , AzureManagementEndpoint: , AzureDefaultWebsiteDomainName: 
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Generating secure PFX password for 'spool'...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Adding SSL cert for 'spool'...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40:  - AuthenticationContext: ADAL .NET with assembly version '2.28.3.860', file version '2.28.31117.1411' and informational version '78bd21073cfd91768d97894ace1ba90c5b904eec' is running...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40: f22e3486-201a-4b59-b936-219206b34bad - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:00:40 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:00:40 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:00:40 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:00:40 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (0 items)
[11/01/2018 00:00:40 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:00:40 > b0c2e2: INFO] 	
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40: f22e3486-201a-4b59-b936-219206b34bad - TokenCache: Looking up cache for a token...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40: f22e3486-201a-4b59-b936-219206b34bad - TokenCache: No matching token was found in the cache
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40: f22e3486-201a-4b59-b936-219206b34bad - TokenCache: Storing token in the cache...
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40: f22e3486-201a-4b59-b936-219206b34bad - TokenCache: An item was stored in the cache
[11/01/2018 00:00:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:40: f22e3486-201a-4b59-b936-219206b34bad - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:00:40 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:00:40 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:00:40 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:00:40 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:00:40 > b0c2e2: INFO] 	
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Staring add certificate
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:42: adc83fa3-92e4-4cfe-a26a-f6d2cb91150d - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:00:42 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:00:42 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:00:42 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:00:42 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:00:42 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:00:42 > b0c2e2: INFO] 	
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:42: adc83fa3-92e4-4cfe-a26a-f6d2cb91150d - TokenCache: Looking up cache for a token...
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:42: adc83fa3-92e4-4cfe-a26a-f6d2cb91150d - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:42: adc83fa3-92e4-4cfe-a26a-f6d2cb91150d - TokenCache: 59.957291045 minutes left until token in cache expires
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:42: adc83fa3-92e4-4cfe-a26a-f6d2cb91150d - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:00:42: adc83fa3-92e4-4cfe-a26a-f6d2cb91150d - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:00:42 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:00:42 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:00:42 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:00:42 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:00:42 > b0c2e2: INFO] 	
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Add certificate for acmeConfig hostname beta.pmtaba.com
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : RequestAndInstallInternal
[11/01/2018 00:00:42 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Loading Signer from D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Signer
[11/01/2018 00:00:43 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 
[11/01/2018 00:00:43 > b0c2e2: INFO] Getting AcmeServerDirectory
[11/01/2018 00:00:43 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Loading Registration from D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Registration
[11/01/2018 00:00:53 > b0c2e2: INFO] 
[11/01/2018 00:00:53 > b0c2e2: INFO] Authorizing Identifier beta.pmtaba.com Using Challenge Type http-01
[11/01/2018 00:00:53 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Authorizing Identifier beta.pmtaba.com Using Challenge Type http-01
[11/01/2018 00:00:54 > b0c2e2: INFO]  Answer should now be browsable at http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw
[11/01/2018 00:00:54 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Answer should now be browsable at http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw
[11/01/2018 00:00:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Checking status OK
[11/01/2018 00:00:56 > b0c2e2: INFO]  Submitting answer
[11/01/2018 00:00:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Submitting answer
[11/01/2018 00:00:57 > b0c2e2: INFO]  Refreshing authorization attempt 1
[11/01/2018 00:00:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 1
[11/01/2018 00:00:59 > b0c2e2: INFO]  Refreshing authorization attempt 2
[11/01/2018 00:00:59 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 2
[11/01/2018 00:01:03 > b0c2e2: INFO]  Refreshing authorization attempt 3
[11/01/2018 00:01:03 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 3
[11/01/2018 00:01:09 > b0c2e2: INFO]  Refreshing authorization attempt 4
[11/01/2018 00:01:09 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 4
[11/01/2018 00:01:17 > b0c2e2: INFO]  Refreshing authorization attempt 5
[11/01/2018 00:01:17 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 5
[11/01/2018 00:01:28 > b0c2e2: INFO]  Refreshing authorization attempt 6
[11/01/2018 00:01:28 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 6
[11/01/2018 00:01:40 > b0c2e2: INFO]  Authorization Result: pending
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Auth Result pending
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Authorization Failed pending
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Full Error Details {"IdentifierPart":{"Type":"dns","Value":"beta.pmtaba.com"},"IdentifierType":"dns","Identifier":"beta.pmtaba.com","Uri":"https://acme-v01.api.letsencrypt.org/acme/authz/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs","Status":"pending","Expires":"2018-11-08T00:00:53Z","Challenges":[{"ChallengePart":{"Type":"http-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs/8827126541","Token":"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw","Status":"pending","Validated":null,"Error":null},"Challenge":{"Token":"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw","FileUrl":"http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw","FilePath":".well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw","FileContent":"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw.gqs44cwkyDnSB9ZbQG1Ezn2ITjGqH8Li30KNdJXUO7k","TypeKind":64,"Type":"http-01","Answer":{"KeyAuthorization":"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw.gqs44cwkyDnSB9ZbQG1Ezn2ITjGqH8Li30KNdJXUO7k"}},"Type":"http-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs/8827126541","Token":"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw","Status":"pending","OldChallengeAnswer":{"Key":null,"Value":null},"ChallengeAnswerMessage":null,"HandlerName":null,"HandlerHandleDate":null,"HandlerCleanUpDate":null,"SubmitDate":"2018-11-01T00:00:57.1800384+00:00","SubmitResponse":{"StatusCode":202,"Headers":["Boulder-Requester","Link","Replay-Nonce","Pragma","Connection","Content-Length","Cache-Control","Content-Type","Date","Expires","Location","Server"],"Links":["<https://acme-v01.api.letsencrypt.org/acme/authz/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs>;rel=\"up\""],"RawContent":"ewogICJ0eXBlIjogImh0dHAtMDEiLAogICJzdGF0dXMiOiAicGVuZGluZyIsCiAgInVyaSI6ICJodHRwczovL2FjbWUtdjAxLmFwaS5sZXRzZW5jcnlwdC5vcmcvYWNtZS9jaGFsbGVuZ2UvQTJZdlE5TlRCeHRfdGJoOXhSN2JQZzJWSnpUWVRwWndRTDVfOXhuMDNmcy84ODI3MTI2NTQxIiwKICAidG9rZW4iOiAiRkxQOU56OVd6TWJvbDl5N2NKd3Z2cWIxYzRjMjYxNFBoU3FnejRhc3N0dyIsCiAgImtleUF1dGhvcml6YXRpb24iOiAiRkxQOU56OVd6TWJvbDl5N2NKd3Z2cWIxYzRjMjYxNFBoU3FnejRhc3N0dy5ncXM0NGN3a3lEblNCOVpiUUcxRXpuMklUakdxSDhMaTMwS05kSlhVTzdrIgp9","ContentAsString":"{\n  \"type\": \"http-01\",\n  \"status\": \"pending\",\n  \"uri\": \"https://acme-v01.api.letsencrypt.org/acme/challenge/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs/8827126541\",\n  \"token\": \"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw\",\n  \"keyAuthorization\": \"FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw.gqs44cwkyDnSB9ZbQG1Ezn2ITjGqH8Li30KNdJXUO7k\"\n}","IsError":false,"Error":null,"ProblemDetail":null}}],"Combinations":[[2],[1],[3],[0]]}
[11/01/2018 00:01:40 > b0c2e2: INFO] The ACME server was probably unable to reach http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Unable to reach http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw
[11/01/2018 00:01:40 > b0c2e2: INFO] 
[11/01/2018 00:01:40 > b0c2e2: INFO] Check in a browser to see if the answer file is being served correctly.
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Encountered exception: System.Exception: The Lets Encrypt ACME server was probably unable to reach http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw view error report from Lets Encrypt at https://acme-v01.api.letsencrypt.org/acme/authz/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs for more information
[11/01/2018 00:01:40 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[11/01/2018 00:01:40 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:40 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:40 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext()
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:40 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext()
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:40 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext()
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[11/01/2018 00:01:40 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:40 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Generating SSL certificate with parameters: SubscriptionId: be89b0c3-5854-4dcb-a456-aaabe7d91a5f, TenantId: ser266cornell.onmicrosoft.com, ResourceGroup: spool, WebApp: spool, Hosts: System.String[], Email: [email protected], ClientId: 57325623-4186-45f6-8d38-bac45edb5e51, ClientSecret: <SCRUBBED>, ServicePlanResourceGroup: , SiteSlotName: , UseIpBasedSsl: False, RsaKeyLength: 2048, AcmeBaseUri: , RenewXNumberOfDaysBeforeExpiration: -1, AuthenticationUri: , AzureTokenAudience: , AzureManagementEndpoint: , AzureDefaultWebsiteDomainName: 
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Generating secure PFX password for 'spool'...
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Adding SSL cert for 'spool'...
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:40: 281b0852-3851-4411-b1c8-c4def34c5351 - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:01:40 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:01:40 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:01:40 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:01:40 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:01:40 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:01:40 > b0c2e2: INFO] 	
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:40: 281b0852-3851-4411-b1c8-c4def34c5351 - TokenCache: Looking up cache for a token...
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:40: 281b0852-3851-4411-b1c8-c4def34c5351 - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:40: 281b0852-3851-4411-b1c8-c4def34c5351 - TokenCache: 58.9804100066667 minutes left until token in cache expires
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:40: 281b0852-3851-4411-b1c8-c4def34c5351 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:01:40 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:40: 281b0852-3851-4411-b1c8-c4def34c5351 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:01:40 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:01:40 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:01:40 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:01:40 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:01:40 > b0c2e2: INFO] 	
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Staring add certificate
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:41: 17527ec9-534d-4604-9f38-93b3919dd4dc - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:01:41 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:01:41 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:01:41 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:01:41 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:01:41 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:01:41 > b0c2e2: INFO] 	
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:41: 17527ec9-534d-4604-9f38-93b3919dd4dc - TokenCache: Looking up cache for a token...
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:41: 17527ec9-534d-4604-9f38-93b3919dd4dc - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:41: 17527ec9-534d-4604-9f38-93b3919dd4dc - TokenCache: 58.9707729233333 minutes left until token in cache expires
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:41: 17527ec9-534d-4604-9f38-93b3919dd4dc - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:41: 17527ec9-534d-4604-9f38-93b3919dd4dc - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:01:41 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:01:41 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:01:41 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:01:41 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:01:41 > b0c2e2: INFO] 	
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Add certificate for acmeConfig hostname www.pmtaba.com, pmtaba.com
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : RequestAndInstallInternal
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Loading Signer from D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Signer
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 
[11/01/2018 00:01:41 > b0c2e2: INFO] Getting AcmeServerDirectory
[11/01/2018 00:01:41 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Loading Registration from D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Registration
[11/01/2018 00:01:47 > b0c2e2: INFO] 
[11/01/2018 00:01:47 > b0c2e2: INFO] Authorizing Identifier www.pmtaba.com Using Challenge Type http-01
[11/01/2018 00:01:47 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Authorizing Identifier www.pmtaba.com Using Challenge Type http-01
[11/01/2018 00:01:48 > b0c2e2: INFO]  Answer should now be browsable at http://www.pmtaba.com/.well-known/acme-challenge/CqssVmMpVaybdremcn4W-pY9n_CrkIMvkUbEQyuHJSo
[11/01/2018 00:01:48 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Answer should now be browsable at http://www.pmtaba.com/.well-known/acme-challenge/CqssVmMpVaybdremcn4W-pY9n_CrkIMvkUbEQyuHJSo
[11/01/2018 00:01:49 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Checking status OK
[11/01/2018 00:01:49 > b0c2e2: INFO]  Submitting answer
[11/01/2018 00:01:49 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Submitting answer
[11/01/2018 00:01:50 > b0c2e2: INFO]  Refreshing authorization attempt 1
[11/01/2018 00:01:50 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 1
[11/01/2018 00:01:52 > b0c2e2: INFO]  Authorization Result: valid
[11/01/2018 00:01:52 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Auth Result valid
[11/01/2018 00:01:52 > b0c2e2: INFO]  Deleting answer
[11/01/2018 00:01:52 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Deleting answer
[11/01/2018 00:01:52 > b0c2e2: INFO] 
[11/01/2018 00:01:52 > b0c2e2: INFO] Authorizing Identifier pmtaba.com Using Challenge Type http-01
[11/01/2018 00:01:52 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Authorizing Identifier pmtaba.com Using Challenge Type http-01
[11/01/2018 00:01:52 > b0c2e2: INFO]  Answer should now be browsable at http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4
[11/01/2018 00:01:52 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Answer should now be browsable at http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4
[11/01/2018 00:01:53 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Checking status OK
[11/01/2018 00:01:53 > b0c2e2: INFO]  Submitting answer
[11/01/2018 00:01:53 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Submitting answer
[11/01/2018 00:01:54 > b0c2e2: INFO]  Refreshing authorization attempt 1
[11/01/2018 00:01:54 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 1
[11/01/2018 00:01:56 > b0c2e2: INFO]  Authorization Result: invalid
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Auth Result invalid
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Authorization Failed invalid
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Full Error Details {"IdentifierPart":{"Type":"dns","Value":"pmtaba.com"},"IdentifierType":"dns","Identifier":"pmtaba.com","Uri":"https://acme-v01.api.letsencrypt.org/acme/authz/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys","Status":"invalid","Expires":"2018-11-08T00:01:52Z","Challenges":[{"ChallengePart":{"Type":"tls-sni-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183060","Token":"faYgaP09qW0R9310fwKMTBhISoS4zFGODN4g0Y0ukQs","Status":"invalid","Validated":null,"Error":null},"Challenge":null,"Type":"tls-sni-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183060","Token":"faYgaP09qW0R9310fwKMTBhISoS4zFGODN4g0Y0ukQs","Status":"invalid","OldChallengeAnswer":{"Key":null,"Value":null},"ChallengeAnswerMessage":null,"HandlerName":null,"HandlerHandleDate":null,"HandlerCleanUpDate":null,"SubmitDate":null,"SubmitResponse":null},{"ChallengePart":{"Type":"tls-alpn-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183061","Token":"e7GAWKDCEO-z3G-Cz8z6n61lVI8VKOlpBhUIvqCmTtA","Status":"invalid","Validated":null,"Error":null},"Challenge":null,"Type":"tls-alpn-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183061","Token":"e7GAWKDCEO-z3G-Cz8z6n61lVI8VKOlpBhUIvqCmTtA","Status":"invalid","OldChallengeAnswer":{"Key":null,"Value":null},"ChallengeAnswerMessage":null,"HandlerName":null,"HandlerHandleDate":null,"HandlerCleanUpDate":null,"SubmitDate":null,"SubmitResponse":null},{"ChallengePart":{"Type":"dns-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183063","Token":"YRGVl5oObBMz8R9WQhK7QezEXf3OdEHcRRB2v0xQmHU","Status":"invalid","Validated":null,"Error":null},"Challenge":null,"Type":"dns-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183063","Token":"YRGVl5oObBMz8R9WQhK7QezEXf3OdEHcRRB2v0xQmHU","Status":"invalid","OldChallengeAnswer":{"Key":null,"Value":null},"ChallengeAnswerMessage":null,"HandlerName":null,"HandlerHandleDate":null,"HandlerCleanUpDate":null,"SubmitDate":null,"SubmitResponse":null},{"ChallengePart":{"Type":"http-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183064","Token":"Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4","Status":"invalid","Validated":null,"Error":{"type":"urn:acme:error:connection","detail":"Fetching https://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4: Error getting validation data","status":"400"},"validationRecord":[{"url":"http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4","hostname":"pmtaba.com","port":"80","addressesResolved":["13.90.213.204"],"addressUsed":"13.90.213.204"},{"url":"https://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4","hostname":"pmtaba.com","port":"443","addressesResolved":["13.90.213.204"]}]},"Challenge":null,"Type":"http-01","Uri":"https://acme-v01.api.letsencrypt.org/acme/challenge/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys/8827183064","Token":"Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4","Status":"invalid","OldChallengeAnswer":{"Key":null,"Value":null},"ChallengeAnswerMessage":null,"HandlerName":null,"HandlerHandleDate":null,"HandlerCleanUpDate":null,"SubmitDate":null,"SubmitResponse":null}],"Combinations":[[0],[1],[2],[3]]}
[11/01/2018 00:01:56 > b0c2e2: INFO] The ACME server was probably unable to reach http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Unable to reach http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4
[11/01/2018 00:01:56 > b0c2e2: INFO] 
[11/01/2018 00:01:56 > b0c2e2: INFO] Check in a browser to see if the answer file is being served correctly.
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Encountered exception: System.Exception: The Lets Encrypt ACME server was probably unable to reach http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4 view error report from Lets Encrypt at https://acme-v01.api.letsencrypt.org/acme/authz/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys for more information
[11/01/2018 00:01:56 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[11/01/2018 00:01:56 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:56 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:56 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext()
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:56 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext()
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:01:56 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext()
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[11/01/2018 00:01:56 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:01:56 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Generating SSL certificate with parameters: SubscriptionId: be89b0c3-5854-4dcb-a456-aaabe7d91a5f, TenantId: ser266cornell.onmicrosoft.com, ResourceGroup: tlstitch, WebApp: tlstitch, Hosts: System.String[], Email: [email protected], ClientId: 57325623-4186-45f6-8d38-bac45edb5e51, ClientSecret: <SCRUBBED>, ServicePlanResourceGroup: , SiteSlotName: , UseIpBasedSsl: False, RsaKeyLength: 2048, AcmeBaseUri: , RenewXNumberOfDaysBeforeExpiration: -1, AuthenticationUri: , AzureTokenAudience: , AzureManagementEndpoint: , AzureDefaultWebsiteDomainName: 
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Generating secure PFX password for 'tlstitch'...
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Adding SSL cert for 'tlstitch'...
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:56: 65520fcc-5921-4d1f-b4ba-5c584251aa05 - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:01:56 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:01:56 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:01:56 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:01:56 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:01:56 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:01:56 > b0c2e2: INFO] 	
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:56: 65520fcc-5921-4d1f-b4ba-5c584251aa05 - TokenCache: Looking up cache for a token...
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:56: 65520fcc-5921-4d1f-b4ba-5c584251aa05 - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:56: 65520fcc-5921-4d1f-b4ba-5c584251aa05 - TokenCache: 58.7134728083333 minutes left until token in cache expires
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:56: 65520fcc-5921-4d1f-b4ba-5c584251aa05 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:01:56 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:56: 65520fcc-5921-4d1f-b4ba-5c584251aa05 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:01:56 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:01:56 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:01:56 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:01:56 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:01:56 > b0c2e2: INFO] 	
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Staring add certificate
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:57: 2a091985-16e2-4040-94d9-8073a39919e3 - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:01:57 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:01:57 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:01:57 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:01:57 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:01:57 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:01:57 > b0c2e2: INFO] 	
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:57: 2a091985-16e2-4040-94d9-8073a39919e3 - TokenCache: Looking up cache for a token...
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:57: 2a091985-16e2-4040-94d9-8073a39919e3 - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:57: 2a091985-16e2-4040-94d9-8073a39919e3 - TokenCache: 58.7022736366667 minutes left until token in cache expires
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:57: 2a091985-16e2-4040-94d9-8073a39919e3 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:01:57: 2a091985-16e2-4040-94d9-8073a39919e3 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:01:57 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:01:57 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:01:57 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:01:57 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:01:57 > b0c2e2: INFO] 	
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Add certificate for acmeConfig hostname accounts.threadlearning.com
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : RequestAndInstallInternal
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Loading Signer from D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Signer
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 
[11/01/2018 00:01:57 > b0c2e2: INFO] Getting AcmeServerDirectory
[11/01/2018 00:01:57 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Loading Registration from D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Registration
[11/01/2018 00:02:06 > b0c2e2: INFO] 
[11/01/2018 00:02:06 > b0c2e2: INFO] Authorizing Identifier accounts.threadlearning.com Using Challenge Type http-01
[11/01/2018 00:02:06 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Authorizing Identifier accounts.threadlearning.com Using Challenge Type http-01
[11/01/2018 00:02:06 > b0c2e2: INFO]  Answer should now be browsable at http://accounts.threadlearning.com/.well-known/acme-challenge/3gefRgK57syOobL5JD1BQ3I3TlwnHZlfe3-LcldcXlY
[11/01/2018 00:02:06 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Answer should now be browsable at http://accounts.threadlearning.com/.well-known/acme-challenge/3gefRgK57syOobL5JD1BQ3I3TlwnHZlfe3-LcldcXlY
[11/01/2018 00:02:08 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Checking status OK
[11/01/2018 00:02:08 > b0c2e2: INFO]  Submitting answer
[11/01/2018 00:02:08 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Submitting answer
[11/01/2018 00:02:08 > b0c2e2: INFO]  Refreshing authorization attempt 1
[11/01/2018 00:02:08 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 1
[11/01/2018 00:02:10 > b0c2e2: INFO]  Authorization Result: valid
[11/01/2018 00:02:10 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Auth Result valid
[11/01/2018 00:02:10 > b0c2e2: INFO]  Deleting answer
[11/01/2018 00:02:10 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Deleting answer
[11/01/2018 00:02:10 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : RSAKeyBits: 2048
[11/01/2018 00:02:12 > b0c2e2: INFO] 
[11/01/2018 00:02:12 > b0c2e2: INFO] Requesting Certificate
[11/01/2018 00:02:12 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Requesting Certificate
[11/01/2018 00:02:12 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : certRequ ACMESharp.CertificateRequest
[11/01/2018 00:02:12 > b0c2e2: INFO]  Request Status: Created
[11/01/2018 00:02:12 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Request Status: Created
[11/01/2018 00:02:13 > b0c2e2: INFO]  Saving Certificate to D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\accounts.threadlearning.com-crt.der
[11/01/2018 00:02:13 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Saving Certificate to D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\accounts.threadlearning.com-crt.der
[11/01/2018 00:02:13 > b0c2e2: INFO]  Saving Issuer Certificate to D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\ca-0A0141420000015385736A0B85ECA708-crt.pem
[11/01/2018 00:02:13 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Saving Issuer Certificate to D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\ca-0A0141420000015385736A0B85ECA708-crt.pem
[11/01/2018 00:02:13 > b0c2e2: INFO]  Saving Certificate to D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\accounts.threadlearning.com-all.pfx
[11/01/2018 00:02:13 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Saving Certificate to D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\accounts.threadlearning.com-all.pfx
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 98b69e03-f14d-4c9b-a502-8ae0fa508114 - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:02:14 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:02:14 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:02:14 > b0c2e2: INFO] 	
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 98b69e03-f14d-4c9b-a502-8ae0fa508114 - TokenCache: Looking up cache for a token...
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 98b69e03-f14d-4c9b-a502-8ae0fa508114 - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 98b69e03-f14d-4c9b-a502-8ae0fa508114 - TokenCache: 58.4202319883333 minutes left until token in cache expires
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 98b69e03-f14d-4c9b-a502-8ae0fa508114 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 98b69e03-f14d-4c9b-a502-8ae0fa508114 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:02:14 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:02:14 > b0c2e2: INFO] 	
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Installing certificate D:\home\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\accounts.threadlearning.com-all.pfx on azure with server farm id /subscriptions/be89b0c3-5854-4dcb-a456-aaabe7d91a5f/resourceGroups/app.threadlearning.com/providers/Microsoft.Web/serverfarms/threadlearning
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 6d9c22cd-3d8b-46e3-9cea-f4dcf9bc7531 - AcquireTokenHandlerBase: === Token Acquisition started:
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Authority: https://login.windows.net/ser266cornell.onmicrosoft.com/
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Resource: https://management.core.windows.net/
[11/01/2018 00:02:14 > b0c2e2: INFO] 	ClientId: 57325623-4186-45f6-8d38-bac45edb5e51
[11/01/2018 00:02:14 > b0c2e2: INFO] 	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Authentication Target: Client
[11/01/2018 00:02:14 > b0c2e2: INFO] 	
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 6d9c22cd-3d8b-46e3-9cea-f4dcf9bc7531 - TokenCache: Looking up cache for a token...
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 6d9c22cd-3d8b-46e3-9cea-f4dcf9bc7531 - TokenCache: An item matching the requested resource was found in the cache
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 6d9c22cd-3d8b-46e3-9cea-f4dcf9bc7531 - TokenCache: 58.4111141466667 minutes left until token in cache expires
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 6d9c22cd-3d8b-46e3-9cea-f4dcf9bc7531 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
[11/01/2018 00:02:14 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : 11/01/2018 00:02:14: 6d9c22cd-3d8b-46e3-9cea-f4dcf9bc7531 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Access Token Hash: PHEjzFXAPQZmE0RBrSELqKYsjJd/i7LKtegy8uJOrUY=
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Refresh Token Hash: [No Refresh Token]
[11/01/2018 00:02:14 > b0c2e2: INFO] 	Expiration Time: 11/01/2018 01:00:39 +00:00
[11/01/2018 00:02:14 > b0c2e2: INFO] 	User Hash: null
[11/01/2018 00:02:14 > b0c2e2: INFO] 	
[11/01/2018 00:02:19 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : SSL cert added successfully to 'tlstitch'
[11/01/2018 00:02:19 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Sending e-mail notification for tlstitch... 
[11/01/2018 00:02:22 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Finished sending e-mail notification for: tlstitch
[11/01/2018 00:02:22 > b0c2e2: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Unexpected exception: System.AggregateException: Encountered exception(s) during cert renewal (and/or notification) ---> System.Exception: The Lets Encrypt ACME server was probably unable to reach http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw view error report from Lets Encrypt at https://acme-v01.api.letsencrypt.org/acme/authz/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs for more information
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35
[11/01/2018 00:02:22 > b0c2e2: INFO]    --- End of inner exception stack trace ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 47
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 53
[11/01/2018 00:02:22 > b0c2e2: INFO] ---> (Inner Exception #0) System.Exception: The Lets Encrypt ACME server was probably unable to reach http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw view error report from Lets Encrypt at https://acme-v01.api.letsencrypt.org/acme/authz/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs for more information
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35<---
[11/01/2018 00:02:22 > b0c2e2: INFO] 
[11/01/2018 00:02:22 > b0c2e2: INFO] ---> (Inner Exception #1) System.Exception: The Lets Encrypt ACME server was probably unable to reach http://pmtaba.com/.well-known/acme-challenge/Z3Rdeax7afNBruaCeqSwbJfdnPhFhkPNoJ0HSVPC9M4 view error report from Lets Encrypt at https://acme-v01.api.letsencrypt.org/acme/authz/Clja0OJpg_wuCINArUoM26pA2b3VK5Ryn8jeYzoISys for more information
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[11/01/2018 00:02:22 > b0c2e2: INFO] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35<---
[11/01/2018 00:02:22 > b0c2e2: INFO] 
[11/01/2018 00:02:22 > b0c2e2: ERR ] 
[11/01/2018 00:02:22 > b0c2e2: ERR ] Unhandled Exception: System.AggregateException: Encountered exception(s) during cert renewal (and/or notification) ---> System.Exception: The Lets Encrypt ACME server was probably unable to reach http://beta.pmtaba.com/.well-known/acme-challenge/FLP9Nz9WzMbol9y7cJwvvqb1c4c2614PhSqgz4asstw view error report from Lets Encrypt at https://acme-v01.api.letsencrypt.org/acme/authz/A2YvQ9NTBxt_tbh9xR7bPg2VJzTYTpZwQL5_9xn03fs for more information
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext()
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35
[11/01/2018 00:02:22 > b0c2e2: ERR ]    --- End of inner exception stack trace ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 47
[11/01/2018 00:02:22 > b0c2e2: ERR ] --- End of stack trace from previous location where exception was thrown ---
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 58
[11/01/2018 00:02:22 > b0c2e2: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.Main(String[] args) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 33
[11/01/2018 00:02:23 > b0c2e2: SYS INFO] Status changed to Failed
[11/01/2018 00:02:23 > b0c2e2: SYS ERR ] Job failed due to exit code -532462766

Error running powershell script

Running the powershell script Set-LetsEncryptConfiguration.ps1 i get the following error.

PS C:\Users\acreativefarmer\Desktop> .\Set-LetsEncryptConfiguration.ps1 -LetsEncryptSubscriptionId 915934c2-b82d-49a7-b7bd-246692613bf6 -LetsEncryptResourceGroup Amaka -LetsEncryptWebApp amaka-letsencrypt -SubscriptionId 915934c2-b82d-49a7-b7bd-246692613bf6 -ResourceGroup Amaka -WebApp amaka -ServicePlanResourceGroup Amaka -TenantId 8fc144c3-9142-49ae-bca6-91b7cf04d34e -ClientId 27eda43c-2da8-40b4-a296-10f1229c05c5 -ClientSecret '*********************' -Hosts amaka.travel -Email [email protected]
Signing in to Azure Resource Manager account (use the account that contains your Let's Encrypt renewal web app)...

Account : [email protected]
SubscriptionName : Pagamento a consumo
SubscriptionId : 915934c2-b82d-49a7-b7bd-246692613bf6
TenantId : 8fc144c3-9142-49ae-bca6-91b7cf04d34e
Environment : AzureCloud

Setting context to the Let's Encrypt subscription ID...

Name : [[email protected], 915934c2-b82d-49a7-b7bd-246692613bf6]
Account : [email protected]
Environment : AzureCloud
Subscription : 915934c2-b82d-49a7-b7bd-246692613bf6
Tenant : 8fc144c3-9142-49ae-bca6-91b7cf04d34e
TokenCache : Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache
VersionProfile :
ExtendedProperties : {}

Loading existing Let's Encrypt web app settings...
Copying over existing app settings...
Adding new settings...
Setting 'subscriptionId' to '915934c2-b82d-49a7-b7bd-246692613bf6'...
Value not provided for app setting 'azureDnsSubscriptionId' - skipping...
Setting 'resourceGroup' to 'Amaka'...
Value not provided for app setting 'azureDnsResourceGroup' - skipping...
Setting 'servicePlanResourceGroup' to 'Amaka'...
Setting 'tenantId' to '8fc144c3-9142-49ae-bca6-91b7cf04d34e'...
Value not provided for app setting 'azureDnsTenantId' - skipping...
Setting 'clientId' to '27eda43c-2da8-40b4-a296-10f1229c05c5'...
Value not provided for app setting 'azureDnsClientId' - skipping...
Setting 'hosts' to 'amaka.travel'...
Setting 'email' to '[email protected]'...
Value not provided for app setting 'useIpBasedSsl' - skipping...
Value not provided for app setting 'rsaKeyLength' - skipping...
Value not provided for app setting 'acmeBaseUri' - skipping...
Value not provided for app setting 'webRootPath' - skipping...
Value not provided for app setting 'azureDnsZoneName' - skipping...
Value not provided for app setting 'azureDnsRelativeRecordSetName' - skipping...
Value not provided for app setting 'renewXNumberOfDaysBeforeExpiration' - skipping...
Copying over existing connection strings...
Adding new connection string...
Updating settings...

Set-AzureRmWebApp : AppSetting with name 'letsencrypt:amaka-subscriptionId' is not allowed.
In C:\Users\acreativefarmer\Desktop\Set-LetsEncryptConfiguration.ps1:186 car:1

  • Set-AzureRmWebApp -ResourceGroupName $LetsEncryptResourceGroup -Name ...
  •   + CategoryInfo          : CloseError: (:) [Set-AzureRmWebApp], CloudException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.SetAzureWebAppCmdlet
    

Telemetry improvements

  • Some fields are already collected by AI so it is redundant to log them separately (e.g. Web App name)
  • Some fields are hashed even though they are not considered PII or OII, which is unnecessarily costly on the compute and might hurt supportability (e.g. resource group name - see MSSO for full list).

Email sending skipped despite letsencrypt:SendGridApiKey being set

First time deploying this. Everything worked perfectly first time - great job.
The only exception is that I'm getting an error:
E-mail notification for web app [xxxx] skipped because the 'SendGridApiKey' connection string was not set
However it definitely is set. Could it be a more nuanced error that's not being reported? I only set the key up with Send API access, for example?

Improve retries (first run always errors)

It seems to me that the first run will always error out.

What I did was:

  1. Run with 1 group configured: 2 minutes running => failed
  2. Run without changing anything: 28 seconds running => succes
  3. Run with 8 other groups enabled: 3 minutes running => success

I'm pasting the error below, but I'm not sure it will help because runs right after the first fail tend to succeed. It has something to do with that first run, but I cant think of a reason.

[05/11/2019 06:46:21 > bcf09c: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Answer should now be browsable at http://www.example.com/.well-known/acme-challenge/Jw29L6qSjgSTXje4ggI_GzV0jRH2i1EVRS-zX2eaF-o
[05/11/2019 06:48:02 > bcf09c: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Encountered exception: System.Threading.Tasks.TaskCanceledException: A task was canceled.
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__16.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__17.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__12.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<RenewCore>d__7.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 75
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 34
[05/11/2019 06:48:02 > bcf09c: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Unexpected exception: System.AggregateException: Encountered exception(s) during cert renewal (and/or notification) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__16.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__17.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__12.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<RenewCore>d__7.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 75
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 34
[05/11/2019 06:48:02 > bcf09c: INFO]    --- End of inner exception stack trace ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 46
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 55
[05/11/2019 06:48:02 > bcf09c: INFO] ---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__16.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__17.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: INFO]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__12.MoveNext()
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<RenewCore>d__7.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 75
[05/11/2019 06:48:02 > bcf09c: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: INFO]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 34<---
[05/11/2019 06:48:02 > bcf09c: INFO] 
[05/11/2019 06:48:02 > bcf09c: ERR ] 
[05/11/2019 06:48:02 > bcf09c: ERR ] Unhandled Exception: System.AggregateException: Encountered exception(s) during cert renewal (and/or notification) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: ERR ]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[05/11/2019 06:48:02 > bcf09c: ERR ]    at LetsEncrypt.Azure.Core.Services.BaseHttpAuthorizationChallengeProvider.<Authorize>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: ERR ]    at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext()
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: ERR ]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__16.MoveNext()
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: ERR ]    at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__17.MoveNext()
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
[05/11/2019 06:48:02 > bcf09c: ERR ]    at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__12.MoveNext()
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<RenewCore>d__7.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 75
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 34
[05/11/2019 06:48:02 > bcf09c: ERR ]    --- End of inner exception stack trace ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 46
[05/11/2019 06:48:02 > bcf09c: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/11/2019 06:48:02 > bcf09c: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 60
[05/11/2019 06:48:02 > bcf09c: ERR ]    at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.Main(String[] args) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 35
[05/11/2019 06:48:02 > bcf09c: SYS INFO] Status changed to Failed
[05/11/2019 06:48:02 > bcf09c: SYS ERR ] Job failed due to exit code -532462766

Unabled [sic] to create Azure Web Site Management client

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.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.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

PS script to add config

Hi,

based on Jason Haley's scripts I did create a PS script to easily add new web app's to the config:

.\AddWebAppToLetsEncrypt.ps1 -webAppTarget "AppName" -webAppHosts "appname.com"

Here the script, if someone else wants to use it:

param(
	[string]$webAppTarget,
	[string]$webAppHosts,
	[string]$renewXNumberOfDaysBeforeExpiration = "-1", # set this to e.g. 65 after first request to avoid hitting the cert-limit if the job is triggerd manually more than 5 times
	[string]$tenantId = "<default tenant Id>",
	[string]$subscriptionId = "<default subscription Id>",
	[string]$webAppLetsEncrypt = "<default letsencrypt web app>",
	[string]$resourceGroupLetsEncrypt = "<default resource group of letsencrypt web app>",
	[string]$clientId = "<default client Id>",
	[string]$clientSecret = "<default client secret>",
	[string]$resourceGroupTarget = "<default target resource group>",
	[string]$email = "<default email>")

Login-AzureRmAccount

Set-AzureRmContext -SubscriptionId $subscriptionId

# Load Existing Web App settings for source and target
$webAppSource = Get-AzureRmWebAppSlot -ResourceGroupName $resourceGroupLetsEncrypt -Name $webAppLetsEncrypt -Slot "production"

# Get reference to the source app settings
$appSettingsSource = $webAppSource.SiteConfig.AppSettings

# Create Hash variable for App Settings
$appSettingsTarget = @{}

# Copy over all Existing App Settings to the Hash
ForEach ($appSettingSource in $appSettingsSource) {
    $appSettingsTarget[$appSettingSource.Name] = $appSettingSource.Value
}

# Add new settings
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-clientId"] = $clientId
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-email"] = $email
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-hosts"] = $webAppHosts
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-renewXNumberOfDaysBeforeExpiration"] = $renewXNumberOfDaysBeforeExpiration
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-resourceGroup"] = $resourceGroupTarget
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-subscriptionId"] = $subscriptionId
$appSettingsTarget["letsencrypt:" + $webAppTarget + "-tenantId"] = $tenantId 
if ($appSettingsTarget.ContainsKey("letsencrypt:webApps")) {
	if (!$appSettingsTarget["letsencrypt:webApps"].ToLower().Contains($webAppTarget.ToLower())) {
		$appSettingsTarget["letsencrypt:webApps"] = $appSettingsTarget["letsencrypt:webApps"] + ";" + $webAppTarget
	}
}
else {
	$appSettingsTarget["letsencrypt:webApps"] = $webAppTarget
}

# Save Settings to Target
Set-AzureRmWebAppSlot -ResourceGroupName $resourceGroupTarget -Name $webAppLetsEncrypt -Slot "production" -AppSettings $appSettingsTarget

# Get reference to the source Connection Strings
$connectionStringsSource = $webAppSource.SiteConfig.ConnectionStrings

# Create Hash variable for Connection Strings
$connectionStringsTarget = @{}

# Copy over all Existing Connection Strings to the Hash
ForEach($connStringSource in $connectionStringsSource) {
    $connectionStringsTarget[$connStringSource.Name] = @{ Type = $connStringSource.Type.ToString(); Value = $connStringSource.ConnectionString }
}

# Add new Connection String
$connectionStringsTarget["letsencrypt:" + $webAppTarget + "-clientSecret"] = @{ Type = "Custom"; Value = $clientSecret }

# Save Connection Strings to Target
Set-AzureRmWebAppSlot -ResourceGroupName $resourceGroupTarget -Name $webAppLetsEncrypt -Slot "production" -ConnectionStrings $connectionStringsTarget

Domain name with Cyrillic alphabet

Hello! I have a case in which I need to configure Let's Encrypt renewer with a domain that has Cyrillic characters in the domain name. The domain name is пм-атра.com which is encoded in the form of xn----8sba9bojn.com when you do copy-paste and configure the domain in any web apps. Here's a link to the website(in Bulgarian).
So the problem: In Windows Azure the only way to configure this domain is with the Cyrillic name пм-атра.com. When I set this domain name to the WebJob configuration I get the following error when contacting the Let's Encrypt server:
image
Invalid character in DNS name

When I set the value in WebJob's config to xn----8sba9bojn.com, the WebJob cannot find a configured domain with that name, because in Azure settings it's called пм-атра.com. I tried to remove the пм-атра.com name configuration from the web app domain settings and set it to xn----8sba9bojn.com but Azure does not let me input the domain as xn----8sba9bojn.com.

Is there something that can be done on the application side of the solution, so I could set пм-атра.com as the setting in the WebJob and maybe the app itself could translate it to xn----8sba9bojn.com for the request to the Let's Encrypt server but use it as пм-атра.com for checking and matching Windows Azure's settings?

Acme-challenge answer is not created.

Hello,

I hope that I am placing this in the correct area.

I recently attempted to add letsencrypt to an ASP.NET MVC app hosted on Azure using the renewer with a webjob and I have come across an issue. When I trigger the webjob, it fails when attempting to access the secret file. I have checked my slot's storage and the .well-known directory is not created. I attempted to manually add /.well-known/acme-challenge/ and then trigger the job again, but the directory is never populated.

I have added "routes.IgnoreRoute(".well-known/");" to my RouteConfig, but I would imagine that that is only needed for reading the secret back, but I may be incorrect. On a whim, I enabled FTP access, but as I have not found any mention of it anywhere, I doubt that it is needed.

I have included a portion of the output below. Please let me know if additional information is needed. Any assistance would be appreciated.

[08/14/2018 04:10:24 > 5bde0d: INFO] Access Token Hash: [HASH]
[08/14/2018 04:10:24 > 5bde0d: INFO] Refresh Token Hash: [No Refresh Token]
[08/14/2018 04:10:24 > 5bde0d: INFO] Expiration Time: 08/14/2018 05:10:23 +00:00
[08/14/2018 04:10:24 > 5bde0d: INFO] User Hash: null
[08/14/2018 04:10:24 > 5bde0d: INFO]
[08/14/2018 04:10:24 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Add certificate for acmeConfig hostname www.[DOMAIN].com, [DOMAIN].com
[08/14/2018 04:10:24 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : RequestAndInstallInternal
[08/14/2018 04:10:24 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 :
[08/14/2018 04:10:24 > 5bde0d: INFO] Getting AcmeServerDirectory
[08/14/2018 04:10:24 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Calling Register
[08/14/2018 04:10:28 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Updating Registration
[08/14/2018 04:10:28 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Saving Registration
[08/14/2018 04:10:28 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Saving Signer
[08/14/2018 04:10:28 > 5bde0d: INFO]
[08/14/2018 04:10:28 > 5bde0d: INFO] Authorizing Identifier www.[DOMAIN].com Using Challenge Type http-01
[08/14/2018 04:10:28 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Authorizing Identifier www.[DOMAIN].com Using Challenge Type http-01
[08/14/2018 04:10:29 > 5bde0d: INFO] Answer should now be browsable at http://www.[DOMAIN].com/.well-known/acme-challenge/UlwFr3dl5Os2poVa-sLNr-[SECRET]
[08/14/2018 04:10:29 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Answer should now be browsable at http://www.[DOMAIN].com/.well-known/acme-challenge/UlwFr3dl5Os2poVa-sLNr-[SECRET]
[08/14/2018 04:10:32 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Checking status OK
[08/14/2018 04:10:32 > 5bde0d: INFO] Submitting answer
[08/14/2018 04:10:32 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Submitting answer
[08/14/2018 04:10:33 > 5bde0d: INFO] Refreshing authorization attempt 1
[08/14/2018 04:10:33 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Refreshing authorization attempt 1
[08/14/2018 04:10:35 > 5bde0d: INFO] Authorization Result: invalid
[08/14/2018 04:10:35 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Auth Result invalid
[08/14/2018 04:10:35 > 5bde0d: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Authorization Failed invalid

Thank you.

Time for a new release?

Are you planning on building a new release? The site extension has seen improvements since the latest build as did your procect.

And a different question: does this restart the webapp during/after certification installation?

Adding New Hosts

In our web app we can host multiple sites (hosts) and we routinely add new hosts. Can we re-run the command when adding new hosts?

If so, when adding a new host do we need to include the previous hosts or just the new hosts in the list of host names?
Hosts is a semicolon-delimited list of host names

Support deployment slots

It would be great if you could support deployment slots.
My Web App is named simple-dms and one of my slots is named test
I have tried to configure it like this:

  1. letsencrypt:webApps: simple-dms-test
  2. letsencrypt:webApps: simple-dms(test)
  3. letsencrypt:webApps: simple-dms
    letsencrypt:simple-dms-hosts: simple-dms.test.fire-development.com

Nothing worked.

The first two fail with

Encountered exception: Microsoft.Rest.Azure.CloudException: The Resource 'Microsoft.Web/sites/simple-dms(test)' under resource group 'SimpleDms' was not found."

The third doesn't fail but also doesn't renew the certificate and I am seeing this in the log:

[12/20/2017 11:37:03 > c2d2b2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Starting renew of certificate simple-dms.test.fire-development.com expiration date 6/4/2017 2:51:00 PM
[12/20/2017 11:37:03 > c2d2b2: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Certificate 7ED69005259A90EA11F142E27DBC0C80F0C7BB50 was not assigned any hostname, skipping update

Multiple domains on single app

tl;dr; only one certificate is issued, and one sni ssl binding is made. I would expect at least an automatic binding, and preferrably a certificate per hostname. Now almost all my sites are just listed in subject alternative name, but the actual site content differs quite a lot although coming from the same cms.

(I was writing a more extensive explanation because I didnt even see the single sni ssl binding, but that was just a portal hiccup, but I'm leaving it in after this to be complete.)

I have a dedicated, always-on app service with the renewer job configured. Most of the configs I just used as a shared config. Only one I made specific to the app where I need ssl.

letsencrypt:my-app-hosts => www.site1.com;www.site2.net;www.site3.org
letsencrypt:webApps => my-app

etc. When triggering the job runs fine, and on each site I get a different response to /.well-known/acme-challenge/###...

If I go to my app the ssl settings list a single certificate for the first site in the host list (www.site1.com). The private certificate thumbprint does list all the sites (comma separated).

The first site does work on ssl, but the other ones still load the *.azurewebsites.net certificate. If I go to my-app -> custom domains, only one sni ssl binding is active. I can make the other ones, but I think this needs to be done after every renewal. Is this how its supposed to work?

Support for Run From Package

When trying to use the letsencrypt-webapp-renewer on a web app that is using the Run From Package feature, it fails with error message:

AzureLetsEncryptRenewer.exe Information: 0 : KuduClient PutFile responsecode Conflict responsebody: {"Message":"Could not write to local resource 'D:\home\site\wwwroot\.well-known\acme-challenge\web.config' due to error 'Could not find file 'D:\home\site\wwwroot\.well-known\acme-challenge...

Workaround:

Currently, disabling the Run From Package feature by deleting WEBSITE_RUN_FROM_ZIP = 1 and modifying the build pipeline not deploy using other means seems to be the only option.

What would I want to see instead?

I'd like to be able to use Run From Package** (as it has several benefits).

Any chance this could be supported in future?

Thanks,
--Neno

Alternate ACME baseuri appears to fail when running API under context path

Hi.
It appears that the web job fails when changing the base URI to an alternative CA which is running under a context path and subdomain. It works well with the CertBot client on standard linux-boxes, but fails to read the JSON string when using the following URI for access, https://api.buypass.com/acme/.

My guess is that the ACME sharp library which utilises the URL library, which can truncate when combining a baseuri with the additional query, eg. directory.
If the base URI contains a context path without a trailing /, it will remove the entire relative context path and just append its new relative path.

Eg. https://example.com/test/ will result in https://example.com/test/directory if combined with directory.
https://example.com/test will result in https://example.com/directory if combined with directory.

I have been unable to confirm this suspicion about somewhere in the code either the trailing slash is removed or it fails to identify the context path in the base URL.

Below is a log for testing a FQDN against the https://api.buypass.com/acme/ base URI.
https://api.buypass.com/acme/directory will give you the list of functions.

  • Could you try to verify this or whether it is an alternate cause for this error to occur?
  • What ACME versions is this project compatible with/following?

[05/15/2018 10:49:45 > 8baa90: INFO] AzureLetsEncryptRenewer.exe Information: 0 : Add certificate for acmeConfig hostname [REDACTED FQDN]
[05/15/2018 10:49:45 > 8baa90: INFO] AzureLetsEncryptRenewer.exe Information: 0 : RequestAndInstallInternal
[05/15/2018 10:49:46 > 8baa90: INFO] AzureLetsEncryptRenewer.exe Information: 0 :
[05/15/2018 10:49:46 > 8baa90: INFO] Getting AcmeServerDirectory
[05/15/2018 10:49:46 > 8baa90: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: H. Path '', line 0, position 0.
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.ParseValue()
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.Read()
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
[05/15/2018 10:49:46 > 8baa90: INFO] at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative)
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.Register(RS256Signer signer)
[05/15/2018 10:49:46 > 8baa90: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Encountered exception: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: H. Path '', line 0, position 0.
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.ParseValue()
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.Read()
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
[05/15/2018 10:49:46 > 8baa90: INFO] at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative)
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.Register(RS256Signer signer)
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.d__5.MoveNext()
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext() [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.d__13.MoveNext()
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext() [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73 [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35 [05/15/2018 10:49:46 > 8baa90: INFO] AzureLetsEncryptRenewer.exe Error: 0 : Unexpected exception: System.AggregateException: Encountered exception(s) during cert renewal (and/or notification) ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: H. Path '', line 0, position 0. [05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.ParseValue() [05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.Read() [05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) [05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) [05/15/2018 10:49:46 > 8baa90: INFO] at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative) [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.Register(RS256Signer signer) [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext() [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.d__12.MoveNext()
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext() [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.d__9.MoveNext()
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of inner exception stack trace ---
[05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 47
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 53
[05/15/2018 10:49:46 > 8baa90: INFO] ---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: H. Path '', line 0, position 0.
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.ParseValue()
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.JsonTextReader.Read()
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
[05/15/2018 10:49:46 > 8baa90: INFO] at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
[05/15/2018 10:49:46 > 8baa90: INFO] at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative)
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.Register(RS256Signer signer)
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.Services.AcmeService.d__5.MoveNext()
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.<RequestInternalAsync>d__12.MoveNext() [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
[05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.d__13.MoveNext()
[05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() [05/15/2018 10:49:46 > 8baa90: INFO] at LetsEncrypt.Azure.Core.CertificateManager.<AddCertificate>d__9.MoveNext() [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.<Renew>d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73 [05/15/2018 10:49:46 > 8baa90: INFO] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:46 > 8baa90: INFO] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.<Renew>d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35<--- [05/15/2018 10:49:46 > 8baa90: INFO] [05/15/2018 10:49:50 > 8baa90: ERR ] [05/15/2018 10:49:50 > 8baa90: ERR ] Unhandled Exception: System.AggregateException: Encountered exception(s) during cert renewal (and/or notification) ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: H. Path '', line 0, position 0. [05/15/2018 10:49:50 > 8baa90: ERR ] at Newtonsoft.Json.JsonTextReader.ParseValue() [05/15/2018 10:49:50 > 8baa90: ERR ] at Newtonsoft.Json.JsonTextReader.Read() [05/15/2018 10:49:50 > 8baa90: ERR ] at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) [05/15/2018 10:49:50 > 8baa90: ERR ] at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) [05/15/2018 10:49:50 > 8baa90: ERR ] at ACMESharp.AcmeClient.GetDirectory(Boolean saveRelative) [05/15/2018 10:49:50 > 8baa90: ERR ] at LetsEncrypt.Azure.Core.Services.AcmeService.Register(RS256Signer signer) [05/15/2018 10:49:50 > 8baa90: ERR ] at LetsEncrypt.Azure.Core.Services.AcmeService.<RequestCertificate>d__5.MoveNext() [05/15/2018 10:49:50 > 8baa90: ERR ] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
[05/15/2018 10:49:50 > 8baa90: ERR ] at LetsEncrypt.Azure.Core.CertificateManager.d__12.MoveNext()
[05/15/2018 10:49:50 > 8baa90: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() [05/15/2018 10:49:50 > 8baa90: ERR ] at LetsEncrypt.Azure.Core.CertificateManager.<RequestAndInstallInternalAsync>d__13.MoveNext() [05/15/2018 10:49:50 > 8baa90: ERR ] --- End of stack trace from previous location where exception was thrown --- [05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
[05/15/2018 10:49:50 > 8baa90: ERR ] at LetsEncrypt.Azure.Core.CertificateManager.d__9.MoveNext()
[05/15/2018 10:49:50 > 8baa90: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.Management.RenewalManager.d__6.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal\Management\RenewalManager.cs:line 73
[05/15/2018 10:49:50 > 8baa90: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 35
[05/15/2018 10:49:50 > 8baa90: ERR ] --- End of inner exception stack trace ---
[05/15/2018 10:49:50 > 8baa90: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.AppSettings.AppSettingsRenewer.d__4.MoveNext() in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\AppSettings\AppSettingsRenewer.cs:line 47
[05/15/2018 10:49:50 > 8baa90: ERR ] --- End of stack trace from previous location where exception was thrown ---
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[05/15/2018 10:49:50 > 8baa90: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.WebJobMain(String webjobName) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 58
[05/15/2018 10:49:50 > 8baa90: ERR ] at OhadSoft.AzureLetsEncrypt.Renewal.WebJob.Program.Main(String[] args) in C:\projects\letsencrypt-webapp-renewer\OhadSoft.AzureLetsEncrypt.Renewal\OhadSoft.AzureLetsEncrypt.Renewal.WebJob\Program.cs:line 33
[05/15/2018 10:49:50 > 8baa90: SYS INFO] Status changed to Failed
[05/15/2018 10:49:50 > 8baa90: SYS ERR ] Job failed due to exit code -532462766

Fails on Azure German Cloud

The WebJob is failing on Azure German Cloud. Is it trying to contact the general Azure portal instead of portal.microsoftazure.de?

ERROR: Encountered exception: Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS90038: Confidential Client is not supported in Cross Cloud request.

SendGrid email hosts field

When the hosts field is an array of strings rather than a single value, the SendGrid email does not enumerate them but instead lists the hosts as:

Hosts: System.String[]

Not a big deal but I thought I would flag it.

Great extension! Thanks so much.

Crashes without error message in command line

We used version v0.6.20-prerelease-fix before and everything worked fine. No I tried to use the latest version (0.8.5.1) with the same parameter values (+ the new flags) but it crashes (I guess) without an error message.

This is the console output:

AzureLetsEncryptRenewer.exe Information: 0 : Web App SSL renewal CLI started, parameters: -s, xxx, -t, xxx.onmicrosoft.com, -r, Websites, -w, xxx, -o, xxx.me;www.xxx.me;xxx.xxx.me, -e, [email protected], -c, xxx, -l, xxx
AzureLetsEncryptRenewer.exe Information: 0 : Generating SSL certificate with parameters: SubscriptionId: xxx, TenantId: xxx.onmicrosoft.com, ResourceGroup: Websites, WebApp: xxx, Hosts: System.String[], Email: [email protected], ClientId: xxx, ClientSecret: <SCRUBBED>, ServicePlanResourceGroup: , SiteSlotName: , UseIpBasedSsl: False, RsaKeyLength: 2048, AcmeBaseUri: , RenewXNumberOfDaysBeforeExpiration: -1, AuthenticationUri: , AzureTokenAudience: , AzureManagementEndpoint: , AzureDefaultWebsiteDomainName: 
AzureLetsEncryptRenewer.exe Information: 0 : Generating secure PFX password for 'xxx'...
AzureLetsEncryptRenewer.exe Information: 0 : Adding SSL cert for 'xxx'...
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:51:  - AuthenticationContext: ADAL .NET with assembly version '2.28.3.860', file version '2.28.31117.1411' and informational version '78bd21073cfd91768d97894ace1ba90c5b904eec' is running...
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:51: 1a9ddb93-d7ba-4837-b72d-8a6bc75713dc - AcquireTokenHandlerBase: === Token Acquisition started:
	Authority: https://login.windows.net/xxx.onmicrosoft.com/
	Resource: https://management.core.windows.net/
	ClientId: ecfc594a-6596-46c8-ae98-3b1f3a01fcc8
	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (0 items)
	Authentication Target: Client
	
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:51: 1a9ddb93-d7ba-4837-b72d-8a6bc75713dc - TokenCache: Looking up cache for a token...
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:51: 1a9ddb93-d7ba-4837-b72d-8a6bc75713dc - TokenCache: No matching token was found in the cache
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:52: 1a9ddb93-d7ba-4837-b72d-8a6bc75713dc - TokenCache: Storing token in the cache...
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:52: 1a9ddb93-d7ba-4837-b72d-8a6bc75713dc - TokenCache: An item was stored in the cache
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:52: 1a9ddb93-d7ba-4837-b72d-8a6bc75713dc - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
	Access Token Hash: xxx
	Refresh Token Hash: [No Refresh Token]
	Expiration Time: 04/13/2018 14:13:51 +00:00
	User Hash: null
	
AzureLetsEncryptRenewer.exe Information: 0 : Staring add certificate
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:54: 26322595-f289-424d-a4e2-4bb0a347b4e4 - AcquireTokenHandlerBase: === Token Acquisition started:
	Authority: https://login.windows.net/xxx.onmicrosoft.com/
	Resource: https://management.core.windows.net/
	ClientId: xxx
	CacheType: Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache (1 items)
	Authentication Target: Client
	
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:54: 26322595-f289-424d-a4e2-4bb0a347b4e4 - TokenCache: Looking up cache for a token...
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:54: 26322595-f289-424d-a4e2-4bb0a347b4e4 - TokenCache: An item matching the requested resource was found in the cache
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:54: 26322595-f289-424d-a4e2-4bb0a347b4e4 - TokenCache: 59.9543393283333 minutes left until token in cache expires
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:54: 26322595-f289-424d-a4e2-4bb0a347b4e4 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
AzureLetsEncryptRenewer.exe Information: 0 : 04/13/2018 13:13:54: 26322595-f289-424d-a4e2-4bb0a347b4e4 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
	Access Token Hash: xxx
	Refresh Token Hash: [No Refresh Token]
	Expiration Time: 04/13/2018 14:13:51 +00:00
	User Hash: null
	
AzureLetsEncryptRenewer.exe Information: 0 : Add certificate for acmeConfig hostname xxx.me, www.xxx.me, xxx.xxx.me
AzureLetsEncryptRenewer.exe Information: 0 : RequestAndInstallInternal
AzureLetsEncryptRenewer.exe Information: 0 : Loading Signer from C:\Users\xxx\Downloads\letsencrypt\OhadSoft.AzureLetsEncrypt.Renewal.WebJob-0.8.5.1\App_Data\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Signer
AzureLetsEncryptRenewer.exe Information: 0 : 
Getting AcmeServerDirectory
AzureLetsEncryptRenewer.exe Information: 0 : Loading Registration from C:\Users\xxx\Downloads\letsencrypt\OhadSoft.AzureLetsEncrypt.Renewal.WebJob-0.8.5.1\App_Data\siteextensions\letsencrypt\config\httpsacme-v01.api.letsencrypt.org\Registration

Authorizing Identifier xxx.me Using Challenge Type http-01
AzureLetsEncryptRenewer.exe Information: 0 : Authorizing Identifier xxx.me Using Challenge Type http-01

I tried it with different websites but its always the same problem. For now I use the old version again but I hope you can help me to get the new version running.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.