teknom

Member
May 20, 2016
24
0
1
Turkey
cPanel Access Level
Root Administrator
hi, after upgrading to whm 58.0 (build 19) mail tracking logs showing 4 times for each receiving mail. only 1 mail comes but delivery reports say 4 times received (time stamps are the same too)
how can i fix this?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

CPANEL-7723 was recently published with cPanel 58.0.12 to address an issue where multiple tailwatchd processes resulted in incorrect email counts in the eximstats database:

Implemented case CPANEL-7723: Prevent multiple copies of tailwatchd from being started.

The following thread provides instructions on resetting the data in the eximstats database if you were affected by this issue:

error while run report in mail delivery report

Thank you.
 

teknom

Member
May 20, 2016
24
0
1
Turkey
cPanel Access Level
Root Administrator
@CpanelMichael
my whm ver is 11.58.0.19
i moved eximstats mysql db to mysql-backups dir and
i tried your linked solution, but i can not find updateeximstats on directory /usr/local/cpanel/bin/updateeximstats
it failed updateeximstats script did not found.
after your answer at Error when using mail delivery report
i tried
/usr/local/cpanel/bin/updateeximstats
this command and it gives this error
Code:
# /usr/local/cpanel/bin/updateeximstats
updateeximstats: synchronizing database schema
Cpanel::Exception::Database::Error/(XID em7mmc) Database Error: Table 'sends' already exists
at /usr/local/cpanel/Cpanel/Exception.pm line 73.
  Cpanel::Exception::create("Database::Error", Cpanel::ExceptionMessage::Raw=SCALAR(0x337e438), HASH(0x337ed50)) called at /usr/local/cpanel/Cpanel/Exception.pm line 90
  Cpanel::Exception::create_raw("Database::Error", "Database Error: Table 'sends' already exists", HASH(0x337ed50)) called at /usr/local/cpanel/Cpanel/DBI.pm line 193
  Cpanel::DBI::_create_exception(Cpanel::DBI::Mysql::db=HASH(0x33735d8), "DBD::mysql::db do failed: Table 'sends' already exists", undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 178
  Cpanel::DBI::_error_handler("DBD::mysql::db do failed: Table 'sends' already exists", Cpanel::DBI::Mysql::db=HASH(0x33735d8), undef) called at /usr/local/cpanel/bin/updateeximstats line 116
  main::_execute_mysql("verbose", 0, "dbh", Cpanel::DBI::Mysql::db=HASH(0x33735d8), "sql", "CONNECT eximstats;\x{a}CREATE TABLE sends (\x{a}  mailtime datetime N"...) called at /usr/local/cpanel/bin/updateeximstats line 96
and i check eximstats db on phpmyadmin only "defers" and "failures" tables created
i delete eximstats db and move back this db from mysql-backup for rollback this operation
now i am at starting point again :)


 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
i delete eximstats db and move back this db from mysql-backup for rollback this operation
Check to ensure the database isn't corrupted with a command such as:

Code:
mysqlcheck eximstats
If it's not corrupted, you should be able to successfully use the instructions at:

error while run report in mail delivery report

Let us know if this does not work.

Thank you.
 

teknom

Member
May 20, 2016
24
0
1
Turkey
cPanel Access Level
Root Administrator
thanks michael this solution reset my eximstats db but the problem is occured, the mail logs still dublicated with 4 times
image.prntscr.com/image/301c416bb0a9405ab1da9d9d44647181.png
 
Last edited by a moderator:

teknom

Member
May 20, 2016
24
0
1
Turkey
cPanel Access Level
Root Administrator
i did something and mail trace logs stoped duplicating. i hope this wont occur again

# ps -elf | grep tailwatch
0 S root 7126 17090 0 80 0 - 28162 pipe_w 13:54 pts/0 00:00:00 grep --color=auto tailwatch
5 S root 11165 1 0 80 0 - 25569 hrtime 02:10 ? 00:00:10 tailwatchd
5 S root 12252 1 0 80 0 - 25645 hrtime Aug03 ? 00:04:00 tailwatchd
and killed older process 12252 that duplication fixed

now i am looking a script for delete duplicated records on eximstats database
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
now i am looking a script for delete duplicated records on eximstats database
The data comes from /var/log/exim_mainlog, so the duplicate data isn't removed until enough time passes, or you manually delete and re-create the eximstats database.

Note that CPANEL-6436 in cPanel version 58.0.23 will address an issue where multiple tailwatchd processes resulted in incorrect email counts in the eximstats database:

Fixed case CPANEL-6436: Prevent tailwatchd from starting multiple processes.

Thank you.