Announcement

Collapse
No announcement yet.

Squid doesn't start on boot sometimes

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Squid doesn't start on boot sometimes

    Just the subj. On my home desktop, approximately once every 10-15 reboots it fails to start and requires manual intervention.. Only one line logged to /var/log/squid/cache.log when it fails to start:

    2013/05/04 09:33:51| Starting Squid Cache version 2.7.STABLE9 for x86_64-pc-linux-gnu...
    $ dmesg | fgrep squid
    [ 25.458786] init: squid main process (1461) killed by HUP signal
    Kubuntu 11.10 Oneiric

    Please fix this embarrassing bug.

    #2
    I think I narrowed down the bug to file /etc/resolvconf/update-libc.d/squid
    #!/bin/sh

    PATH="/usr/sbin:/usr/bin:/sbin:/bin"

    # Move to the spool directory to avoid core dump in resolvconf
    cd /var/spool/squid

    # Make squid aware of changes to resolv.conf
    if status squid | grep "start/running" > /dev/null; then
    reload squid
    fi
    /etc/resolv.conf is a symlink to /etc/resolvconf/run/resolv.conf
    which never changes logically, it's always nameserver 127.0.0.1 although its mtime does change upon reboot.
    It seems that resolvconf doesn't take that into consideration and still sends HUP to squid too early during its startup phase, so it exits sometimes.
    I added sleep 10 before reload squid, hope this will work around the issue.

    Comment

    Working...
    X