AWSTATS Failures

Hi Guys,

Hope you had a good week so far. I just found that my Virtualmin Pro 3.99 system on Ubuntu 12.04 has been failing during the 10 minute AWSTATS cron job since Feb 9th of this year which is a day I applied updates to the server.

Here is the output emailed to root every 10 minutes:

Create/Update database for config "/etc/awstats/awstats.jeremiahbrock.com.conf" by
AWStats version 7.0 (build 1.971)
From data in log file "/var/log/virtualmin/jeremiahbrock.com_access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 417)
Error: Couldn't open file "/home/jeremiahbrock.com/awstats/awstats042013.jeremiahbrock.com.tmp.31678"
for write: Permission denied
Setup ('/etc/awstats/awstats.jeremiahbrock.com.conf' file, web server or permissions)
may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Create/Update database for config "/etc/awstats/awstats.www.jeremiahbrock.com.conf"
by AWStats version 7.0 (build 1.971)
From data in log file "/var/log/virtualmin/jeremiahbrock.com_access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 417)
Error: Couldn't open file "/home/jeremiahbrock.com/awstats/awstats042013.www.jeremiahbrock.com.tmp.31751"
for write: Permission denied
Setup ('/etc/awstats/awstats.www.jeremiahbrock.com.conf' file, web server or permissions)
may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Error: SiteDomain parameter not defined in your config/domain file. You must edit
it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

The cron job in 12.04 is now

[ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

On 10.04 it is

[ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache2/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null

Here is the Aptitude log for the 9th (Nothing pops out as something that would cause this):

Log complete.
Aptitude 0.6.6: log report
Sat, FebĀ  9 2013 01:03:44 -0800

IMPORTANT: this log only lists intended actions; actions which fail due to
dpkg problems may not be completed.

Will install 2 packages, and remove 19 packages.
14.3 MB of disk space will be freed
===============================================================================
[REMOVE, NOT USED] consolekit:amd64
[REMOVE, NOT USED] libck-connector0:amd64
[REMOVE, NOT USED] libdb4.8-dev:amd64
[REMOVE, NOT USED] libdbus-glib-1-2:amd64
[REMOVE, NOT USED] libeggdbus-1-0:amd64
[REMOVE, NOT USED] libev3:amd64
[REMOVE, NOT USED] libgmp3c2:amd64
[REMOVE, NOT USED] libjpeg62:amd64
[REMOVE, NOT USED] libkadm5clnt-mit7:amd64
[REMOVE, NOT USED] libkadm5srv-mit7:amd64
[REMOVE, NOT USED] libkdb5-4:amd64
[REMOVE, NOT USED] libmpfr1ldbl:amd64
[REMOVE, NOT USED] libncurses5-dev:amd64
[REMOVE, NOT USED] libnl1:amd64
[REMOVE, NOT USED] libpam-ck-connector:amd64
[REMOVE, NOT USED] libpolkit-gobject-1-0:amd64
[REMOVE, NOT USED] libpython2.6:amd64
[REMOVE, NOT USED] libxapian15:amd64
[REMOVE, NOT USED] python-support:amd64
[INSTALL, DEPENDENCIES] liblua5.2-0:amd64
[INSTALL] liblua5.2-dev:amd64
===============================================================================

Based on the error I am pretty sure it is a Permissions problem, but the permissions are identical too working systems on 10.04. This is my only 12.04 server - and for good reason.

I have also verified that the SiteDomain is set:

SiteDomain="jeremiahbrock.com"

I discovered that if I create a new domain and run the awstats cron job, the new domain awstats folder remains empty during the cron job and the following is what is output

Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Nothing has changed to my knowledge on the server except for security updates and Upgrades to Virtualmin.

Thx for any help on figuring this out,

~Jeremy

Status: 
Active

Comments

Eric actually answered this for another 12.04 user back in December.

https://www.virtualmin.com/node/22203

I think my troubles are solved.

My Theory is that I actually upgraded to 12.04 on Feb 9th : ) which is when this started happening.

Based on Eric's suggestion, I will go ahead and disable the cron job on my other 10.04 servers.

Hope you guys have a great day!

~Jeremy