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

    Squid3 access.log rotation

    Scheduled Pinned Locked Moved pfSense Packages
    9 Posts 3 Posters 9.3k 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.
    • C
      Cino
      last edited by

      Maybe I'm looking at this all wrong because of experience with sqiud2. But I can't seem to get squid3 to rotate the access.log file.

      I have "logfile_rotate 1" in the squid.conf file and there is cron job to rotate the log. I've even manually ran /usr/local/sbin/squid -k rotate

      Any ideas?

      What is everyone else doing for their squid3 log rotation and retention?

      1 Reply Last reply Reply Quote 0
      • C
        Cino
        last edited by

        No one using squid3 out there? I can't be the only one

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          Hi cino,

          I think there maybe a missing conf on bsd rotate scripts(if any on pfsense)

          http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590833

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • C
            Cino
            last edited by

            Thanks Marcelloc! I take a look and see if maybe I can copy it over to my box

            Stephen

            1 Reply Last reply Reply Quote 0
            • C
              Cino
              last edited by

              I went ahead and installed logrotate and that seem to do the trick.. just have to tweak it now… thank you again!

              I somewhat followed this how-to http://teklimbu.wordpress.com/2007/10/16/managing-your-linuxunix-log-files-using-logrotate/

              now i just to make sure it doesn't lose data when LightSquid runs

              Stephen

              1 Reply Last reply Reply Quote 0
              • A
                atpoirie
                last edited by

                I tried changing the permissions on the log files chmod 777 /var/squid/logs/* and then did squid -k rotate and it was able to rotate.

                Since everything is owned by user proxy it looks like the squid user doesn't have permission to create and move files in /var/squid

                1 Reply Last reply Reply Quote 0
                • C
                  Cino
                  last edited by

                  thanks apoirie!! Not sure if I had tried that already but i'll give it a shot.. If this works, I'll probably keep logrotate in place for now since i have it setup to keep 90days of web logs, 7 days of cache.log and setup for squidguard also.

                  1 Reply Last reply Reply Quote 0
                  • A
                    atpoirie
                    last edited by

                    The permission change worked initially, but there appears to be something else going wrong with rotating the log files.  My current speculation is that it has something to do with the size of the log file that is getting rotated as mine can easily hit 1Gb in size in a day.

                    1 Reply Last reply Reply Quote 0
                    • A
                      atpoirie
                      last edited by

                      Something that worked this time, who knows why.  I stopped the squid service and then started it usingsquid -d 9to get it to log what was going on to the console.  In a separate console I ran```
                      squid -k rotate

                      
                      ***EDIT****
                      Found same thing was occurring on a second pfsense box, same version, same installed add-ons, much less traffic.  Did the commands listed above and rotate finally worked again.  I'm also killing the squid -d 9 process that I started for doing the log rotation and starting squid again through the web console.
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.