Project 18

Registered
Sep 28, 2015
3
0
1
Atlanta
cPanel Access Level
Root Administrator
Can you please tell me what is causing this error and how to fix it?

[cpbackup] “/usr/local/cpanel/bin/pkgacct” reported error code “255” when it ended. at /usr/local/cpanel/scripts/cpbackup line 1122.

Any help is appreciated.
 
Last edited by a moderator:

Project 18

Registered
Sep 28, 2015
3
0
1
Atlanta
cPanel Access Level
Root Administrator
I appreciate your help. Here's the log:
Code:
[2016-01-10 21:22:07 +0000] Copying Counter Data....[2016-01-10 21:22:07 +0000] Copying Bandwidth Data....Summary databases …DBD::SQLite::db selectrow_array failed: database disk image is malformed

at /usr/local/cpanel/Cpanel/Exception.pm line 151.

Cpanel::Exception::new("Cpanel::Exception::Database::Error", Cpanel::ExceptionMessage::Raw=SCALAR(0x344a218), HASH(0x4952900)) called at /usr/local/cpanel/Cpanel/Exception.pm line 57

Cpanel::Exception::create("Database::Error", Cpanel::ExceptionMessage::Raw=SCALAR(0x344a218), HASH(0x4952900)) called at /usr/local/cpanel/Cpanel/Exception.pm line 72

Cpanel::Exception::create_raw("Database::Error", "DBD::SQLite::db selectrow_array failed: database disk image i"..., HASH(0x4952900)) called at /usr/local/cpanel/Cpanel/DBI.pm line 105

Cpanel::DBI::_create_exception(Cpanel::DBI::SQLite::db=HASH(0x4954ae8), "DBD::SQLite::db selectrow_array failed: database disk image i"..., undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 93

Cpanel::DBI::_error_handler("DBD::SQLite::db selectrow_array failed: database disk image i"..., Cpanel::DBI::SQLite::db=HASH(0x4954ae8), undef) called at /usr/local/cpanel/Cpanel/BandwidthDB/Base.pm line 107

Cpanel::BandwidthDB::Base::_get_schema_version(Cpanel::BandwidthDB::Read=HASH(0x48e6200)) called at /usr/local/cpanel/Cpanel/BandwidthDB/Read.pm line 102

Cpanel::BandwidthDB::Read::_check_for_outdated_schema(Cpanel::BandwidthDB::Read=HASH(0x48e6200)) called at /usr/local/cpanel/Cpanel/BandwidthDB/Read.pm line 91

Cpanel::BandwidthDB::Read::new("Cpanel::BandwidthDB::Read", "shyamdas") called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 181

Cpanel::BandwidthDB::try {...} () called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80

eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71

Try::Tiny::try(CODE(0x48b7d20), Try::Tiny::Catch=REF(0x48c4c10)) called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 186

Cpanel::BandwidthDB::_try_to_create_instance("Cpanel::BandwidthDB::Read", "shyamdas") called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 197

Cpanel::BandwidthDB::try {...} () called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80

eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71

Try::Tiny::try(CODE(0x48c4748), Try::Tiny::Catch=REF(0x48c4d78)) called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 206

Cpanel::BandwidthDB::_try_to_create_instance_with_schema_update("Cpanel::BandwidthDB::Read", "shyamdas") called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 165

Cpanel::BandwidthDB::_instantiate_for_root(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/BandwidthDB.pm line 84

Cpanel::BandwidthDB::get_reader_for_root(__CPANEL_HIDDEN__) called at bin/pkgacct.pl line 1603

Script::Pkgacct::_save_bandwidth_data_to_dest("shyamdas", "/backup/cpbackup/daily/shyamdas/bandwidth_db.json") called at bin/pkgacct.pl line 1592

Script::Pkgacct::copy_bandwidth_data_to_work_dir("shyamdas", "/backup/cpbackup/daily/shyamdas") called at bin/pkgacct.pl line 682

Script::Pkgacct::script("Script::Pkgacct", "shyamdas", "/backup/cpbackup/daily", "backup") called at bin/pkgacct.pl line 180

[cpbackup] “/usr/local/cpanel/bin/pkgacct” reported error code “255” when it ended. at /usr/local/cpanel/scripts/cpbackup line 1122.

[cpbackup] Failed to back up account shyamdas
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
It's likely the bandwidth data is corrupted. Please run the following commands to see if it addresses the issue:

Code:
mv /root/.bwusage.sqlite /root/.bwusage.sqlite-bak
/scripts/build_bandwidthdb_root_cache_in_background
You may also have corrupted bandwidth data for the individual account, which you can move out of the way via:

Code:
mv /var/cpanel/bandwidth/username.sqlite /root/username.sqlite.backup
Thank you.
 

cPMatthewV

Quality Assurance Analyst
Apr 11, 2014
21
16
128
Houston, Tx
cPanel Access Level
Root Administrator
As of cPanel 54 the above instructions have changed for rebuilding the root bandwidth database. To rebuild this on cPanel 54 systems and above please run the following.
Code:
mv /var/cpanel/bandwidth_cache.sqlite{,.bak}
scripts/build_bandwidthdb_root_cache_in_background