exim stats failing, can't run mail reports

Bashed

Well-Known Member
Dec 18, 2013
143
4
68
cPanel Access Level
Root Administrator
Code:
[email protected] [/scripts]# mysqlcheck --repair eximstats
eximstats.defers                                   OK
eximstats.failures
error    : Can't create new tempfile: './eximstats/failures.TMD'
status   : Operation failed
Running mail report, getting this error

[email protected] [/scripts]# mysqlcheck --repair eximstats
eximstats.defers OK
eximstats.failures
error : Can't create new tempfile: './eximstats/failures.TMD'
status : Operation failed
Already ran forced cPanel upgrade, restarted EXIM, MySQL. Still no fix.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello :)

Is there any data in the failures table that you wish to preserve? If not, you can drop the table via phpMyAdmin or the MySQL command line environment and regenerate it via:

Code:
/usr/local/cpanel/bin/updateeximstats
If you want to import the data back into the table, you can use a command such as:

Code:
/scripts/import_exim_data /var/log/exim_mainlog*
Note that this command take a while to complete, depending on the amount of data logged to the Exim log.

Thank you.
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
You will loose all data in this table by doing this, but it should resolve your issue.

Code:
# mysql -e "drop table eximstats.sends"
# mysql eximstats < /usr/local/cpanel/etc/eximstats_db.sql
 

Motamedi

Well-Known Member
Mar 14, 2015
81
0
6
Iran , Tehran
cPanel Access Level
Root Administrator
You will loose all data in this table by doing this, but it should resolve your issue.

Code:
# mysql -e "drop table eximstats.sends"
# mysql eximstats < /usr/local/cpanel/etc/eximstats_db.sql

My problem is not resolved with the command


You may also want to verify if you have available disk space and inodes on your system:

Code:
df -h
df -i
Thank you.
[email protected] [/]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 537G 361G 149G 71% /
tmpfs 12G 0 12G 0% /dev/shm
/dev/sda2 504M 104M 375M 22% /boot
/usr/tmpDSK 4.0G 170M 3.6G 5% /tmp

[email protected] [/]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda3 35749888 12159360 23590528 35% /
tmpfs 3068109 1 3068108 1% /dev/shm
/dev/sda2 32768 52 32716 1% /boot
/usr/tmpDSK 262144 2305 259839 1% /tmp
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
Is it the same error?

Does that file already exist.
Code:
# stat /var/lib/mysql/eximstats/sends.TMD
 

Motamedi

Well-Known Member
Mar 14, 2015
81
0
6
Iran , Tehran
cPanel Access Level
Root Administrator
just this error after repair is my problem

eximstats.defers OK
eximstats.failures OK
eximstats.sends
error : Can't create new tempfile: './eximstats/sends.TMD'
status : Operation failed
eximstats.smtp OK
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Is there any data in the failures table that you wish to preserve? If not, you can drop the entire eximstats database via phpMyAdmin or the MySQL command line environment and regenerate it via:

Code:
/usr/local/cpanel/bin/updateeximstats
If you want to import the data back into the table, you can use a command such as:

Code:
/scripts/import_exim_data /var/log/exim_mainlog*
Note that this command take a while to complete, depending on the amount of data logged to the Exim log.

Thank you.
 

oviliz

Member
Feb 23, 2013
12
0
1
cPanel Access Level
Root Administrator
Without loosing the mail queue, the right solution is (at least in my case):
# myisamchk -r -f sends.MYI

And then:
# mysqlcheck --repair eximstats
 

Motamedi

Well-Known Member
Mar 14, 2015
81
0
6
Iran , Tehran
cPanel Access Level
Root Administrator
I've run all the commands
But the problem is not resolved
Again was error

Error from delivery reporter: DBD::mysql::db selectall_arrayref failed: Table './eximstats/sends' is marked as crashed and last (automatic?) repair failed

How can this problem be solved forever?

thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
You can find the instructions in my initial response to this thread. Let me know if you need help with any of those instructions.

Thank you.