• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved AWstats cron job error?

raytracy

Basic Pleskian
I have a Centos 7.3+Onyx 17.5 eject the following error to root every hour after upgraded to Update#14:

/etc/cron.hourly/awstats:
/usr/share/awstats/tools/awstats_updateall.pl: line 11: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 12: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 15: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 17: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 19: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 21: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 22: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 23: my: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 38: sub: command not found
/usr/share/awstats/tools/awstats_updateall.pl: line 39: print: command not found


I have try to uninstall/re-install awstats from panel but not help.
There are 4 hosts upgraded to #14, only one got this message hourly.

By the way, it seems something wrong when I re-install awstats, because there are a word like (missing...) flashing over the progress window, but I have no chance to capture it.

Is there any log file I can inspect the installation? Or any command line let me re-install the awstats so I can get the message from console?

----- Update
if I try to run the command in cron.hourly, it seems reponse normal as following:

Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=localhost.localdomain -configdir="/etc/awstats"' to update config localhost.localdomain
Create/Update database for config "/etc/awstats/awstats.localhost.localdomain.conf" by AWStats version 7.6 (build 20161204)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 5545)
Jumped lines in file: 5545
Found 5545 already parsed records.
Parsed lines in file: 28
Found 12 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 16 new qualified records.

I have no idea why same command will produce error in cron schedule?
 
Last edited:
/usr/share/awstats/tools/awstats_updateall.pl
You have strange path to this file. On my default Plesk 17.5.3 installation on CentOS7 I have following path:

# rpm -ql awstats-7.4-centos7.17031414.noarch | grep updateall
/usr/share/awstats/awstats_updateall.pl

Please make sure that you have installed correct (not custom) version of awstats.
 
It sounds like my only awstats is below from EPEL repository:

Available Packages
awstats.noarch 0:7.6-3.1.el7 epel


I have try to turn off EPEL but cannot find any other awstats version.

Here is my CentOS release:
CentOS Linux release 7.3.1611 (Core)

I cannot find awstats 7.4.....


By the way, I found that awstats is not the only damaged package, there are bash-completion also leave a strange binary file in /etc/profile.d/, I would try to reinstall all packages to see does these be solved....
 
Last edited:
I did a packages reinstall:

plesk installer --select-product-id plesk --select-release-current --reinstall-patch --install-component base

problem solved.
 
Back
Top