The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error while run report in mail delivery report

Discussion in 'E-mail Discussions' started by irTech, Sep 6, 2014.

Tags:
  1. irTech

    irTech Member

    Joined:
    Sep 6, 2014
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello
    when i want to run report for delivery emails in whm, i have faced with this error

    Code:
    DeliveryReporter API internal failure: DBD::mysql::db selectall_arrayref failed: Table './eximstats/smtp' is marked as crashed and should be repaired at /usr/local/cpanel/Cpanel/Exception.pm line 96 Cpanel::Exception::new('Cpanel::Exception::Database::Error', 'Cpanel::ExceptionMessage::Raw=SCALAR(0x268e2e0)', 'HASH(0x2b65290)') called at /usr/local/cpanel/Cpanel/Exception.pm line 47 Cpanel::Exception::create('Database::Error', 'Cpanel::ExceptionMessage::Raw=SCALAR(0x268e2e0)', 'HASH(0x2b65290)') called at /usr/local/cpanel/Cpanel/Exception.pm line 55 Cpanel::Exception::create_raw('Database::Error', 'DBD::mysql::db selectall_arrayref failed: Table \'./eximstats...', 'HASH(0x2b65290)') called at /usr/local/cpanel/Cpanel/DBI.pm line 79 Cpanel::DBI::_create_exception('Cpanel::DBI::Mysql::db=HASH(0x2bd6490)', 'DBD::mysql::db selectall_arrayref failed: Table \'./eximstats...', undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 70 Cpanel::DBI::_error_handler('DBD::mysql::db selectall_arrayref failed: Table \'./eximstats...', 'Cpanel::DBI::Mysql::db=HASH(0x2bd6490)', undef) called at /usr/local/cpanel/Cpanel/DeliveryReporter.pm line 477 Cpanel::DeliveryReporter::query('Cpanel::DeliveryReporter=HASH(0x2319e60)', 'success', 1, 'maxsendunixtime', 1410088380, 'inprogress', 1, 'deliverytype', 'all', ...) called at /usr/local/cpanel/bin/emailtrack line 53 eval {...} called at /usr/local/cpanel/bin/emailtrack line 53
     
    ljbernardi likes this.
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    repair the crashed mysql table exactly as the error states "Table './eximstats/smtp' "
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. chewykernel

    chewykernel Registered

    Joined:
    Oct 4, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for this! Problem solved.

     
  5. amitkalra

    amitkalra Member

    Joined:
    Mar 9, 2006
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    This worked for me too, thanks !
     
  6. irTech

    irTech Member

    Joined:
    Sep 6, 2014
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello guys
    i have this problem and did not solved by these commands...
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Do you notice any error messages when running the "mysqlcheck eximstats" command after attempting to repair the database?

    Thank you.
     
  8. John Martin

    John Martin Registered

    Joined:
    Apr 5, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Tyler, Texas
    cPanel Access Level:
    Root Administrator
    I'm having similar issues. When I run `mysqlcheck eximstats` here's the output I get.

    Code:
    root@mail [~]# mysqlcheck eximstats
    eximstats.defers                                   OK
    eximstats.failures
    Error    : Incorrect file format 'failures'
    error    : Corrupt
    eximstats.sends
    Error    : Can't find file: 'sends' (errno: 2)
    status   : Operation failed
    eximstats.smtp
    Error    : Can't find file: 'smtp' (errno: 2)
    status   : Operation failed
    
    It looks like I'm missing the table files :S Anybody know how I can fix this? I don't need to data but I want to get eximstats working again.
     
  9. ssfred

    ssfred Well-Known Member

    Joined:
    Jan 6, 2012
    Messages:
    62
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello

    You can recreate the table structure ( not the data) by executing the following script

    /usr/local/cpanel/bin/updateeximstats
     
  10. John Martin

    John Martin Registered

    Joined:
    Apr 5, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Tyler, Texas
    cPanel Access Level:
    Root Administrator
    Hey ssfred, thanks for the advice! I'm getting errors from that command, too. Here's what it said:
    Code:
    root@mail [~]# /usr/local/cpanel/bin/updateeximstats --verbose
                                                                                                   
    REPLACE INTO user (host, user, password)
        VALUES (
            'localhost',
            'eximstats',
      -- IMPORTANT: Change this password!
            password('REDACTED')
        )
    
                                                                                                   
    REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
                    delete_priv, create_priv, drop_priv)
        VALUES (
            'localhost',
            'eximstats',
            'eximstats',
            'Y', 'Y', 'Y', 'Y',
            'Y', 'Y'
        )
    
    FLUSH PRIVILEGES
    
    CREATE DATABASE IF NOT EXISTS GRANT ALL ON eximstats.* TO 'eximstats'@'localhost' IDENTIFIED BY 'REDACTED'
    
    mysqldiff failed: The “/usr/local/cpanel/3rdparty/perl/514/bin/mysqldiff” command (process 25372) reported error number 2 when it ended.
    Output was: mysqldump failed. Exit status: 2:
    mysqldump: Got error: 130: Incorrect file format 'failures' when using LOCK TABLES
    
    -- MySQL dump 10.13  Distrib 5.5.48, for Linux (x86_64)
    
    --
    
    -- Host: localhost    Database: eximstats
    
    -- ------------------------------------------------------
    
    -- Server version5.5.48-cll
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    
    /*!40101 SET NAMES utf8 */;
    
    /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    
    /*!40103 SET TIME_ZONE='+00:00' */;
    
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    
    I then tried to just drop the database in MySQL but it failed, too.
    Code:
    root@mail [~]# mysql
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 638442
    Server version: 5.5.48-cll MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> DROP DATABASE `eximstats`;
    ERROR 1010 (HY000): Error dropping database (can't rmdir './eximstats', errno: 39)
    mysql>
    
    Awfully strange issue :S I think I'll open up a ticket with cPanel and update this thread they figure the problem out.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    While it's not generally advised to manually move a database directory, you could try moving the database to another location and then regenerating it if you have no email report data you need to preserve. EX:

    Code:
    mkdir /var/mysql-backups
    cp -a /var/lib/mysql/eximstats /var/mysql-backups/
    mysql
    mysql > DROP DATABASE eximstats;
    mysql > quit
    /usr/local/cpanel/bin/updateeximstats
    
    If you want to import data back into the database, 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. You may also want to modify the following option in "WHM Home » Server Configuration » Tweak Settings" under the "Stats and Logs" tab:

    "The interval, in days, to retain Exim stats in the database"

    Reducing this value will decrease the amount of data that is stored in the Eximstats database.

    Thank you.
     
Loading...

Share This Page