[Case 189301] Month out of range error

cotswoldphoto

Active Member
Feb 20, 2015
25
3
3
cPanel Access Level
Root Administrator
I have just upgraded my server to cPanel 11.50 and now in cPanel stats window I see this error and then the normal stats below it, with this hidden message:

Code:
Month '2013' out of range 0..11 at /usr/local/cpanel/Cpanel/Localtime.pm line 50.
at /usr/local/cpanel/Cpanel/API/StatsBar.pm line 48.
    Cpanel::API::StatsBar::get_stats(Cpanel::Args=HASH(0x74f1f70), Cpanel::Result=HASH(0x74bb3d8)) called at /usr/local/cpanel/Cpanel/API.pm line 176
    Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 248
    eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 248
    Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x74bb3d8), CODE(0x753dbb8)) called at /usr/local/cpanel/Cpanel/API.pm line 176
    Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x74f1f70), Cpanel::Result=HASH(0x74bb3d8), "StatsBar", "get_stats") called at /usr/local/cpanel/Cpanel/API.pm line 48
    Cpanel::API::_execute("StatsBar", "get_stats", HASH(0x45d3678)) called at /usr/local/cpanel/Cpanel/StatsBar.pm line 56
    Cpanel::StatsBar::api2_stat("infinitylang", "true", "rowcounter", "mainstats", "display", "diskusage|filesusage|bandwidthusage") called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 118
    eval {...} called at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 118
    Cpanel::Api2::Exec::api2_exec("StatsBar", "stat", HASH(0x7535be8), HASH(0x4290b20)) called at cpanel.pl line 1046
    main::real_cpexectag("<?cp StatsBar::stat(\x{a}            [tr class=\"row-%\"]\x{a}         "...) called at cpanel.pl line 4322
    main::dotag_finished_headers(0) called at cpanel.pl line 4102
    main::cpanel_parseblock("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN"...) called at cpanel.pl line 4053
    main::y(GLOB(0x7406a78)) called at cpanel.pl line 3162
    main::doinclude("/usr/local/cpanel/base/frontend/x3/branding//index.html", 0, 1) called at /usr/local/cpanel/Cpanel/cpanel.pm line 187
    Cpanel::cpanel::__ANON__() called at /usr/local/cpanel/Cpanel/cpanel.pm line 170
    Cpanel::cpanel::_trap_defaultfh(CODE(0x73f7c50)) called at /usr/local/cpanel/Cpanel/cpanel.pm line 190
    Cpanel::cpanel::_wrap_include("/usr/local/cpanel/base/frontend/x3/branding//index.html", 0, 1) called at /usr/local/cpanel/Cpanel/API/Branding.pm line 59
    Cpanel::API::Branding::include(Cpanel::Args=HASH(0x7414868), Cpanel::Result=HASH(0x726bc98)) called at /usr/local/cpanel/Cpanel/API.pm line 176
    Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 248
    eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 248
    Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x726bc98), CODE(0x726adf8)) called at /usr/local/cpanel/Cpanel/API.pm line 176
    Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x7414868), Cpanel::Result=HASH(0x726bc98), "Branding", "include") called at /usr/local/cpanel/Cpanel/API.pm line 48
    Cpanel::API::_execute("Branding", "include", HASH(0x726b8f0)) called at /usr/local/cpanel/Cpanel/Branding.pm line 57
    Cpanel::Branding::Branding_include("index.html") called at cpanel.pl line 1740
    eval {...} called at cpanel.pl line 1740
    main::_api1("Branding", "branding", "include(index.html)", "include", ARRAY(0x7268ad0), "safe_html_encode", undef, undef) called at cpanel.pl line 1670
    main::real_exectag("<?cp StatsBar::stat(\x{a}            [tr class=\"row-%\"]\x{a}         "...) called at cpanel.pl line 4319
    main::dotag_finished_headers(0) called at cpanel.pl line 4139
    main::cpanel_parseblock("<cpanel Branding=\"include(index.html)\">\x{a}") called at cpanel.pl line 4053
    main::y(GLOB(0x69375a0)) called at cpanel.pl line 5425
    main::run_standard_mode() called at cpanel.pl line 838
I checked inodes and usage was just 1%
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello,

Internal case number 189301 should address this issue by better handling invalid dates in SQLite bandwidth conversions. You can monitor our change log for this case number at:

cPanel - Change Logs

The following command will strip out any time stamp which doesn't begin with four digits before being followed by a period:

Code:
BACKDIR=/root/bw-backup; mkdir -p $BACKDIR; find /var/cpanel/bandwidth \( -name \*.5min -o -name \*.hour \) -exec egrep -l '^[0-9]{5,}\.' {} \+ | sort | uniq | xargs --no-run-if-empty -IFILE sh -c "cp -v FILE ${BACKDIR}; perl -i -n -e 'if ( ! /^[0-9]{5,}\./ ) { print; }' FILE"
Let us know if this command addresses the issue.

Thank you.
 

cotswoldphoto

Active Member
Feb 20, 2015
25
3
3
cPanel Access Level
Root Administrator
Hello,

Internal case number 189301 should address this issue by better handling invalid dates in SQLite bandwidth conversions. You can monitor our change log for this case number at:

cPanel - Change Logs

The following command will strip out any time stamp which doesn't begin with four digits before being followed by a period:

Code:
BACKDIR=/root/bw-backup; mkdir -p $BACKDIR; find /var/cpanel/bandwidth \( -name \*.5min -o -name \*.hour \) -exec egrep -l '^[0-9]{5,}\.' {} \+ | sort | uniq | xargs --no-run-if-empty -IFILE sh -c "cp -v FILE ${BACKDIR}; perl -i -n -e 'if ( ! /^[0-9]{5,}\./ ) { print; }' FILE"
Let us know if this command addresses the issue.

Thank you.
Hi

I assume that you mean to execute this from the command line as root. Did that. No feedback from the server, and no effect. Would it be reasonable to assume that this issue is already known, and a fix will be forthcoming in a future release of cPanel? In which case, I can wait.

Trevor
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Yes, this issue is now addressed in cPanel version 11.50.0.9. I am happy to see you are no longer experiencing this issue after updating cPanel to this version.

Thank you.