Articles in this section

AWStats web statistics page does not work as expected

kb: bug DoNotDelete:docref kb: fixed Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to open Web Statistics page for a domain:

    404 Not Found
    The requested URL /plesk-stat/webstat/current/index.html was not found on this server.


    403 Forbidden You do not have permission to access this document.


    This is the placeholder for Web statistics. If you see this page, that means that statistics for your server was not gathered yet, or bandwidth was not used. Statistics is typically set to run once every 24 hours. If you do not see a change to this page in the next 24 hours contact your server administrator for assistance.


    Error: Not same number of records of BrowsersSearchIDOrder (202 entries) and BrowsersHashIDLib (203 entries without firefox,opera,chrome,safari,konqueror,svn,msie,netscape) in Browsers database. May be you updated AWStats without updating browsers.pm file or you made changed into browsers.pm not correctly. Check your file /usr/share/awstats/lib/browsers.pm is up to date.
    Setup ('/usr/local/psa/etc/awstats/awstats.example.com-http.conf' file, web server or permissions) may be wrong.
    Check config file, permissions and AWStats documentation (in 'docs' directory).

  • The file access_log.webstat does not get rotated and can consume a lot of disk space

  • Several images on https://www.example.com/plesk-stat/webstat/ page are not loaded with 404 or 403 errors:

  • Value for column "Number of visits" is always 0

  • When SELinux is enabled, errors in /var/log/messages:

    CONFIG_TEXT: SELinux is preventing /usr/bin/perl from search access on the directory /var/www

  • Plesk statistics utility fails with the following error:

    \# plesk sbin statistics --calculate-one --domain-name=example.com 
    Stdout is  
    forkExecvPipes: execv() failed: No such file or directory  
    System error 2: No such file or directory  
    The log will not be truncated because of errors above: /var/www/vhosts/system/example.com/logs/access_log.webstat  
    Stat_ttl for the domain is 3.  
    sh: /usr/share/awstats/awstats_buildstaticpages.pl: No such file or directory  
    popen_exec: command failed code: 127 , error: none
    
    
    

Cause

Product issue:

  • #PPPM-13617 "On Plesk servers running on Red Hat Enterprise Linux 8 and its derivatives with the Extra Packages for Enterprise Linux (EPEL) repository configured, installing AWStats packages from the EPEL repository no longer results in AWStats being non-functional. Note: If you have disabled the installation of AWStats packages from the EPEL repository, you need to undo the changes, or else future Plesk updates will fail."
    Fixed in:

Resolution

Please consider updating your server: How to install Plesk updates

Warning: Verify that AWStats packages are not excluded from the EPEL repository:

  1. Connect to the server via SSH
  2. Check if the AWStats package is excluded:

    # grep -r exclude /etc/yum.repos.d | grep awstats
    /etc/yum.repos.d/epel.repo:exclude=awstats*

  3. Open /etc/yum.repos.d/epel.repo in any text editor and comment or delete the line:

    CONFIG_TEXT: #exclude=awstats*

 

Workaround

As a workaround:

Re-install AWStats from Plesk repository

Warning: Recreation of configuration files for domains may lead to temporary inaccessibility of hosted websites.

  1. Connect to the server using SSH

  2. Create a backup of AWStats configuration:

    # mkdir awstats_backup
    # cp -r /etc/awstats/ awstats_backup

  3. Exclude awstat packages from all third-party repositories in /etc/yum.repos.d directory. Add the line exclude=awstats* into the .repo files, and inside each repository block, for example:

    # cat /etc/yum.repos.d/epel.repo
    ...
    exclude=awstats*
    [epel-debuginfo]
    ...
    exclude=awstats*
    [epel-source]
    ...
    exclude=awstats*

  4. Remove AWStats package:

    # yum remove awstats

  5. Install AWStats using Plesk installer

  6. Recalculate statistics using:

    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteStatistics
    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteWebStatistics

  7. Recreate configuration files for domains:

    # plesk repair web -domains-only

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.