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.

Awstats not working

Discussion in 'General Discussion' started by keithl, Aug 15, 2011.

  1. keithl

    keithl Member

    Joined:
    Jan 14, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    We seem to have an issue with Awstats on our server but I can't find what it might be.

    We have a number of sites / accounts on our server, some of which have always been there, while others have been migrated from another cpanel installation. With one of the sites that we migrated, the owner has reported that she's no longer able to view her website stats via Awstats, but she could previously.

    When clicking on Awstats it shows the relevant domain and the option to view the stats, however when I click on View a new window appears but it is blank. If I check in /home/mysite/tmp/awstats/ I can see loads of log data. Within Choose Log Programs Awstats is selected, and in fact is currently the only one that is. I've run '/scripts/runweblogs mysite' with no errors but also no effect.

    Interestingly if I try viewing the Awstats on one of my new websites on that server I get an error saying "There are no domains which have awstats stats to display", yet Webalizer and Analog both show data. If I run runweblogs on that site it again works, but I still don't see anything in Awstats.

    In WHM I've confirmed that within 'Statistics Software Configuration' Awstats is available and active for all users. The 'Allow Awstats configuration Include file" option is checked. All users have permission to change their web stats software. Logs are processed every 24 hours. In 'Tweak Settings', 'Stats Programs' Awstats is enabled. In 'Stats and Logs' all the options are set to the default (as they are also on the old server the migrated sites came from).

    I found a similar issue reported which requested some setup info which below :

    Code:
    root@myserver [/home/mysite/tmp]# egrep -hi "skip(analog|awstats|webalizer)|stats" /var/cpanel/cpanel.config
    stats_log=/usr/local/cpanel/logs/stats_log
    keepstatslog=0
    skipanalog=0
    awstatsreversedns=0
    skipawstats=0
    statsloglevel=1
    awstatsbrowserupdate=0
    userstatsoverride=1
    skipwebalizer=0
    
    root@myserver [/home/mysite/tmp]# cat /etc/stats.conf
    ALLOWALL=yes
    DEFAULTGENS=ANALOG,AWSTATS,WEBALIZER
    allow_awstats_include=1
    
    root@myserver [/home/mysite/tmp]# grep -HiR "STATGENS" /var/cpanel/users
    
    root@myserver [/home/mysite/tmp]# cat ~mysite/tmp/stats.conf
    WEBALIZER-mysite.COM=no
    ANALOG-mysite.COM=no
    AWSTATS-mysite.COM=yes
    WEBALIZER-anothersite1.CO.UK=no
    ANALOG-anothersite1.CO.UK=no
    AWSTATS-anothersite1.CO.UK=no
    WEBALIZER-anothersite2.UK.COM=no
    ANALOG-anothersite2.UK.COM=no
    AWSTATS-anothersite2.UK.COM=no
    Anyone know what the issue might be, or what else I can check?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are there any errors in /usr/local/cpanel/logs/error_log upon loading the AwStats page that shows as blank for the user in question?

    You noted there aren't any errors on running /scripts/runweblogs, but would you be able to provide the output for when that runs for us to see it?

    Next, can you provide the output for the following:

    Code:
    ls -lah /usr/local/cpanel/3rdparty/bin/awstats.pl
    ls -lah /usr/local/cpanel/base/awstats.pl
    The first file, /usr/local/cpanel/3rdparty/bin/awstats.pl, should be 755 file permissions. The second file, /usr/local/cpanel/base/awstats.pl, should be a symlink to /usr/local/cpanel/3rdparty/bin/awstats.pl
     
  3. keithl

    keithl Member

    Joined:
    Jan 14, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Thanks Tristan, you cracked it! It was the permissions on /usr/local/cpanel/3rdparty/bin/awstats.pl that were wrong, and were set as 640 rather than 755. Corrected that and it's now working.

    Thanks for your help.
    Keith
     
  4. keithl

    keithl Member

    Joined:
    Jan 14, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    As an aside (mainly in case anyone else with the same issue comes across this), while there weren't any errors when I ran runweblogs I can see from running it again after the permissions were fixed that there was additional output that should have appeared.

    With the permissions error in place the output was :

    Code:
    Log checker loaded ok..
    ==> cPanel Log Daemon version 25.0
    ==> Loaded RRDs: version 1.4004
    Processing bba...
    Run Logs domain: mysite.com BW Limit: 20971520000 Domains: [anothersite1.uk.com anothersite2.co.uk]
    info [safeapacherestart] Restart elapsed seconds: 3
    [2011-08-16 14:09:54 +0100] Process bandwidth for bba
    [2011-08-16 14:09:56 +0100] Processing exim stats for bba....
    [2011-08-16 14:09:57 +0100] ...Done
    info [safeapacherestart] Restart elapsed seconds: 1
    [2011-08-16 14:10:20 +0100] Disk Usage for bba on /dev/mapper/VolGroup00-LogVol00 (1096240/2048000)
    [2011-08-16 14:10:20 +0100] WEBLANG english
    [2011-08-16 14:10:20 +0100] Archive Status: 0
    [2011-08-16 14:10:20 +0100] About to fork for bba [ALL DOMAINS: anothersite1.uk.com, anothersite2.co.uk, mysite.com]
    Complete
    But once the permissions had been corrected the output expanded to become this :

    Code:
    Log checker loaded ok..
    ==> cPanel Log Daemon version 25.0
    ==> Loaded RRDs: version 1.4004
    Processing bba...
    Run Logs domain: mysite.com BW Limit: 20971520000 Domains: [anothersite1.uk.com anothersite2.co.uk]
    info [safeapacherestart] Restart elapsed seconds: 1
    [2011-08-16 14:34:04 +0100] Process bandwidth for bba
    [2011-08-16 14:34:05 +0100] Processing exim stats for bba....
    [2011-08-16 14:34:05 +0100] ...Done
    info [safeapacherestart] Restart elapsed seconds: 1
    [2011-08-16 14:34:27 +0100] Disk Usage for bba on /dev/mapper/VolGroup00-LogVol00 (1096240/2048000)
    [2011-08-16 14:34:27 +0100] WEBLANG english
    [2011-08-16 14:34:27 +0100] Archive Status: 0
    [2011-08-16 14:34:27 +0100] About to fork for bba [ALL DOMAINS: anothersite1.uk.com, anothersite2.co.uk, mysite.com]
    [2011-08-16 14:34:27 +0100] Create/Update database for config "/home/bba/tmp/awstats/awstats.mysite.com.conf" by AWStats version 7.0 (build 1.971)
    [2011-08-16 14:34:27 +0100] From data in log file "/usr/local/apache/domlogs/mysite.com.bkup"...
    [2011-08-16 14:34:27 +0100] Phase 1 : First bypass old records, searching new record...
    [2011-08-16 14:34:27 +0100] Direct access to last remembered record is out of file.
    [2011-08-16 14:34:27 +0100] So searching it from beginning of log file...
    [2011-08-16 14:34:27 +0100] Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
    [2011-08-16 14:34:27 +0100] Jumped lines in file: 0
    [2011-08-16 14:34:27 +0100] Parsed lines in file: 641
    [2011-08-16 14:34:27 +0100]  Found 0 dropped records,
    [2011-08-16 14:34:27 +0100]  Found 0 comments,
    [2011-08-16 14:34:27 +0100]  Found 0 blank records,
    [2011-08-16 14:34:27 +0100]  Found 0 corrupted records,
    [2011-08-16 14:34:27 +0100]  Found 0 old records,
    [2011-08-16 14:34:27 +0100]  Found 641 new qualified records.
    Complete
     
  5. mwn_ts

    mwn_ts Registered

    Joined:
    Feb 7, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Seems not work for me. I've did it all those steps above, but until now stil cannot view awstat with message "There are no domains which have awstats stats to display".

    Please i need quick answer for this, and FYI when i check from log there are telling that my awstat was generated.
     
Loading...

Share This Page