Strange cPanel Backup MySql Error - Troubleshooting Advice?

BlackRain

Well-Known Member
May 28, 2003
51
0
156
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello :)

Do you have any empty "DNS=" lines in the /var/cpanel/users/$username file for this account?

Thank you.
 

BlackRain

Well-Known Member
May 28, 2003
51
0
156
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
 

cPanelMichael

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

BlackRain

Well-Known Member
May 28, 2003
51
0
156
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!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Checked the backup log today and the error has now been cleared. Cheers!
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.