Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to restart Squid and do a full lightsquid refresh daily

    Scheduled Pinned Locked Moved pfSense Packages
    7 Posts 4 Posters 14.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kopbeen
      last edited by

      Hi there,

      I have this problem with lightsquid that is just stops at random intervals creating reports. It’s either Squid that stops logging stuff or lightsquid that breaks… I tried asking the community for help on this before but got no help.

      I found a workaround. If i restart squid and so a full refresh in lightsquid, the reports starts happening again..  I please need some help on how to schedule this on a daily basis?

      Thx!

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        Setup squid log rotate.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • K
          kopbeen
          last edited by

          thanks for the reply.

          This is the part that confuses me..  ???

          In the  squid package, I set log rotate to 30 days. In lightsquid the 'Squid rotate log sheduler' are set to 1 day….  In /var/squid/log
          I can see the access.log, access.log.0, access.log.1 populated...  Are these two perhaps interfering with one anohter?

          I also set the refresh to 60min (in lightsquid) - I can can see that every hour the reports are updated. - but for some reason, maybe when the link is down and come back up again, I cannot see any reports in lightsquid... only when I restart squid + to a full refresh from the lightsquid package.

          Hope it make more sense now...

          1 Reply Last reply Reply Quote 0
          • K
            kopbeen
            last edited by

            Comeo on guys ? noboby can/want to help here?  :'(

            I started playing around with the logrotate settings in both squid and lightsquid:
            I have a hunch that somehow the squid logrotate and squidlight refresh mecanism clashes somewhere. I let squid logrotate (once a day), I then set the LightSquid rotate log sheduler to 'nothing' as well as the refresher to 50min.

            This seems to work, but now and again (every 3-4 days or so) logging and/or reporting stops, and then I need to manually press the Refresh Now button in LightSquid (and sometimes restart SQUID)

            Here is me /etc/crontab (which in my ooinion correlate to the above explanation..)

            0      *      *      *      *      root    /usr/bin/nice -n20 newsyslog
            1,31    0-5    *      *      *      root    /usr/bin/nice -n20 adjkerntz -a
            1      3      1      *      *      root    /usr/bin/nice -n20 /etc/rc.update_bogons.sh
            */60    *      *      *      *      root    /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 sshlockout
            1      1      *      *      *      root    /usr/bin/nice -n20 /etc/rc.dyndns.update
            */60    *      *      *      *      root    /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 virusprot
            */5    *      *      *      *      root    /usr/local/bin/checkreload.sh
            */5    *      *      *      *      root    /etc/ping_hosts.sh
            */140  *      *      *      *      root    /usr/local/sbin/reset_slbd.sh
            0      0      *      *      *      root    /usr/local/sbin/squid -k rotate
            */50    *      *      *      *      root    /usr/bin/perl /usr/local/www/lightsquid/lightparser.pl today
            15      0      *      *      *      root    /usr/bin/perl /usr/local/www/lightsquid/lightparser.pl yesterday

            What really confuse me is that I get both an hourly and a 50min-past-the-hour refresh when I view my report? Shouldn’t there only be a 50min refresh? crontab -l says there is no cron jobs for root…
            Something is still clashing but I don't know where to look anymore... any help will gladly be appreciated!

            1 Reply Last reply Reply Quote 0
            • K
              kopbeen
              last edited by

              k… maybe I can solve this one myself one day... :P here is more info/behaviour about issue, which hopefully bring us closer...

              When the PFSENSE box loses internet connectivity, (and it recovers by keeping the current dynamic IP), Squid itself just stop logging.... looking at /var/squid/log I can see that access.log  has 0 bytes.  (access.log.0 ... access.log.n) has entries on previous dates, which means my daily log rotate works.

              If I restart SQUID ... I can now see data in access.log (and then after the recurring 50min Squid light refresh) then the items appear in my report..
              Ok - as a workaround - by adding the following line to the /etc/cron to execute once a day... will there be any nasty consequences or suprises:
              "/usr/local/etc/rc.d/squid restart"

              Or is there a bug or something in Squid currently that causes logging to stop when the above explained scenario happens?

              1 Reply Last reply Reply Quote 0
              • N
                Nachtfalke
                last edited by

                I have a similar problem.

                I'm using squid2 and lightsquid. In both I set the log rotate to 30 days.
                But when I'm looking into me lightsquid reports, I can see more than 30 days of logs.

                Further, how is it possible to higher the log rotate in lightsquid to more than 30 days ? Or isn't it necessary in lightsquid, only in squid?

                This is al little bit unclear for me and I would appreciate your help.

                Thanks.

                1 Reply Last reply Reply Quote 0
                • L
                  lsoltero
                  last edited by

                  You might look at this discussion…

                  http://forum.pfsense.org/index.php/topic,26604.0.html

                  logs of gory details on squid vs light squid rotation issues.

                  Bottom line... currently you can do log rotation in squid or lightsquid but not both. If using light squid to do the rotation then make sure that log rotation is disabled in squid.

                  --luis

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.