Awstats error Ubuntu 12.04 new install

10 posts / 0 new
Last post
#1 Wed, 05/16/2012 - 11:37
Atomboy

Awstats error Ubuntu 12.04 new install

Thanks very much for the new Ubuntu 12.04 LTS Virtualmin installer.

Everything seems fine, apart from these emails to admin regarding Awstats errors:

Create/Update database for config "/etc/awstats/awstats.mydomainname.com.conf" by AWStats version 7.0 (build 1.971) From data in log file "/var/log/virtualmin/mydomainname.com_access_log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Error: Couldn't open file "/home/mydomainname/awstats/awstats052012.mydomainname.com.tmp.15000" for write: Permission denied Setup ('/etc/awstats/awstats.mydomainname.com.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory).

I am trying to work through this but hope someone can also help.

The line:

Error: Couldn't open file "/home/mydomainname/awstats/awstats052012.mydomainname.com.tmp.15000" for write: Permission denied

led me to look there, but the file does not seem to exist.

The only file under /home/mydomainname/awstats/

is an htaccess file containing this:

AuthName "mydomainname.com statistics" AuthType Basic AuthUserFile /home/mydomainname/.awstats-htpasswd require valid-user

I hope this makes some sense to somebody and thank you very much for any help.

Otherwise, perhaps I could just switch off Awstats and the cron job?

Thanks again.

Wed, 05/16/2012 - 12:02
andreychek

Howdy,

Can you paste in the contents of this command:

cat /etc/cron.d/awstats

Wed, 05/16/2012 - 12:07
Atomboy

Hello - thank you - I get this:

MAILTO=root

*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

Generate static reports:

10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

Wed, 05/16/2012 - 13:15
andreychek

So, in theory, all of those lines should be commented out while installing Virtualmin.

However, we've heard about a handful of cases where that hasn't happened, and we're not quite sure why that's the case at the moment :-)

However, the quick fix is to comment out all the lines in that file -- you don't need them for anything, Virtualmin's awstats processing is done elsewhere.

We'll continue to dig into why that isn't done automatically though, thanks for the report!

-Eric

Wed, 05/16/2012 - 13:24
Atomboy

Thanks for the help, Eric.

Sorry - just to be dumb and to be sure, comment out the commands in which file? - before I open up Virtualmin and go to the wrong place.

Many thanks again.

Wed, 05/16/2012 - 14:00
andreychek

Howdy,

The contents of the file "/etc/cron.d/awstats" aren't necessary in a Virtualmin setup.

So you can use a text editor to edit /etc/cron.d/awstats, and comment out all the lines in that file (by adding a '#' to the beginning of each line).

-Eric

Wed, 05/16/2012 - 14:00
Atomboy

OK I have commented out everything in both:

/usr/share/awstats/tools/update.sh

and

/usr/share/awstats/tools/buildstatic.sh

It has stopped the emails coming though every ten minutes. Hope it hasn't done anything else it shouldn't have done.

Thanks again.

Wed, 05/16/2012 - 14:02
Atomboy

Sorry - posts crossed - will do as you say and put the others back the way I found them.

Tue, 10/02/2012 - 15:02
Locutus

I just stumbled over the same issue here.

I installed a new Ubuntu 12.04 production VM, and the awstats cron job entries were not commented out.

There is a similar entry in Ubuntu 10.04 by the way:

root@orion:/# cat /etc/cron.d/awstats
0,10,20,30,40,50 * * * * www-data [ -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

This one doesn't cause error emails getting sent though; probably due to the >/dev/null.

To disable the cron jobs, you can use Webmin's GUI too by the way.

Mon, 12/30/2013 - 16:01
nobodyfamous

I am also having this same issue, brand new install on ubuntu 12.04 LTS. I will comment out the lines.

Topic locked