Symptoms
- The
.webstat
logs are growing big (several GB) - Awstats has been installed using Plesk installer
- Daily Cron task has been executed on a daily basis
- No duplicate Cron tasks on the server
- Plesk might have been upgraded to Obsidian recently (Optional).
- Manual start of calculation shows that some files are missing:
# /usr/local/psa/admin/sbin/web_statistic_executor –calculate-domain example.com
—–[ example.com
Webstat: awstats
Executing awstats…
Processing the log /var/www/vhosts/system/example.com/logs/access_log.webstat
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -update -configdir=/usr/local/psa/etc/awstats -config=example.com-http -LogFile=/var/www/vhosts/system/example.com/logs/access_log.webstatExecution of /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -update -configdir=/usr/local/psa/etc/awstats -config=example.com-http -LogFile=/var/www/vhosts/system/example.com/logs/acce
ss_log.webstat failed with return code 1.
Stdout is
forkExecvPipes: execv() failed: No such file or directorySystem error 2: No such file or directory
Stderr is
forkExecvPipes: execv() failed: No such file or directoryThe 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/tools/awstats_buildstaticpages.pl: No such file or directory
popen_exec: command failed code: 127 , error: noneSystem error 2: No such file or directory
popen_exec: command failed code: 127 , error: none - Incorrect paths are set in the
/etc/psa/psa.conf
 file. For example:# cat /etc/psa/psa.conf | grep AWSTATS
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin
AWSTATS_TOOLS_D /usr/share/awstats/tools
AWSTATS_DOC_D /var/www/html/awstats
Cause
Wrong path configuration in Awstats config files
Resolution
Set the correct paths in configuration file as follows:
- Connect to the server via ssh
- Open
/etc/psa/psa.conf
file with a text editor - Replace AWSTATS_BIN_D and AWSTATS_TOOLS_D so that it looks like follows:
# cat /etc/psa/psa.conf|grep AWSTATS
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /var/www/cgi-bin/awstats
AWSTATS_TOOLS_D /usr/share/awstats
AWSTATS_DOC_D /var/www/html/awstats