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.

Strange cPanel Backup MySql Error - Troubleshooting Advice?

Discussion in 'Data Protection' started by BlackRain, Oct 3, 2014.

  1. BlackRain

    BlackRain Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Server Info:

    Code:
    CENTOS 5.11 i686 standard – saturn
    WHM 11.44.1 (build 18) 
    Apache/2.2.26
    MySql 5.5.37-cll
    
    In reviewing our daily Cpanel backup logs, we encountered this error. This error only occurs in one specific domain being backed up. I have checked, optimized, repaired the existing databases, but the error persists.

    Anyone have a plan for troubleshooting this? Would this error bar a successful account restore?

    Thanks

    BlackRain

    Sample backup log

    Code:
    Copy userdata...Done
    Copy custom virtualhost templates...Done
    Leaving timeout safety mode
    Copying mailman lists and archives....
    Done
    Copying homedir.............
    .........
    .........
    .........
    Done
    Calculating nobody files............
    Done
    Entering timeout safety mode
    Determining mysql dbs...DBD::mysql::db selectall_arrayref failed: Got error 'empty (sub)expression' from regexp
     at Cpanel/Exception.pm line 96
    	Cpanel::Exception::new('Cpanel::Exception::Database::Error', 'Cpanel::ExceptionMessage::Raw=SCALAR(0x874b0d8)', 'HASH(0xa1e4d48)') called at Cpanel/Exception.pm line 47
    	Cpanel::Exception::create('Database::Error', 'Cpanel::ExceptionMessage::Raw=SCALAR(0x874b0d8)', 'HASH(0xa1e4d48)') called at Cpanel/Exception.pm line 55
    	Cpanel::Exception::create_raw('Database::Error', 'DBD::mysql::db selectall_arrayref failed: Got error \'empty (sub...', 'HASH(0xa1e4d48)') called at /usr/local/cpanel/Cpanel/DBI.pm line 79
    	Cpanel::DBI::_create_exception('Cpanel::DBI::Mysql::db=HASH(0xa1de844)', 'DBD::mysql::db selectall_arrayref failed: Got error \'empty (sub...', undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 70
    	Cpanel::DBI::_error_handler('DBD::mysql::db selectall_arrayref failed: Got error \'empty (sub...', 'Cpanel::DBI::Mysql::db=HASH(0xa1de844)', undef) called at bin/admin/Cpanel/cpmysql line 225
    ...mysql version: 5.5......mysqldump version: 5.5...Saving mysql privs...Done
    ERROR 1139 (42000) at line 1: Got error 'empty (sub)expression' from regexp
    ...Done
    
    Skipping Logaholic Backup. Logaholic is globally disabled on this system.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    BlackRain Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    For the domain affected this what I found:

    Code:
    DEMO=0
    DNS=domain.com
    DNS1=
    The other domains on the server only have:

    DNS=domain2.com but no DNS1 variable
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, the issue is that it's an empty entry. It's likely a parked domain name was not correctly removed from the account at some point in time. Please remove the empty entry from the following files:

    Code:
    /var/cpanel/userdata/$username/main 
    /var/cpanel/userdata/$username/$primarydomain
    /var/cpanel/users/$username
    /etc/userdatadomains
    Then, run the following command:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
  5. BlackRain

    BlackRain Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Thank you. It does appear that there was a parked domain that was borked at some point.

    I made a backup copy of the original files and then deleted the offending sections. Rebuilt httpd.conf and restarted Apache. Will check the backup log to check that the error is gone.

    I will advise tomorrow.

    Thanks!
     
  6. BlackRain

    BlackRain Well-Known Member

    Joined:
    May 28, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Checked the backup log today and the error has now been cleared. Cheers!
     
  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
    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
Loading...

Share This Page