squid -k rotate does nothing

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

squid -k rotate does nothing

Wet Mogwai
My squid machine stopped rotating logs recently. The last time rotate worked was the day before I copied the access.log to my laptop for the first time. The only changes made to the configuration that day were the good.hosts , bad.hosts, good.ip, and bad.ip files. After making the new files for the ACLs, I ran squid -k reload.

I tried setting the logfile_rotate option in squid.conf in case it was ignoring the default. I have checked ownership and permissions. Everything seems right. It is still writing to the log, so it is getting to be quite large. I could write my own rotate script, but I'd rather get the existing function working.

This has been working properly for at least a year and a half. What could have caused squid to quit rotating?

I am running Squid Cache: Version 2.5.STABLE14 on FreeBSD 6.1-RELEASE-p8 (SQUID_KERNEL). Logrotate is in the ports tree, but it is not installed.
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Slacker-4
Wet Mogwai, on 09/04/2007 08:30 PM [GMT+500], wrote :

> My squid machine stopped rotating logs recently. The last time rotate worked
> was the day before I copied the access.log to my laptop for the first time.
> The only changes made to the configuration that day were the good.hosts ,
> bad.hosts, good.ip, and bad.ip files. After making the new files for the
> ACLs, I ran squid -k reload.
>
> I tried setting the logfile_rotate option in squid.conf in case it was
> ignoring the default. I have checked ownership and permissions. Everything
> seems right. It is still writing to the log, so it is getting to be quite
> large. I could write my own rotate script, but I'd rather get the existing
> function working.
>
> This has been working properly for at least a year and a half. What could
> have caused squid to quit rotating?
>
> I am running Squid Cache: Version 2.5.STABLE14 on FreeBSD 6.1-RELEASE-p8
> (SQUID_KERNEL). Logrotate is in the ports tree, but it is not installed.
>  
I am not sure why log rotation  suddenly stopped working, however i
thinks its time to upgrade to new code, fbsd 6.1 have squid 2.6.14 in
there ports tree better to upgrade it.

Do not forget to read changlog from 2.5 to 2.6 :)

Regards,

Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Tek Bahadur Limbu
In reply to this post by Wet Mogwai
Hi Mogwai,

Wet Mogwai wrote:

> My squid machine stopped rotating logs recently. The last time rotate worked
> was the day before I copied the access.log to my laptop for the first time.
> The only changes made to the configuration that day were the good.hosts ,
> bad.hosts, good.ip, and bad.ip files. After making the new files for the
> ACLs, I ran squid -k reload.
>
> I tried setting the logfile_rotate option in squid.conf in case it was
> ignoring the default. I have checked ownership and permissions. Everything
> seems right. It is still writing to the log, so it is getting to be quite
> large. I could write my own rotate script, but I'd rather get the existing
> function working.
>
> This has been working properly for at least a year and a half. What could
> have caused squid to quit rotating?
>
> I am running Squid Cache: Version 2.5.STABLE14 on FreeBSD 6.1-RELEASE-p8
> (SQUID_KERNEL). Logrotate is in the ports tree, but it is not installed.


Are you sure that the absolute location of your squid's binary is
correct while you issue the command "squid -k rotate"?

Since you are using FreeBSD-6.1, you have at least 2 options to manage
your squid logs.

The simple way is by using /etc/newsyslog.conf  file.

Putting the following entry in newsyslog.conf will rotate your logs at
10 PM.

/var/log/squid/access.log        squid:squid     644  7   * @T22       J
       /usr/local/squid/logs/squid.pid      30

You can also use the logrotate program to do the job but is a little
difficult to setup but worth it.


Please see the following thread for more details:

http://www.mail-archive.com/squid-users@.../msg48054.html


Like another user had said, you should really upgrade to the latest
stable version of Squid which is 2.6.STABLE14 currently. It has lots of
extra features and is extremely CPU friendly. You will really appreciate it.


You can find it latest source from the URL below:

http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE14.tar.gz


Hope it helps.


Thanking you....




--

With best regards and good wishes,

Yours sincerely,

Tek Bahadur Limbu

System Administrator

(TAG/TDG Group)
Jwl Systems Department

Worldlink Communications Pvt. Ltd.

Jawalakhel, Nepal

http://www.wlink.com.np
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Wet Mogwai
I checked the path. It is correct.

I like the idea of upgrading, but this is an important production machine with no backup. If I can convince them to get another machine, I'll make this one a backup and upgrading won't bother me as much.

I'll try the newsyslog.conf after everyone goes home today.
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Goldorak
If i was you, i will stop squid,
delete all log files manually,
delete the cache, (rm -fr /cache)
rebuild the cache (squid -z)
and restart squid.

maybe the log files are too large, maybe something is
wrong in the cache somewhere.

Regards,


--- Wet Mogwai <[hidden email]> a écrit :

>
> I checked the path. It is correct.
>
> I like the idea of upgrading, but this is an
> important production machine
> with no backup. If I can convince them to get
> another machine, I'll make
> this one a backup and upgrading won't bother me as
> much.
>
> I'll try the newsyslog.conf after everyone goes home
> today.
> --
> View this message in context:
>
http://www.nabble.com/squid--k-rotate-does-nothing-tf4378437.html#a12482350
> Sent from the Squid - Users mailing list archive at
> Nabble.com.
>
>



      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Wet Mogwai
Worth a try. I like that better than changing to a new log rotation system.

Goldorak wrote
If i was you, i will stop squid,
delete all log files manually,
delete the cache, (rm -fr /cache)
rebuild the cache (squid -z)
and restart squid.

maybe the log files are too large, maybe something is
wrong in the cache somewhere.

Regards,


--- Wet Mogwai <rob@datablitz.net> a écrit :

>
> I checked the path. It is correct.
>
> I like the idea of upgrading, but this is an
> important production machine
> with no backup. If I can convince them to get
> another machine, I'll make
> this one a backup and upgrading won't bother me as
> much.
>
> I'll try the newsyslog.conf after everyone goes home
> today.
> --
> View this message in context:
>
http://www.nabble.com/squid--k-rotate-does-nothing-tf4378437.html#a12482350
> Sent from the Squid - Users mailing list archive at
> Nabble.com.
>
>



      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Goldorak
I wish you can tell me if it worked.

If not, i could take a look at ur server, I am running
squid for 7 years, and i have some experience with it.



--- Wet Mogwai <[hidden email]> a écrit :

>
> Worth a try. I like that better than changing to a
> new log rotation system.
>
>
> Goldorak wrote:
> >
> > If i was you, i will stop squid,
> > delete all log files manually,
> > delete the cache, (rm -fr /cache)
> > rebuild the cache (squid -z)
> > and restart squid.
> >
> > maybe the log files are too large, maybe something
> is
> > wrong in the cache somewhere.
> >
> > Regards,
> >
> >
> > --- Wet Mogwai <[hidden email]> a écrit :
> >
> >>
> >> I checked the path. It is correct.
> >>
> >> I like the idea of upgrading, but this is an
> >> important production machine
> >> with no backup. If I can convince them to get
> >> another machine, I'll make
> >> this one a backup and upgrading won't bother me
> as
> >> much.
> >>
> >> I'll try the newsyslog.conf after everyone goes
> home
> >> today.
> >> --
> >> View this message in context:
> >>
> >
>
http://www.nabble.com/squid--k-rotate-does-nothing-tf4378437.html#a12482350

> >> Sent from the Squid - Users mailing list archive
> at
> >> Nabble.com.
> >>
> >>
> >
> >
> >
> >      
> >
>
_____________________________________________________________________________

>
> > Ne gardez plus qu'une seule adresse mail ! Copiez
> vos mails vers Yahoo!
> > Mail
> >
> >
>
> --
> View this message in context:
>
http://www.nabble.com/squid--k-rotate-does-nothing-tf4378437.html#a12486765
> Sent from the Squid - Users mailing list archive at
> Nabble.com.
>
>



      _____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Matus UHLAR - fantomas
In reply to this post by Wet Mogwai
On 04.09.07 08:30, Wet Mogwai wrote:
> My squid machine stopped rotating logs recently. The last time rotate worked
> was the day before I copied the access.log to my laptop for the first time.
> The only changes made to the configuration that day were the good.hosts ,
> bad.hosts, good.ip, and bad.ip files. After making the new files for the
> ACLs, I ran squid -k reload.

did you check cache log file for config errors?

> I tried setting the logfile_rotate option in squid.conf in case it was
> ignoring the default. I have checked ownership and permissions. Everything
> seems right. It is still writing to the log, so it is getting to be quite
> large. I could write my own rotate script, but I'd rather get the existing
> function working.

how is logfile_rotate currently set?

> This has been working properly for at least a year and a half. What could
> have caused squid to quit rotating?
>
> I am running Squid Cache: Version 2.5.STABLE14 on FreeBSD 6.1-RELEASE-p8
> (SQUID_KERNEL). Logrotate is in the ports tree, but it is not installed.

2.5? Upgrade to 2.6 asap
--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Enter any 12-digit prime number to continue.
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

****Ronny****
In reply to this post by Wet Mogwai
Putting that aside, when are the rotations set;daily,weekly or
something.You might have set them to weekly and its just 3 days now.It
happened to me :-)
Ronny

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
If I have seen further it is by standing on the shoulders of giants.
--Isaac Newton
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*





Wet Mogwai wrote:
> I checked the path. It is correct.
>
> I like the idea of upgrading, but this is an important production machine
> with no backup. If I can convince them to get another machine, I'll make
> this one a backup and upgrading won't bother me as much.
>
> I'll try the newsyslog.conf after everyone goes home today.
>  
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Henrik Nordström
In reply to this post by Wet Mogwai
On tis, 2007-09-04 at 08:30 -0700, Wet Mogwai wrote:
> My squid machine stopped rotating logs recently. The last time rotate worked
> was the day before I copied the access.log to my laptop for the first time.
> The only changes made to the configuration that day were the good.hosts ,
> bad.hosts, good.ip, and bad.ip files. After making the new files for the
> ACLs, I ran squid -k reload.

Check that the pid file exists, and have the right pid number in it...

Also check cache.log for any errors..
Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Wet Mogwai
In reply to this post by Wet Mogwai
Thanks for the help. The problem has been resolved. It was an ownership problem in a place that I didn't think to look. The owner of the log directory somehow got changed to a UID that doesn't match a user. After fixing that, rotate works properly.

Wet Mogwai wrote
My squid machine stopped rotating logs recently. The last time rotate worked was the day before I copied the access.log to my laptop for the first time. The only changes made to the configuration that day were the good.hosts , bad.hosts, good.ip, and bad.ip files. After making the new files for the ACLs, I ran squid -k reload.

I tried setting the logfile_rotate option in squid.conf in case it was ignoring the default. I have checked ownership and permissions. Everything seems right. It is still writing to the log, so it is getting to be quite large. I could write my own rotate script, but I'd rather get the existing function working.

This has been working properly for at least a year and a half. What could have caused squid to quit rotating?

I am running Squid Cache: Version 2.5.STABLE14 on FreeBSD 6.1-RELEASE-p8 (SQUID_KERNEL). Logrotate is in the ports tree, but it is not installed.
Reply | Threaded
Open this post in threaded view
|

Re: squid -k rotate does nothing

Amos Jeffries
Administrator
In reply to this post by Henrik Nordström
> On tis, 2007-09-04 at 08:30 -0700, Wet Mogwai wrote:
>> My squid machine stopped rotating logs recently. The last time rotate
>> worked
>> was the day before I copied the access.log to my laptop for the first
>> time.
>> The only changes made to the configuration that day were the good.hosts
>> ,
>> bad.hosts, good.ip, and bad.ip files. After making the new files for the
>> ACLs, I ran squid -k reload.
>
> Check that the pid file exists, and have the right pid number in it...
>
> Also check cache.log for any errors..
> Regards
> Henrik
>

I've been having some trouble myself with the rotation recently.
FYI, I tracked it down to the logrotate.d script for squid. It was running:

  test ! -e /var/log/squid.pid || squid3 -k rotate

when squid builds the pid at /var/logs/squid.pid.

That stopped squid from actually doing the rotate unless it was run
manually as root.

Amos