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
Plesk bug with the ID PPPM-13617, when AWSTATS is installed from EPEL repo:
# rpm -qi awstats |grep Packager
Packager : Fedora Project
Resolution
As a workaround:
Warning: Recreation of configuration files for domains may lead to temporary inaccessibility of hosted websites.
-
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 lineexclude=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* -
Remove AWStats package:
# yum remove awstats
-
Install AWStats using 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 -
Recreate configuration files for domains:
# plesk repair web -domains-only
Comments
14 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.
This issue is likely to occur when installing many of the available Plesk extensions, because some extensions enable the epel.repo.
There should be a way to:
* Inform administrators that this will happen
* Require extensions that enable 3rd party repos to inform admins about this
* Have Plesk check for 3rd party repos and notify the admin
For example, I recently installed the Warden Anti-spam and Virus Protection extension, which enabled the epel.repo. That has been installed for some time but I've only now accidentally noticed that Awstats was no longer working. All this time it would have been broken for our customers.
Webalizer had also been updated from the epel.repo likely due to the same issue. I followed the same steps to uninstall and reinstall Webalizer, as well.
Hi Bob B,
Thanks for your feedback.
I've checked in my test environment, that indeed Epel repo can be enabled, but also that the version provided by Plesk (at least for the CentOS 7) is higher than the one contained in Epel repo, so it should be kept the version from Plesk repos instead.
Anyway, I've created this uservoice: When installing extensions, after install, 3rd party repos should remain disabled
Please feel free to vote and comment there, so Developer team will read that.
@Francisco Garcia, thank you for creating the uservoice. I have voted.
Until this is looked at by the developers, can you suggest any settings that would let me exclude all packages from the epel.repo, and then specifically allow only the ones needed by the Plesk extension, such as Warden (I could contact the extension author to inquire about which packages are needed)?
Hello @Bob B,
Sorry for the late response, this proposed solution should help to achieve your goal.
Not this issue. ftp credentials for stats not working at all in any way shape or form except for file access
Not the issue and the problem is for a single domain only
Getting 403 Forbidden with Plesk awstat. Where is that password reset. Its not even prompting.
Hello Justin Lnch
The login credentials are the same as of the system user. Try opening the URL for web statistics with cleared cache again or in browsers incognito mode to get the login prompt back.
Or you may also try to disable password protection or to reset system user credentials.
Please sign in to leave a comment.