Applicable to:
- Plesk for Linux
Symptoms
-
One or several symptoms from listed below may be applicable:
-
Web statistics page is not available for a domain:
PLESK_INFO: 404 Not Found
The requested URL /plesk-stat/webstat/current/index.html was not found on this server. -
/usr/local/psa/admin/sbin/web_statistic_executor
utility fails with the following error:# /usr/local/psa/admin/sbin/web_statistic_executor --calculate-domain 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 -
Unable to open Web Statistics page for a domain:
PLESK_ERROR: 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 error
-
-
AWStats was installed from a third-party repository:
On Debian-based:
# dpkg -l | grep aws
ii awstats 7.4+dfsg-1ubuntu0.3 all powerful and featureful web server log analyzerOn RHEL-based:
# rpm -qa | grep aws
awstats-7.4-1.el7.noarch# rpm -qi awstats-7.4-1.el7.noarch
...
Packager : Fedora Project -
Statistics are calculated hourly:
# grep awstats /var/log/cron
run-parts(/etc/cron.hourly)[20967]: starting awstats
run-parts(/etc/cron.hourly)[21179]: finished awstats
run-parts(/etc/cron.hourly)[24752]: starting awstats
run-parts(/etc/cron.hourly)[25094]: finished awstats
run-parts(/etc/cron.hourly)[25156]: starting awstats
run-parts(/etc/cron.hourly)[25497]: finished awstats
run-parts(/etc/cron.hourly)[25591]: starting awstats
run-parts(/etc/cron.hourly)[25929]: finished awstats
...# ls /etc/cron.hourly/ | grep awstats
awstats
Cause
Third-party AWStats packages are not supported by Plesk.
Resolution
Re-install AWStats from Plesk repository:
-
Connect to the server using SSH.
-
Create a backup of AWStats configuration:
# mkdir awstats_backup
# cp -r /etc/awstats/ awstats_backup -
Exclude awstat packages from all third-party repositories in
/etc/yum.repos.d
directory. Add the following line into the .repo files, and inside each repo block, for example:# cat /etc/yum.repos.d/epel.repo
...
exclude=awstats*
[epel-debuginfo]
...
exclude=awstats*
[epel-source]
...
exclude=awstats* -
Remove AWStats package:
# yum remove awstats
-
Install AWStats using Plesk installer:
# plesk installer
-
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-
If webstat data for missing dates still not displayed, check the size of
/var/www/vhosts/system/example.com/logs/access_log.webstat
file:# ls -l /var/www/vhosts/system/example.com/logs/access_log.webstat
-rw-------. 1 root root 29960770 Jun 27 07:24 /var/www/vhosts/system/example.com/logs/access_log.webstatIf the size is not 0, follow instructions from the following article: Unable to open a web statistics page: 404 Not Found The requested document was not found on this server
-
And repeat 6 step to recalculate statistics
-
Additional Information
Also, check the following article Web statistics for domain is not generated on Ubuntu
Comments
6 comments
step 2, wich file i have to put Enable=0 ?
-rw-r--r-- 1 root root 1664 nov 29 19:12 CentOS-Base.repo
-rw-r--r-- 1 root root 1309 nov 29 19:12 CentOS-CR.repo
-rw-r--r-- 1 root root 649 nov 29 19:12 CentOS-Debuginfo.repo
-rw-r--r-- 1 root root 314 nov 29 19:12 CentOS-fasttrack.repo
-rw-r--r-- 1 root root 630 nov 29 19:12 CentOS-Media.repo
-rw-r--r-- 1 root root 1331 nov 29 19:12 CentOS-Sources.repo
-rw-r--r-- 1 root root 2893 nov 29 19:12 CentOS-Vault.repo
-rw-r--r-- 1 root root 957 dic 27 18:37 epel.repo
-rw-r--r-- 1 root root 1056 dic 27 18:37 epel-testing.repo
-rw-r--r-- 1 root root 353 may 2 07:55 plesk-migrator.repo
-rw-r--r-- 1 root root 614 may 2 03:32 plesk.repo
-rw-r--r-- 1 root root 636 may 2 06:12 tortix-common.repo
2Luis, to all of them, except the following ones:
-rw-r--r-- 1 root root 1664 nov 29 19:12 CentOS-Base.repo
-rw-r--r-- 1 root root 1331 nov 29 19:12 CentOS-Sources.repo
-rw-r--r-- 1 root root 2893 nov 29 19:12 CentOS-Vault.repo
-rw-r--r-- 1 root root 353 may 2 07:55 plesk-migrator.repo
-rw-r--r-- 1 root root 614 may 2 03:32 plesk.repo
-rw-r--r-- 1 root root 636 may 2 06:12 tortix-common.repo
To verify that proper package is installed, find awstat package and retrieve the information about the vendor:
# rpm -qa | grep awstat
awstats-7.4-centos7.17031414.noarch
# rpm -qi awstats-7.4-centos7.17031414.noarch | grep Vendor
Vendor : Plesk
when epel (or other third party repo) is enabled, you can simply put:
exclude=awstats*
line at /etc/yum.repos.d/epel.repo, [epel] section.
After this:
1. yum remove awstats
2. run pleks autoinstaller and reinstall awstats there.
This will allow normal yum updates afterwards.
Hello Petr,
Thank you for your input.
The article has been modified with consideration of your recommendations.
Bonjour,
Le point 3 n'est pas clair pour le néophyte que je suis.
Quels sont les référentiels tiers ? Ceux qui ne commencent pas par plesk ni par CentOS ?
Ou faut il ajouter exclude=awstats* exactement ? A la fin ? Dans une section précise ?
J'ai fait l'ajout en début de tous les fichiers trouvés qui ne commencent pas par plesk et j'ai une erreur à l'étape 4 :
File contains no section headers.
file: file:///etc/yum.repos.d/CentOS-Base.repo, line: 13
'exclude=awstats*\n'
Merci de votre aide.
@Eric,
> What are the third-party repositories? Those who do not start with plesk or CentOS?
Yes, you are correct. These are repositories not provided by Plesk or CentOS.
> Or should we add exclude=awstats* exactly? At the end ? In a specific section?
Usually, it is enough to end at the end of the repository file.
An example may be found here.
Please sign in to leave a comment.