Troubleshooting

This section describes how to troubleshoot Approval Engine (AE).

About Approval Engine Logs

AE has three levels of logging:

  • INFO
  • DEBUG (default)
  • TRACE

We recommend the following logging level changes:

  • After a significant period of stable AE work, for example, 6 months, change the log level to INFO to reduce the log volume.
  • Always change the logging level to DEBUG 3 months prior to upgrading AE.
  • In case of difficult and hard-to-reproducible issues, change to the most verbose TRACE level.

To change the AE logging level, complete the following steps:

  1. Connect to a CloudBlue Commerce management node using SSH as root:
  2. Save the AE deployment configuration to a file:

    kubectl get deployment approvalengineapp -o yaml > ae.yml
  3. Edit the AE_LOG_LEVEL value in this file to, for example, TRACE, and save the changes:

    - name: AE_LOG_LEVEL
    value: TRACE
  4. Apply the updated configuration to AE using this command:

    kubectl apply -f ae.yml

To read logs you can use the command kubectl logs; the following are several examples of how to use it:

Get the name of AE pod:
# kubectl get pod --selector app=approvalengineapp
NAME                                 READY   STATUS    RESTARTS   AGE
approvalengineapp-5cb78db545-ppdkb   1/1     Running   0          14d

Display all AE logs from a specific date:
# kubectl logs --selector app=approvalengineapp --since-time=2020-05-20T00:00:00Z

Display the last 100 lines in the log:
# kubectl logs --tail=100 approvalengineapp-5cb78db545-ppdkb
# kubectl logs --tail=100 --selector app=approvalengineapp

Watch the log in real time:
# kubectl logs -f approvalengineapp-5cb78db545-ppdkb --tail=1

You can find more details about kubectl in the kubernetes documentation.

About AE Periodic Tasks

AE adds the following periodic tasks to CloudBlue Commerce:

  • The Approval Engine xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Approval Engine clean-up periodic task runs once a day and deletes all approval requests processed more than 365 days ago. You can change this interval in the AE application instance configuration. To do this, complete the following steps:

    1. Log in to the Provider Control Panel.
    2. Go to ServicesApplications and switch to the System Applications tab.
    3. Click the Approval Engine application.
    4. Open the AE instance and switch to the Settings tab.
    5. Click Edit and set the number of days to keep the information about processed requests.
    6. Click Submit to save the changes.
  • The Approval Engine xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Approval Management Auto Request Processor periodic task runs every 10 minutes and applies the default action configured in the corresponding workflow to timed-out requests. Check this task in case of any issues with automatic processing of requests.