Troubleshooting

March 5, 2024

ID 182962

This section provides information to help you solve problems you might encounter when using Kaspersky Scan Engine.

If you encounter a problem that is not mentioned in this section, turn on logging, repeat the actions that preceded the problem, and then send the logs and configuration files to your TAM.

Problem: Kaspersky Scan Engine does not start after system reboot and could not be started with systemctl

The cause of this problem might be that the /opt/ directory is located on a mounted device. When Kaspersky Scan Engine initializes after reboot, the device is not yet mounted and the operating system cannot find systemd unit files for Kaspersky Scan Engine.

To solve this problem, try the following actions:

  1. Disable Kaspersky Scan Engine services:
    • systemctl disable klScanEngineUI
    • For HTTP mode:

      systemctl disable kavhttpd

    • For ICAP mode:

      systemctl disable kavicapd

  2. Delete symbolic links to Kaspersky Scan Engine configuration files:

    rm /etc/klScanEngineUI.xml /etc/kavhttpd.xml /etc/kavicapd.xml

  3. Copy Kaspersky Scan Engine unit files to /etc/systemd/system/:
    • cp /opt/kaspersky/ScanEngine/etc/klScanEngineUI.service /etc/systemd/system/klScanEngineUI.service
    • For HTTP mode:

      cp /opt/kaspersky/ScanEngine/etc/kavhttpd.service /etc/systemd/system/kavhttpd.service

    • For ICAP mode:

      cp /opt/kaspersky/ScanEngine/etc/kavicapd.service /etc/systemd/system/kavicapd.service

  4. Copy Kaspersky Scan Engine configuration files to /etc/:
    • cp /opt/kaspersky/ScanEngine/etc/klScanEngineUI.xml /etc/klScanEngineUI.xml
    • For HTTP mode:

      cp /opt/kaspersky/ScanEngine/etc/kavhttpd.xml /etc/kavhttpd.xml

    • For ICAP mode:

      cp /opt/kaspersky/ScanEngine/etc/kavicapd.xml /etc/kavicapd.xml

  5. Reload systemd:

    systemctl daemon-reload

  6. Enable the Kaspersky Scan Engine services to start on system boot:
    • systemctl enable klScanEngineUI
    • For HTTP mode:

      systemctl enable kavhttpd

    • For ICAP mode:

      systemctl enable kavicapd

  7. Start Kaspersky Scan Engine services:
    • service klScanEngineUI start
    • For HTTP mode:

      service kavhttpd start

    • For ICAP mode:

      service kavicapd start

Problem: Kaspersky Scan Engine does start and does not print logs

The cause of this problem might be that Kaspersky Scan Engine cannot find klScanEngineUI.xml, or that the file is corrupted and Kaspersky Scan Engine cannot read it.

  • To find the solution to this problem, check the log files that are created in the /tmp/ subdirectory of the Kaspersky Scan Engine installation directory.

Problem: An error occurred while loading data by the Kaspersky Scan Engine GUI (the dashboard or scan results page)

The cause of this problem is a failure of Kaspersky Scan Engine to connect to the kavebase database or read data from it.

To solve this problem, try the following actions:

  • Check whether the PostgreSQL instance is running.
  • Check whether the PostgreSQL instance is accessible from your Kaspersky Scan Engine instance.
  • Check whether the kavebase database persists in the PostgreSQL instance.

    If not, create the kavebase database as described in section "Manual installation (Linux)".

  • Check whether the scanengine database user persists in the PostgreSQL instance.

    If not, create the scanengine database user as described in section "Manual installation (Linux)".

Problem: The Kaspersky Scan Engine GUI is not displayed in a browser

To solve this problem, try the following actions:

  • Check that the Kaspersky Scan Engine instance and the klScanEngineUI service are running.
  • Check that you are using a supported browser.
  • Check that the klScanEngineUI.xml configuration file contains the following:
    • The value specified in the ServerSettings > EnableUI field is true.
    • The ServerSettings > ConnectionString element contains one of the following IP addresses:
      • 127.0.0.1

        In this case, the Kaspersky Scan Engine GUI is accessible from the same computer on which Kaspersky Scan Engine is installed.

      • A network IP address

        In this case, the Kaspersky Scan Engine GUI is accessible over the network.

        Make sure that the firewall does not block access to the computer on which Kaspersky Scan Engine is installed.

Problem: Untrusted connection error when connecting to the Kaspersky Scan Engine GUI

The SSL certificates that are generated during the installation of Kaspersky Scan Engine are self-signed, so the browser you use informs you of an untrusted connection.

To solve this problem, try the following:

Problem: An error occurred while saving settings in the Kaspersky Scan Engine GUI

  • Check whether the settings that you have specified are correct.
  • Check the status of the kavhttpd or kavicapd service by running one of the commands:
    • service kavhttpd status
    • service kavicapd status

Problem: An error occurred while deleting the database during uninstallation, database "kavebase" is being accessed by other users

Probable cause: someone else is connected to the kavebase database (for example, using pgAdmin).

Solution: run the following query to kavebase:

SELECT *, pg_terminate_backend(pid)

FROM pg_stat_activity

WHERE pid <> pg_backend_pid()

AND datname = 'kavebase';

Problem: psql not recognized as an internal or external command

This problem may occur in Windows. To solve it, add the PostgreSQL bin directory to the PATH environment variable.

In Windows, do the following:

  1. Go to Control Panel -> System and Security -> System -> Advanced system settings -> Environment variables...

    The Environment variables dialog opens.

  2. In the list of System Variables (the lower half of the dialog), select Path, and then click Edit.
  3. Click New, and then type in the path to the PostgreSQL bin directory (for example C:\Program Files\PostgreSQL\13\bin).
  4. Save changes by clicking OK in all of the dialogs.

Problem: SCRAM authentication requires libpq version 10 or above

This problem can occur when installing Kaspersky Scan Engine if you are using PostgreSQL 13 and the password_encryption value differs from md5.

To solve this problem, do the following:

  1. In the postgresql.conf configuration file, set the password_encryption parameter to md5.

    Save changes.

  2. Restart PostgreSQL:

    systemctl restart postgresql-13

  3. Update the password for the database user with administrator rights (for example, the user postgres), which will be used when installing Kaspersky Scan Engine:

    alter user postgres with password '%PASSWORD%';

  4. Make sure that the authentication method is set to md5 in the pg_hba.conf file.
  5. Retry the installation of Kaspersky Scan Engine.

Problem: The Kaspersky Scan Engine GUI does not display events (the dashboard or scan results page)

This problem can occur if the kavebase database is damaged.

To solve this problem, do the following:

  1. Stop the following processes:
    • klScanEngineUI
    • kavhttpd (HTTP mode) or kavicapd (ICAP mode)
  2. Delete the kavebase database by running the following command:

    DROP DATABASE kavebase;

  3. Create a new kavebase database by running the following command:

    CREATE DATABASE kavebase OWNER %owner%;

    Here, %owner% is the user that was created for working with kavebase during the installation of Kaspersky Scan Engine.

  4. Import the tables.sql file from the %service_dir%/samples directory by running the following command:

    psql -d kavebase -a -f tables.sql

  5. Restart the processes that you stopped in step 1.

After this operation, the admin password for Kaspersky Scan Engine GUI will be restored to the default one and all previous events will be deleted.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.