Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

Awstats: Error: Couldn’t open server log file … logresolvemerge.pl … access.log …. No such file or directory

Posted by chantra on April 9th, 2007

After an upgrade from Debian 3.1 (sarge) to Debian 4.0 (etch), awstats stopped automatically updating.

Awstats was complaining that the log files could found. By logging in to the server, user www-data was able to open the files, but still awstats was complaining.

After upgrading, the behaviour of awstats seem to have changed a bit. Updating the stats using logresolvemerge.pl resulted in the following error when using the command line:

www-data@host:~$ /usr/share/doc/awstats/examples/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl

/usr/lib/cgi-bin/awstats.pl -update -config=www.mysite.com -configdir="/etc/awstats"
Update for config "/etc/awstats/awstats.www.mysite.com.conf"
With data in log file "/usr/share/doc/awstats/examples/logresolvemerge.pl /var/log/apache2/access.log /var/log/apache2/access.log.1 |"...
Error: Couldn't open server log file "/usr/share/doc/awstats/examples/logresolvemerge.pl /var/log/apache2/access.log /var/log/apache2/access.log.1 |" : No such file or directory
Setup ('/etc/awstats/awstats.www.mysite.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

To work around this error, one of the possible reason (if you can confirm that user www-data can open the log files) is that logresolvemerge.pl does not get automatically executed, it is possible to force this by changing a line in /etc/awstats/awstats.www.mysite.com.conf and change:

LogFile="/usr/share/doc/awstats/examples/logresolvemerge.pl /var/log/apache2/access.log /var/log/apache2/access.log.1 |"

To:

LogFile="perl /usr/share/doc/awstats/examples/logresolvemerge.pl /var/log/apache2/access.log /var/log/apache2/access.log.1 |"

Please change the value of LogFile accordingly do your settings. Basically add perl at the beginning of the statement.

This fixed my issue, hopefully it will do the same for people reading this page :)

One Response to “Awstats: Error: Couldn’t open server log file … logresolvemerge.pl … access.log …. No such file or directory”

  1. I think that what you published was actually very reasonable.
    However, what about this? what if you typed a catchier post title?
    I ain't suggesting your information is not solid., however what if you added a post title to maybe grab folk's attention?
    I mean Awstats: Error: Couldn

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>