Why is MetaDefender Core unable to connect to the database?

Issue

MetaDefender Core fails to connect to the database. The following is displayed when connecting to the MetaDefender Core web console:

The following error is displayed in the core.log:

Cause

The ometascan_postegres.cat and ometascan_postgres.dat files have become corrupted.

Remediation Steps

  1. Stop the MetaDefender Core Service
  2. Backup the corrupted Files

Backup the corrupted ometascan_postgres.dat and ometascan_postgres.cat files to a different location for future reference.

  • Windows: The files are located in the Core’s installation folder.
  • Linux: The files are located at:
  1. Remove the Corrupted Files ometascan_postgres.dat and ometascan_postgres.cat files.

Delete the corrupted ometascan_postgres.dat and ometascan_postgres.cat files.

  • Windows: Navigate to the Core’s installation folder and delete the files.
  • Linux: Run the following commands:
  1. Create the Ignition File

Create an ignition file with the specified content.

  • Windows: Create C:\opswat\ometascan.conf
  • Linux: Create /etc/opswat/ometascan.conf

Add the following content to the file:

Example of an ignition file using bundled postgres:

Customers who specified an instance name during initial Core installation will need to enter the correct value for instance_name in the ignition file. If not, Core will initiate a new database with the default instance name.

Example:

If customers have configured a private user for their database and want to reuse this private user, they need to ensure that correct private_username and private_password are set in the ignition file.

Example:

  1. Re-generate ometascan_postgres.cat and ometascan_postgres.dat

Windows

  1. Open Command Prompt as Administrator
  2. Navigate to the MetaDefender Core’s installation folder.
  3. Run the following command:

Linux

Export:

Run the upgrade database tool using:

Change the owner and set permissions for the newly generated ometascan_postgres.cat and ometascan_postgres.dat files:

  1. Start MetaDefender Core Service

Conclusion

Following these steps should resolve the issue of MetaDefender Core failing to connect to the database due to configuration files corruption. If the problems persist, please contact OPSWAT support for further assistance.

VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
On This Page