#30 sarg not generating report

open
nobody
None
5
2014-08-22
2012-09-03
Diego
No

I have compiled sarg 2.3.2 to update an old version previously installed on my SLES server but I am having problems generating reports from squid-squidGuard.

This is how I compiled sarg:
CFLAGS="-std=gnu99" ./configure --bindir=/usr/bin --sysconfdir=/usr/local/sarg --enable-fontdir=/usr/local/sarg --enable-imagedir=/usr/local/sarg --enable-sargphp=/usr/local/sarg

Sarg sais the report is generated but the folder and files do no t exist.

SARG: Successful report generated on /srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012
SARG: Purging temporary file sarg-general
SARG: (removetmp) Cannot open file /srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012/sarg-general

what should I do ?

Discussion

  • Frederic Marchal

    Could you please post the full debug output produced when you run sarg with the two command line arguments -x -z (in addition to the arguments you usually use)?

    Can you also try sarg 2.3.3-pre2 available here: http://sourceforge.net/projects/sarg/files/sarg/sarg-2.3.3/

    Frederic

     
  • Diego

    Diego - 2012-09-04

    Hi Frederic,

    I´ll try the newer version, for now here is the output from sarg:

    /var/log/squid/access.log-20120717.bz2
    /var/log/squid/access.log-20120718.bz2
    SARG: Init
    SARG: Loading configuration from /usr/local/sarg/sarg.conf
    SARG: Parameters:
    SARG: Hostname or IP address (-a) =
    SARG: Useragent log (-b) =
    SARG: Exclude file (-c) =
    SARG: Date from-until (-d) = 18/07/2012-18/07/2012
    SARG: Email address to send reports (-e) =
    SARG: Config file (-f) = /usr/local/sarg/sarg.conf
    SARG: Date format (-g) = Europe (dd/mm/yyyy)
    SARG: IP report (-i) = Yes
    SARG: Input log (-l) = /tmp/access.log.tmp
    SARG: Resolve IP Address (-n) = No
    SARG: Output dir (-o) = /srv/www/htdocs/squid-reports/ondemand/
    SARG: Use Ip Address instead of userid (-p) = No
    SARG: Accessed site (-s) =
    SARG: Time (-t) =
    SARG: User (-u) =
    SARG: Temporary dir (-w) = /tmp/sarg
    SARG: Debug messages (-x) = Yes
    SARG: Process messages (-z) = Yes
    SARG: Previous reports to keep (--lastlog) = 0
    SARG:
    SARG: sarg version: 2.3.2 Nov-23-2011
    SARG: Reading access log file: /tmp/access.log.tmp
    SARG: Records read: 67713, written: 28238, excluded: 0
    SARG: Squid log format
    SARG: Period covered by log files: 18/07/2012-18/07/2012
    SARG: (info) date=18/07/2012
    SARG: (info) period=18 Jul 2012
    SARG: Period: 18 Jul 2012
    SARG: pre-sorting files
    SARG: (info) outdirname=/srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012
    SARG: Making file: /tmp/sarg/10_2_1_34
    SARG: Making file: /tmp/sarg/10_52_0_120
    SARG: Making file: /tmp/sarg/10_85_0_110
    SARG: Making file: /tmp/sarg/10_85_0_119
    SARG: Making file: /tmp/sarg/10_63_0_105
    SARG: Making file: /tmp/sarg/10_69_0_103
    SARG: Making file: /tmp/sarg/10_4_0_118
    ....
    SARG: (info) Dansguardian report not produced because no dansguardian configuration file was provided
    SARG: Reading redirector log file /var/log/squidGuard/users-freelogs
    SARG: Reading redirector log file /var/log/squidGuard/users-soportefreelogs
    SARG: Reading redirector log file /var/log/squidGuard/users-stdlogs
    SARG: Reading redirector log file /var/log/squidGuard/adult-log
    SARG: Reading redirector log file /var/log/squidGuard/blacklist-log
    SARG: Reading redirector log file /var/log/squidGuard/chat-log
    SARG: Reading redirector log file /var/log/squidGuard/dating-log
    SARG: Reading redirector log file /var/log/squidGuard/exemptions-log
    SARG: Reading redirector log file /var/log/squidGuard/exemptions-free-log
    SARG: Reading redirector log file /var/log/squidGuard/downloads-log
    SARG: Reading redirector log file /var/log/squidGuard/gamble-log
    SARG: Reading redirector log file /var/log/squidGuard/hacking-log
    SARG: Reading redirector log file /var/log/squidGuard/instantmessaging-log
    SARG: Reading redirector log file /var/log/squidGuard/models-log
    SARG: Reading redirector log file /var/log/squidGuard/movies-log
    SARG: Reading redirector log file /var/log/squidGuard/music-log
    SARG: Reading redirector log file /var/log/squidGuard/orgs-log
    SARG: Reading redirector log file /var/log/squidGuard/porn-log
    SARG: Reading redirector log file /var/log/squidGuard/spyware-log
    SARG: Reading redirector log file /var/log/squidGuard/tracker-log
    SARG: Reading redirector log file /var/log/squidGuard/tunning-log
    SARG: Reading redirector log file /var/log/squidGuard/warez-log
    SARG: Reading redirector log file /var/log/squidGuard/webradio-log
    SARG: Reading redirector log file /var/log/squidGuard/webtv-log
    SARG: Reading redirector log file /var/log/squidGuard/socialnet-log
    SARG: Reading redirector log file /var/log/squidGuard/socialnetworking-log
    SARG: Sorting file: /tmp/sarg/redirector.log
    SARG: (info) Denied report not produced because it is empty
    SARG: Sorting file: /tmp/sarg/xxxxx.utmp
    SARG: Making report: xxxxx
    SARG: Sorting file: /tmp/sarg/yyyyyy.utmp
    SARG: Making report: yyyy
    ....
    SARG: Making index.html
    SARG: Successful report generated on /srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012
    SARG: Purging temporary file sarg-general
    SARG: (removetmp) Cannot open file /srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012/sarg-general

     
  • Frederic Marchal

    I can't see anything wrong in the output. It should have worked...

    Is there any file in /srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012/ when sarg exits?

    Is /srv/www/htdocs/squid-reports/ondemand/18Jul2012-18Jul2012/ on a remote server?

    Does the user running sarg have write access on the directory where the report is generated?

    Could you have multiple instances of sarg running (such as a very aggressive cron job)?

     
  • Diego

    Diego - 2012-09-05

    I is weird, right?

    The folder is on the same server, I am using the same scritp I was before upgrading sarg version, I checked folder permissions and everything is ok.

    I just don´t understand :S

     
  • Frederic Marchal

    Could you fetch the latest source with this command:

    git clone git://sarg.git.sourceforge.net/gitroot/sarg/sarg

    Compile it as usual (with ./configure and make) then simply replace the sarg executable on your server by the one you compiled. Make a backup copy of the original sarg as you will certainly want to revert to it once the problem is solved.

    Try to reproduce the error you are seeing with sarg 2.3.2 and post the error message.

    The version you'll have is the future 2.4.0 version. It contains several changes. The change I'm interested in is the one I just committed. The system error message is written along with the error message given by sarg. Therefore, the reason for the error should be clearer than the terse "cannot open file". I hope to see why sarg is failing on your system.

     
  • Diego

    Diego - 2012-09-10

    Hi Frederic, sorry to boder, coul you provide the configure file?

     
  • Frederic Marchal

    Configure script for sarg 2.4.0

     
    Attachments
  • Frederic Marchal

    The configure script is created by autoconf. A configure script is attached to this tracker.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks