How to rebuild exim stats database on cPanel Server?

Symptoms

If you are experiencing corruption in the sqlite database such as:

[2716099] [2020-08-19 04:00:23 -0300] [Cpanel::TailWatch::Eximstats] [ERR] SQL Failed with error ((XID fjsv3e) The system received an error from the “SQLite” database “/var/cpanel/eximstats_db.sqlite3”: SQLITE_CONSTRAINT (UNIQUE constraint failed: failures.sendunixtime, failures.msgid, failures.email, failures.deliveredto)):

You will need to rebuild the exim database.

Procedure:

1. Stop tailwatchd

/scripts/restartsrv_tailwatchd --stop

2. Stop eximstats

/scripts/restartsrv_eximstats --stop

3. Move the eximstats database

mv /var/cpanel/eximstats_db.sqlite3 /var/cpanel/eximstats_db.sqlite3.original

4. Recreate the database

/usr/local/cpanel/bin/updateeximstats

5. Import exim data

/scripts/import_exim_data /var/log/exim_mainlog

6. Regenerate the database

/scripts/slurp_exim_mainlog --force

7. Restart eximstats

/scripts/restartsrv_eximstats

8. Restart tailwatchd

/scripts/restartsrv_tailwatchd --start
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...

How to Secure a cPanel/WHM Web Server

Here are a few basic steps that you should keep in mind for keeping a server secure. 1) Strong...