| Summary: | Awstats do not compute stats | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Pierre Blavy <pierreblavy> |
| Component: | awstats | Assignee: | Petr Lautrbach <plautrba> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | plautrba, rpm |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-07 14:26:21 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Pierre Blavy
2011-12-14 10:12:50 UTC
You might have hit same problem as bug #768982. Stats are updated with cron script /etc/cron.hourly/awstats by default and this script is run with root privileges. What is your configuration? Helo Petr, what do you exactly means by ``configuration''? I've tryed to reconfigure everything from scratch, and I can still reproduce the bug, here is a full list of what I've done. # --- New install --- yum remove awstats rm /etc/httpd/conf.d/awstats.conf.rpmsave rm -rf /etc/awstats rm -rf /var/lib/awstats yum install awstats nano /etc/httpd/conf.d/awstats.conf (see detail below) htpasswd /etc/awstats/awstats.pwd user... service httpd restart #--- Configure --- The file /etc/awstats/awstats.tentacule.conf was magickly created by the installation I've changed the following lines SiteDomain="tentacule" --> SiteDomain="tentacule.be" HostAliases="REGEX[^.*tentacule$]" --> HostAliases="REGEX[^.*tentacule$] tentacule.is-a-geek.com" AllowFullYearView=2 --> AllowFullYearView=3 DNSLookup=2 --> DNSLookup=1 AllowToUpdateStatsFromBrowser=0 --> AllowToUpdateStatsFromBrowser=1 #--- Test from scratch WRONG PERMISSIONS --- Clean firefox cache login on stat web page (my page is in french, I've translated it) https://tentacule.be/awstats/awstats.pl?config=tentacule Dernière mise à jour: Jamais mis à jour (Voir 'Build/Update', page awstats_setup.html) Last update : Never updated(See 'Build/Update', page awstats_setup.html) --> click on `` Mise à jour immédiate'' (update now) Error: Couldn't open file "/var/lib/awstats/awstats012012.tentacule.tmp.1951" for write: Permission denied Setup ('/etc/awstats/awstats.tentacule.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory). #--- Fixing permission --- This error happens because awstats is runed by apache, while /var/lib/awstats/ is owned by root. An easy fix (that may have been done with the package install is) : chown apache:apache /var/lib/awstats Clean firefox cache Click on update now --> Stats works... #--- Testing the cron script FAIL --- - Visit some webpages in firefox - clean my firefox cache - run as root : /usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" - visit the awstats webpage I get no errors with the update script (full log below) I DO NOT SEE ANY changes in the awstat webpage If I click again on the update now button, the changes are taken into account. --> Something is probably messed up with the cron script. --- /etc/cron.hourly/awstats --- #!/bin/bash exec /usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" >/dev/null exit 0 --- /etc/httpd/conf.d/awstats.conf --- # default Alias /awstatsclasses "/usr/share/awstats/wwwroot/classes/" Alias /awstatscss "/usr/share/awstats/wwwroot/css/" Alias /awstatsicons "/usr/share/awstats/wwwroot/icon/" ScriptAlias /awstats/ "/usr/share/awstats/wwwroot/cgi-bin/" #My config <Directory "/usr/share/awstats/wwwroot"> AuthName "Stats" AuthType Basic AuthUserFile /etc/awstats/awstats.pwd require valid-user </Directory> #Default <IfModule mod_env.c> SetEnv PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins </IfModule> --- Cron script output --- 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.0 (build 1.971) From data in log file "/var/log/httpd/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)... Jumped lines in file: 0 Parsed lines in file: 1967 Found 1959 dropped records, Found 0 comments, Found 0 blank records, Found 8 corrupted records, Found 0 old records, Found 0 new qualified records. Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update -config=tentacule -configdir="/etc/awstats"' to update config tentacule Create/Update database for config "/etc/awstats/awstats.tentacule.conf" by AWStats version 7.0 (build 1.971) 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 1932) Jumped lines in file: 1932 Found 1932 already parsed records. Parsed lines in file: 35 Found 35 dropped records, Found 0 comments, Found 0 blank records, Found 0 corrupted records, Found 0 old records, Found 0 new qualified records. --- /etc/awstats/awstats.tentacule.conf --- https://tentacule.be/share/awstats.tentacule.conf (In reply to comment #2) > AllowToUpdateStatsFromBrowser=0 --> AllowToUpdateStatsFromBrowser=1 > > #--- Test from scratch WRONG PERMISSIONS --- > Clean firefox cache > login on stat web page (my page is in french, I've translated it) > https://tentacule.be/awstats/awstats.pl?config=tentacule > > Dernière mise à jour: Jamais mis à jour (Voir 'Build/Update', page > awstats_setup.html) > Last update : Never updated(See 'Build/Update', page awstats_setup.html) > > --> click on `` Mise à jour immédiate'' (update now) > > Error: Couldn't open file "/var/lib/awstats/awstats012012.tentacule.tmp.1951" > for write: Permission denied > > Setup ('/etc/awstats/awstats.tentacule.conf' file, web server or permissions) > may be wrong. > Check config file, permissions and AWStats documentation (in 'docs' directory). There is comment in DirData section: # Warning: If you want to be able to use the "AllowToUpdateStatsFromBrowser" # feature (see later), you need "Write" permissions by web server user on this # directory (and "Modify" for Windows NTFS file systems). As long as AllowToUpdateStatsFromBrowser is set to 0 by default, apache doesn't need to write in awstats files. I won't change these permissions by default considering this is potentially vulnerable configuration - other cgi script would be allowed to change awstats files. You need to change them manually. > > > #--- Testing the cron script FAIL --- > - Visit some webpages in firefox > - clean my firefox cache > - run as root : > /usr/share/awstats/tools/awstats_updateall.pl now > -configdir="/etc/awstats" > -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" > - visit the awstats webpage > > > I get no errors with the update script (full log below) > I DO NOT SEE ANY changes in the awstat webpage > If I click again on the update now button, the changes are taken into account. > > --> Something is probably messed up with the cron script. > > > > > > --- /etc/cron.hourly/awstats --- > #!/bin/bash > exec /usr/share/awstats/tools/awstats_updateall.pl now > -configdir="/etc/awstats" > -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" >/dev/null > exit 0 > > > > --- Cron script output --- > 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.0 (build > 1.971) > From data in log file "/var/log/httpd/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)... > Jumped lines in file: 0 > Parsed lines in file: 1967 > Found 1959 dropped records, > Found 0 comments, > Found 0 blank records, > Found 8 corrupted records, > Found 0 old records, > Found 0 new qualified records. > > Running '"/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" -update > -config=tentacule -configdir="/etc/awstats"' to update config tentacule > Create/Update database for config "/etc/awstats/awstats.tentacule.conf" by > AWStats version 7.0 (build 1.971) > 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 1932) > Jumped lines in file: 1932 > Found 1932 already parsed records. > Parsed lines in file: 35 > Found 35 dropped records, > Found 0 comments, > Found 0 blank records, > Found 0 corrupted records, > Found 0 old records, > Found 0 new qualified records. > This is probably problem described in bug #771031, please try awstats-7.0-6.fc16 [1] update. [1] https://admin.fedoraproject.org/updates/FEDORA-2012-0021/awstats-7.0-6.fc16 Given comment #3 and package update, I'm closing this one as WORKSFORME. Feel free to reopen it, if updated package haven't solved your problem. Works for me now. Thank. |