Troubleshooting and Managing Keyfactor ACME

The following are some troubleshooting tips and guidance on specific issues you may encounter.

Logs

When troubleshooting, multiple logs can be helpful resources:

Keyfactor ACME Installations on Windows

By default for Windows installations, Keyfactor ACME logs are found at C:\Keyfactor\logs\ACME_log.txt on the Keyfactor ACME server. There are two configuration files that funnel log information to the same output file. These are in the following paths by default:

C:\Program Files\Keyfactor\ACME\Configuration\Configuration\NLog.config
C:\Program Files\Keyfactor\ACME\API\Configuration\NLog.config

The first controls log output for configuration of the Keyfactor ACME server (running the configure tool). The second controls log output for API requests.

If you wish to change these defaults:

  1. On the Keyfactor ACME server where you wish to adjust logging, open a text editor (e.g. Notepad) using the Run as administrator option.
  2. In the text editor, browse to open the NLog.config file(s) in the configuration directory for the component you wish to update under the directory in which you installed the Keyfactor ACME server. By default, these are the following directories:

    C:\Program Files\Keyfactor\ACME\Configuration\Configuration\NLog.config
    C:\Program Files\Keyfactor\ACME\API\Configuration\NLog.config
  3. Your NLog.config files may have a slightly different layout than shown here, but will contain the fields highlighted in the below figure. The fields you may wish to edit are:
    • The path and file name of the active Keyfactor ACME log file:

      fileName="C:\Keyfactor\logs\ACME_Log.txt"
    • The path and file name of previous days' Keyfactor ACME log files:

      archiveFileName="C:\Keyfactor\logs\ACME_Log_Archive_{#}.txt"

      The Keyfactor ACME server rotates log files daily and names the previous files using this naming convention.

    • The number of archive files to retain before deletion:

      maxArchiveFiles="2"
    • The level of log detail that should be generated:

      name="*" minlevel="Info"

      The default Info level logs error and some informational data but at a minimal level to avoid generating large log files. For troubleshooting, it may be desirable to set the logging level to Debug or Trace. Available log levels (in order of increasing verbosity) are:

      • OFF – No logging

      • FATAL – Log severe errors that cause early termination

      • ERROR – Log severe errors and other runtime errors or unexpected conditions that may not cause early termination

      • WARN – Log errors and use of deprecated APIs, poor use of APIs, almost errors, and other runtime situations that are undesirable or unexpected but not necessarily wrong

      • INFO – Log all of the above plus runtime events (startup/shutdown)

      • DEBUG – Log all of the above plus detailed information on the flow through the system

      • TRACE – Maximum log information—this option can generate VERY large log files

Figure 13: NLog.config File for the Keyfactor ACME

Keyfactor ACME Installations in Containers (Kubernetes)

By default, the Keyfactor ACME installed in containers under Kubernetes outputs logging information to the standard Kubernetes logging system and generates file system logs at the Info logging level. The logging level can be configured in the custom values file with the workloadDefaults > logLevel parameterClosed A parameter or argument is a value that is passed into a function in an application.. For a complete list of the parameters, see Values File Settings for Containers Under Kubernetes. The supported log levels are:

  • OFF

    No logging

  • FATAL

    Log severe errors that cause early termination

  • ERROR

    Log severe errors and other runtime errors or unexpected conditions that may not cause early termination

  • WARN

    Log errors and use of deprecated APIs, poor use of APIs, almost errors, and other runtime situations that are undesirable or unexpected but not necessarily wrong

  • INFO

    Log all of the above plus runtime events (startup/shutdown)

  • DEBUG

    Log all of the above plus detailed information on the flow through the system

  • TRACE

    Maximum log information—this option can generate VERY large log files

The maximum size and number of logs to retain are controlled with the following Kubernetes configuration settings:

  • containerLogMaxWorkers

  • containerLogMonitorInterval

For more information, see:

https://kubernetes.io/docs/concepts/cluster-administration/logging/#log-rotation

In addition, log customizations can be added using a custom nlog.config file to add, for example, log filters or reference third-party libraries or other files that support log aggregation.

For container installations under Kubernetes, custom NLog configuration can be added with either a ConfigMap or a PersistentVolume. If you’re just adding filters, a ConfigMap is the simpler route. If you need to include libraries or other files for log aggregation, you’ll need a PersistentVolume.

Keyfactor ACME Server Management Tools

The Keyfactor ACME server can be managed with the following tools:

  • Installations on Windows (IIS): The command-line tool has several useful commands for querying and managing a Keyfactor ACME implementations on Windows (see Keyfactor ACME Command Line Tool).

  • Installations in Container (Kubernetes): The Keyfactor ACME API has several endpoints for managing Keyfactor ACME implementations in container (see Keyfactor ACME API).

Keyfactor ACME Metadata Custom Extension to Run PowerShell Scripts

Log messages from the PowerShell script will be recorded in the server logs with a level of Error, Warn, or Info, depending on the message type.

  • Error-level messages indicate issues that typically result in enrollment failure. Any errors printed or thrown by the PowerShell script will be logged as Error and cause the enrollment to fail.

  • Warning messages from the PowerShell script will be logged as Warn but may not cause enrollment failure.

  • Information messages from the PowerShell script will be logged as Info for general logging purposes.

Error Messages: "All authorizations were not finalized by the CA"

If you encounter this error, one possible solution is to deactivate the validator on the Keyfactor ACME server that does a domain check between the name of the machine running the CertBot tool and the domain the certificate is requested for. See Validators and the Identifiers Command for more information.