Squid Shutting Down and Wont Restart



  • Hi guys,

    I installed the latest PFSense and New Squid and Squidguard Package a week ago. and Im having issues lately..

    First of all forgive me because im not a LINUX savvy, so you please help me in troubleshooting this as understandable for a window guy..  :P :P :P

    Ill give you first the scenario.. I created a Time Based filter for a IP range.. everything is working fine, except that ive read that the scheduling really doesnt work or has bugs unless you restart Squid and Squidguard before the time in and time-off for the filter to properly work.. So i made a Cron Jobs schedule to this:

    /usr/local/sbin/squid -k shutdown
    7:29, 11:59, 12:59, 17:29

    /usr/local/sbin/squid
    7:30, 12:00, 13:00, 17:30

    now every 7:59 the squid shuts down and wont restart. Here is the error under Squid Cache Logs:

    11.11.2016 07:59:06      Shutdown: Basic authentication.
    11.11.2016 07:59:06 Shutdown: Digest authentication.
    11.11.2016 07:59:06 Shutdown: Negotiate authentication.
    11.11.2016 07:59:06 Shutdown: NTLM authentication.

    and under system Logs:

    Nov 11 07:29:59 Squid_Alarm 72173 Squid has exited. Reconfiguring filter.
    Nov 11 07:29:59 Squid_Alarm 72518 Attempting restart…
    Nov 11 07:30:02 Squid_Alarm 76803 Reconfiguring filter...

    there is another error that i cannot see anymore and forgot.. but for me to resolve this is to Click on the "Clear Disk Cache Now"
    also this happened not just 7:59am, i just dont have the screenshots for now..

    any ideas?

    Thanks in advance!



  • help somebody? :-\ :-\



  • it happened again guys..

    i dont know what to do…  :'(

    Squid - Cache Logs
    Date-Time Message
    01.01.1970 08:00:00
    01.01.1970 08:00:00
    01.01.1970 08:00:00
    11.11.2016 17:59:04 Shutdown: Basic authentication.
    11.11.2016 17:59:04 Shutdown: Digest authentication.
    11.11.2016 17:59:04 Shutdown: Negotiate authentication.
    11.11.2016 17:59:04 Shutdown: NTLM authentication.
    11.11.2016 17:31:00 Squid is already running! Process ID 64338
    01.01.1970 08:00:00
    01.01.1970 08:00:00



  • Any specific reason you're using squid -k shutdown instead of squid -k restart?



  • @KOM:

    Any specific reason you're using squid -k shutdown instead of squid -k restart?

    to be honest i just seen this command as a solution somewhere from researching regarding restarting the filter at a specific time for the time based filter to properly work….



  • Try it and see if it makes any difference.  I wasn't aware that the scheduler was broken to the point where you need to bounce squid.  I run squid/squidguard on my company LAN, and I have squidguard set to only allow recreational web access during lunch and after hours.  It works like a charm and i don't have to do anything funny to squid or squidguard so I'm not quite sure why you're going through this hassle.



  • @KOM:

    Try it and see if it makes any difference.  I wasn't aware that the scheduler was broken to the point where you need to bounce squid.  I run squid/squidguard on my company LAN, and I have squidguard set to only allow recreational web access during lunch and after hours.  It works like a charm and i don't have to do anything funny to squid or squidguard so I'm not quite sure why you're going through this hassle.

    when i first setup it, if i remember it right i was having problem with schedule, maybe i was doing it wrong back then and i have read about the issue with the schedule.. it was on the older version though i believe… i will try to remove cron jobs and observe if the schedule is properly kicking in on lunch and after hours..

    thanks



  • @KOM:

    Try it and see if it makes any difference.  I wasn't aware that the scheduler was broken to the point where you need to bounce squid.  I run squid/squidguard on my company LAN, and I have squidguard set to only allow recreational web access during lunch and after hours.  It works like a charm and i don't have to do anything funny to squid or squidguard so I'm not quite sure why you're going through this hassle.

    Hi Kom,

    It happened again. this time i have to manually restart the squid under service, since it is still blocking some site i have to allow..

    it didnt restart automatically or wont restart manually. and under cache logs it gave me the same error. i have to Clear Disk Now for it to resolve



  • Post screens of your config.



  • @KOM:

    Post screens of your config.

    Dashboard and Squid Server Screenshots
















  • Squidguard Config


















  • by the way, the settings that i omit from screenshots are settings that are still in default..

    thanks



  • Sorry to make you go through all that but it looks like your settings are fine.  I have no idea why you're having so much trouble with the schedule.



  • @KOM:

    Sorry to make you go through all that but it looks like your settings are fine.  I have no idea why you're having so much trouble with the schedule.

    Its ok brother no worries…. Actually the schedule is fine.. But the squid shutting down and not restarting unless you clear disk now is the problem..



  • Are you still using that cron job to shutdown squid and then start him again?  Did you try the restart option?



  • @KOM:

    Are you still using that cron job to shutdown squid and then start him again?  Did you try the restart option?

    Yes actually i tried the restart via cron.. But still does the issue, then  i removed all the cron job for squid, no error untill i manually restart squid…



  • Have you made sure that the pid for squid is down when your cron job run? Possible that the pid is still up that is why it is saying squid already exist.