Can't process Awstats on new server
I recently moved my site from a cPanel server running CentOS 5 to a new one on CentOS 7 with the latest version of cPanel. None of the stats for my sites have been running since the move (I only use Awstats). Upon trying to run them manually from the command line I get the following errors (I replaced my site domain with MYDOMAIN):
Anyone have an idea as to how I can fix this?
Log checker loaded ok..
==> cPanel Log Daemon version 26.0
[2017-04-03 12:45:38 -0400] [sepxferlog]
[2017-04-03 12:45:38 -0400] [sepxferlog] complete
[2017-04-03 12:45:38 -0400] Processing USERLOGIN...
[2017-04-03 12:45:38 -0400] Run Logs domain: MYDOMAIN.com BW Limit: unlimited Domains: [m.MYDOMAIN.com]
info [safeapacherestart] Restart elapsed seconds: 1
[2017-04-03 12:45:59 -0400] Process bandwidth for USERLOGIN
info [safeapacherestart] Restart elapsed seconds: 1
[2017-04-03 12:46:20 -0400] Disk Usage for USERLOGIN on /dev/md1 (0/0)
[2017-04-03 12:46:20 -0400] Archive Status for USERLOGIN: 0
[2017-04-03 12:46:20 -0400] Processing USERLOGIN, fork() required to drop privs with (domains:2 domains)
[2017-04-03 12:46:20 -0400] [setuid] USERLOGIN (uid=1006,gid=1006)
[2017-04-03 12:46:20 -0400] [dologs] execute: awstats for user: USERLOGIN, log: /etc/apache2/logs/domlogs/MYDOMAIN.com.bkup.
[2017-04-03 12:46:23 -0400] Create/Update database for config "/home/USERLOGIN/tmp/awstats/awstats.MYDOMAIN.com.conf" by AWStats version 7.4 (build 201 40726)
[2017-04-03 12:46:23 -0400] From data in log file "/etc/apache2/logs/domlogs/MYDOMAIN.com.bkup"...
[2017-04-03 12:46:23 -0400] Phase 1 : First bypass old records, searching new record...
[2017-04-03 12:46:23 -0400] Direct access to last remembered record has fallen on another record.
[2017-04-03 12:46:23 -0400] So searching new records from beginning of log file...
[2017-04-03 12:46:23 -0400] Jumped lines in file: 0
[2017-04-03 12:46:23 -0400] Parsed lines in file: 4402
[2017-04-03 12:46:23 -0400] Found 0 dropped records,
[2017-04-03 12:46:23 -0400] Found 0 comments,
[2017-04-03 12:46:23 -0400] Found 0 blank records,
[2017-04-03 12:46:23 -0400] Found 4402 corrupted records,
[2017-04-03 12:46:23 -0400] Found 0 old records,
[2017-04-03 12:46:23 -0400] Found 0 new qualified records.
[2017-04-03 12:46:23 -0400] [dologs] execute: awstats for user: USERLOGIN, log: /etc/apache2/logs/domlogs/MYDOMAIN.com-ssl_log.bkup.
[2017-04-03 12:46:23 -0400] Create/Update database for config "/home/USERLOGIN/tmp/awstats/ssl/awstats.MYDOMAIN.com.conf" by AWStats version 7.4 (build 20140726)
[2017-04-03 12:46:23 -0400] From data in log file "/etc/apache2/logs/domlogs/MYDOMAIN.com-ssl_log.bkup"...
[2017-04-03 12:46:23 -0400] Phase 1 : First bypass old records, searching new record...
[2017-04-03 12:46:23 -0400] Direct access to last remembered record is out of file.
[2017-04-03 12:46:23 -0400] So searching it from beginning of log file...
[2017-04-03 12:46:23 -0400] AWStats did not find any valid log lines that match your LogFormat parameter, in the 10000th first non commented lines read of y our log.
[2017-04-03 12:46:23 -0400] Your log file /etc/apache2/logs/domlogs/MYDOMAIN.com-ssl_log.bkup must have a bad format or LogFormat parameter setup does not match this format.
[2017-04-03 12:46:23 -0400] Your AWStats LogFormat parameter is:
[2017-04-03 12:46:23 -0400] 1
[2017-04-03 12:46:23 -0400] This means each line in your web server log file need to have "combined log format" like this:
[2017-04-03 12:46:23 -0400] 111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compa tible; MSIE 5.01; Windows NT 5.0)"
[2017-04-03 12:46:23 -0400] And this is an example of records AWStats found in your log file (the record number 10000 in your log):
[2017-04-03 12:46:23 -0400] 108.219.81.157 - - [03/Apr/2017:12:28:44 -0400] "GET /images/icon_mapzip.gif HTTP/1.1" 0 200 499 "https://www.MYDOMAIN.com /course.php?id=1734" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
[2017-04-03 12:46:23 -0400] Setup ('/home/USERLOGIN/tmp/awstats/ssl/awstats.MYDOMAIN.com.conf' file, web server or permissions) may be wrong.
[2017-04-03 12:46:23 -0400] Check config file, permissions and AWStats documentation (in 'docs' directory).
[2017-04-03 12:46:23 -0400] [dologs] Failed to process stats for MYDOMAIN.com: Cpanel::Exception::ProcessFailed::Error/(XID y3j8ud) "/usr/local/cpanel /3rdparty/bin/awstats.pl"1"
at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 77.
Cpanel::Exception::create("ProcessFailed::Error", HASH(0x4164708)) called at /usr/local/cpanel/Cpanel/Exception.pm line 30
Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, HASH(0x4164708)) called at /usr/local/cpanel/Cpanel/CpuWatch.pm line 104
Cpanel::CpuWatch::_run("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x3579be8), "stdout", Cpanel::CPAN::IO::Callback::Write =GLOB(0x4171da8), "stderr", Cpanel::CPAN::IO::Callback::Write=GLOB(0x4171da8), ...) called at /usr/local/cpanel/Cpanel/CpuWatch.pm line 41
Cpanel::CpuWatch::run_with_rlimit("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x3579be8), "stdout", Cpanel::CPAN::IO::Call back::Write=GLOB(0x4171da8), "stderr", Cpanel::CPAN::IO::Callback::Write=GLOB(0x4171da8), ...) called at /usr/local/cpanel/Cpanel/Logd/Runner.pm line 121
Cpanel::Logd::Runner::run("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x414de40), "logger", Cpanel::Logd::StatsLog=HASH(0x 3ea2728)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2101
Cpanel::Logd::_awstatsGo("/home/USERLOGIN/tmp/awstats/ssl", "/etc/apache2/logs/domlogs/MYDOMAIN.com-ssl_log.bkup", "MYDOMAIN.com", "dgcou rsereview.com", ARRAY(0x40160f8)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2073
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x325a9a8), Try::Tiny::Catch=REF(0x4164990)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2081
Cpanel::Logd::_runStatsProgram("prog", "awstats", "lastruntime", 0, "user", "USERLOGIN", "homedir", "/home/USERLOGIN", ...) called at /usr/local/cpane l/Cpanel/Logd.pm line 684
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x414c138), Try::Tiny::Catch=REF(0x413cc50)) called at /usr/local/cpanel/Cpanel/Logd.pm line 672
Cpanel::Logd::dologs(HASH(0x278ef20), HASH(0x4015d08), 1, Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/Cpanel/Logd.pm line 285
Cpanel::Logd::scan_a_user_logs("USERLOGIN", HASH(0x4015d08), Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/libexec/cpanellogd li ne 346
[2017-04-03 12:46:23 -0400] warn [cpanellogd] Failed to process stats for MYDOMAIN.com: Cpanel::Exception::ProcessFailed::Error/(XID y3j8ud) "/usr/loc al/cpanel/3rdparty/bin/awstats.pl"1"
at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 77.
Cpanel::Exception::create("ProcessFailed::Error", HASH(0x4164708)) called at /usr/local/cpanel/Cpanel/Exception.pm line 30
Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, HASH(0x4164708)) called at /usr/local/cpanel/Cpanel/CpuWatch.pm line 104
Cpanel::CpuWatch::_run("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x3579be8), "stdout", Cpanel::CPAN::IO::Callback::Write =GLOB(0x4171da8), "stderr", Cpanel::CPAN::IO::Callback::Write=GLOB(0x4171da8), ...) called at /usr/local/cpanel/Cpanel/CpuWatch.pm line 41
Cpanel::CpuWatch::run_with_rlimit("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x3579be8), "stdout", Cpanel::CPAN::IO::Call back::Write=GLOB(0x4171da8), "stderr", Cpanel::CPAN::IO::Callback::Write=GLOB(0x4171da8), ...) called at /usr/local/cpanel/Cpanel/Logd/Runner.pm line 121
Cpanel::Logd::Runner::run("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x414de40), "logger", Cpanel::Logd::StatsLog=HASH(0x 3ea2728)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2101
Cpanel::Logd::_awstatsGo("/home/USERLOGIN/tmp/awstats/ssl", "/etc/apache2/logs/domlogs/MYDOMAIN.com-ssl_log.bkup", "MYDOMAIN.com", "dgcou rsereview.com", ARRAY(0x40160f8)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2073
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x325a9a8), Try::Tiny::Catch=REF(0x4164990)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2081
Cpanel::Logd::_runStatsProgram("prog", "awstats", "lastruntime", 0, "user", "USERLOGIN", "homedir", "/home/USERLOGIN", ...) called at /usr/local/cpane l/Cpanel/Logd.pm line 684
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x414c138), Try::Tiny::Catch=REF(0x413cc50)) called at /usr/local/cpanel/Cpanel/Logd.pm line 672
Cpanel::Logd::dologs(HASH(0x278ef20), HASH(0x4015d08), 1, Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/Cpanel/Logd.pm line 285
Cpanel::Logd::scan_a_user_logs("USERLOGIN", HASH(0x4015d08), Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/libexec/cpanellogd li ne 346
at /usr/local/cpanel/Cpanel/Logd.pm line 2080.
Cpanel::Logd::__ANON__(Cpanel::Exception::ProcessFailed::Error=HASH(0x416bde8)) called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib /Try/Tiny.pm line 122
Try::Tiny::try(CODE(0x325a9a8), Try::Tiny::Catch=REF(0x4164990)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2081
Cpanel::Logd::_runStatsProgram("prog", "awstats", "lastruntime", 0, "user", "USERLOGIN", "homedir", "/home/USERLOGIN", ...) called at /usr/local/cpane l/Cpanel/Logd.pm line 684
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x414c138), Try::Tiny::Catch=REF(0x413cc50)) called at /usr/local/cpanel/Cpanel/Logd.pm line 672
Cpanel::Logd::dologs(HASH(0x278ef20), HASH(0x4015d08), 1, Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/Cpanel/Logd.pm line 285
Cpanel::Logd::scan_a_user_logs("USERLOGIN", HASH(0x4015d08), Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/libexec/cpanellogd li ne 346
warn [cpanellogd] Failed to process stats for MYDOMAIN.com: Cpanel::Exception::ProcessFailed::Error/(XID y3j8ud) "/usr/local/cpanel/3rdparty/bin/awsta ts.pl"1"
at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 77.
Cpanel::Exception::create("ProcessFailed::Error", HASH(0x4164708)) called at /usr/local/cpanel/Cpanel/Exception.pm line 30
Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, HASH(0x4164708)) called at /usr/local/cpanel/Cpanel/CpuWatch.pm line 104
Cpanel::CpuWatch::_run("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x3579be8), "stdout", Cpanel::CPAN::IO::Callback::Write =GLOB(0x4171da8), "stderr", Cpanel::CPAN::IO::Callback::Write=GLOB(0x4171da8), ...) called at /usr/local/cpanel/Cpanel/CpuWatch.pm line 41
Cpanel::CpuWatch::run_with_rlimit("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x3579be8), "stdout", Cpanel::CPAN::IO::Call back::Write=GLOB(0x4171da8), "stderr", Cpanel::CPAN::IO::Callback::Write=GLOB(0x4171da8), ...) called at /usr/local/cpanel/Cpanel/Logd/Runner.pm line 121
Cpanel::Logd::Runner::run("program", "/usr/local/cpanel/3rdparty/bin/awstats.pl", "args", ARRAY(0x414de40), "logger", Cpanel::Logd::StatsLog=HASH(0x 3ea2728)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2101
Cpanel::Logd::_awstatsGo("/home/USERLOGIN/tmp/awstats/ssl", "/etc/apache2/logs/domlogs/MYDOMAIN.com-ssl_log.bkup", "MYDOMAIN.com", "dgcou rsereview.com", ARRAY(0x40160f8)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2073
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x325a9a8), Try::Tiny::Catch=REF(0x4164990)) called at /usr/local/cpanel/Cpanel/Logd.pm line 2081
Cpanel::Logd::_runStatsProgram("prog", "awstats", "lastruntime", 0, "user", "USERLOGIN", "homedir", "/home/USERLOGIN", ...) called at /usr/local/cpane l/Cpanel/Logd.pm line 684
Cpanel::Logd::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 101
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 92
Try::Tiny::try(CODE(0x414c138), Try::Tiny::Catch=REF(0x413cc50)) called at /usr/local/cpanel/Cpanel/Logd.pm line 672
Cpanel::Logd::dologs(HASH(0x278ef20), HASH(0x4015d08), 1, Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/Cpanel/Logd.pm line 285
Cpanel::Logd::scan_a_user_logs("USERLOGIN", HASH(0x4015d08), Cpanel::Logd::BigLock=HASH(0x2ccb238)) called at /usr/local/cpanel/libexec/cpanellogd li ne 346
Anyone have an idea as to how I can fix this?
-
So an update on this, I edited the ssl/awstats.*.conf file for the one account and changed logformat to 4. The runweblogs script resets it to 1 but after doing that the script doesn't seem to crash but it sees all the lines in the log as corrupt. Stats are still not updated. [2017-04-04 10:55:00 -0400] Direct access to last remembered record has fallen on another record. [2017-04-04 10:55:00 -0400] So searching new records from beginning of log file... [2017-04-04 10:55:00 -0400] Jumped lines in file: 0 [2017-04-04 10:55:00 -0400] Parsed lines in file: 6583 [2017-04-04 10:55:00 -0400] Found 0 dropped records, [2017-04-04 10:55:00 -0400] Found 0 comments, [2017-04-04 10:55:00 -0400] Found 0 blank records, [2017-04-04 10:55:00 -0400] Found 6583 corrupted records, [2017-04-04 10:55:00 -0400] Found 0 old records, [2017-04-04 10:55:00 -0400] Found 0 new qualified records. [2017-04-04 10:55:00 -0400] Complete
Update: Restarting cpanellogd ends up with the crashing thing again.0 -
Hello, It looks like ticket number 8354703 was opened to report this issue. I'll update this thread with the outcome of the support ticket once it's closed. Thank you. 0 -
Thanks Michael. Is there anything I can do myself before support looks into it? I submitted the ticket as a plan B in case I can't figure it out myself. 0 -
Hello, To update, it looks like this issue stemmed from an extra LogFormat entry in the Apache configuration file. Removing the extra entry should address the issue. Thank you. 0 -
Hello, I had a similar issue today and banged my head on it for about 1.5 hours. This was with EasyApache 4. Turns out Piped Logging being disabled was the issue and luckily a co-worker knew this as I was out of ideas. Once I went to WHM -> Apache Configuration -> Piped Logging Configuration and enabled that, then restarted Apache the awstats were again processing the logs files for Apache properly. I hope that solves your issue if you have the same problem. 0 -
Hello @dhultin, It's possible that enabling Piped Logging overwrote a custom log configuration entry that was causing the problem with Awstats. If you'd like us to take a closer look, feel free to open a support ticket and we can disable Piped Logging to see what the issue could be. Thank you. 0 -
From What I could see the issue was being caused by Ajax calls. The response code in the Apache logs showed "0 200 etc etc" with 200 being the response code. The Ajax was adding the 0 before the response codes and causing the issue. However the only resolution was to enable piped logging. The Actually logging configuration did appear to be fine though. Here is an example. 10.20.4.38 - - [25/Apr/2017:14:44:23 -0400] "GET /contact/?_wpcf7_is_ajax_call=1&_wpcf7=260&_wpcf7_request_ver=1493145863672 HTTP/1.1" 0 200 2 "domain URL removed by me" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" After enabling piped logging the '0' from the ajax call went away and awstats worked since now the response code was in the expected location, where the 0 was previously. 0 -
Hello, Feel free to open a support ticket using the link in my signature if you'd like us to take a closer look at the affected system and see why it's not working as expected when Piped Logging is disabled. You can post the ticket number here and we will update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
8 comments