exim stats failing, can't run mail reports

Bashed

Well-Known Member
Dec 18, 2013
146
4
68
cPanel Access Level
Root Administrator
Code:
root@server7 [/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

root@server7 [/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,880
2,268
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.
 

Motamedi

Well-Known Member
Mar 14, 2015
83
0
56
Iran , Tehran
cPanel Access Level
Root Administrator
hello ,
My problem is not resolved with the command !!!


root@server [/]# mysqlcheck -r eximstats
eximstats.defers OK
eximstats.failures OK
eximstats.sends
error : Can't create new tempfile: './eximstats/sends.TMD'
status : Operation failed
eximstats.smtp OK
root@server [/]#

please help me for solved this problem

thanks
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
error : Can't create new tempfile: './eximstats/sends.TMD'
You may also want to verify if you have available disk space and inodes on your system:

Code:
df -h
df -i
Thank you.
 

Motamedi

Well-Known Member
Mar 14, 2015
83
0
56
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.
root@server [/]# 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

root@server [/]# 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
807
160
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
My problem is not resolved with the command
Could you elaborate if there's a new error message, or if the same error continues? Were there any errors when running those commands?

Thank you.
 

Motamedi

Well-Known Member
Mar 14, 2015
83
0
56
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,880
2,268
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Without loosing the mail queue
Keep in mind that no actual email data is stored in the "eximstats" database. Only information about email activity is stored in the database.

Thank you.
 

Motamedi

Well-Known Member
Mar 14, 2015
83
0
56
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,880
2,268
463
New I've run all the commands
Could you verify which commands you ran? Did you try dropping the "eximstats" database completely and regenerating it, as mentioned earlier in this thread?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
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.