Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» Packages» squid3 access.log rotation
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: squid3 access.log rotation  (Read 2392 times)
0 Members and 1 Guest are viewing this topic.
Cino
Hero Member
*****
Offline Offline

Posts: 1005


View Profile
« on: February 01, 2012, 12:58:41 pm »

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?
Logged
Cino
Hero Member
*****
Offline Offline

Posts: 1005


View Profile
« Reply #1 on: February 05, 2012, 10:51:19 am »

No one using squid3 out there? I can't be the only one
Logged
marcelloc
Hero Member
*****
Offline Offline

Posts: 8173



View Profile
« Reply #2 on: February 06, 2012, 08:13:21 am »

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

Logged

Have I helped you? Donations are always welcome! Grin

Te ajudei? Doações são sempre bem vindas! Grin
Cino
Hero Member
*****
Offline Offline

Posts: 1005


View Profile
« Reply #3 on: February 06, 2012, 01:53:59 pm »

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

Stephen
Logged
Cino
Hero Member
*****
Offline Offline

Posts: 1005


View Profile
« Reply #4 on: February 06, 2012, 03:33:48 pm »

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
« Last Edit: February 06, 2012, 03:46:04 pm by Cino » Logged
atpoirie
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #5 on: February 17, 2012, 03:48:57 pm »

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
Logged
Cino
Hero Member
*****
Offline Offline

Posts: 1005


View Profile
« Reply #6 on: February 19, 2012, 09:54:55 am »

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.
Logged
atpoirie
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #7 on: March 01, 2012, 07:50:02 am »

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.
Logged
atpoirie
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #8 on: March 01, 2012, 08:23:22 am »

Something that worked this time, who knows why.  I stopped the squid service and then started it using
Code:
squid -d 9
to get it to log what was going on to the console.  In a separate console I ran
Code:
squid -k rotate
and then it worked without error.  No idea why that would make any difference.

***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.
« Last Edit: March 01, 2012, 10:27:47 am by atpoirie » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.026 seconds with 20 queries.