Squid 3.4.12 + FreeBSD 8.4-STABLE

Peter Rosa prosa at pro.sk
Tue Mar 24 18:34:01 CET 2015


Zdravim vsetkych,

dnes som aktualizoval system, na ktorom bezi Squid - OS aj vsetky porty.

Po restarte ma cakalo nemile prekvapenie - squid nedokaze vytvorit 
/var/run/squid/squid.pid subor, na ktory caka inicializacny skript. Tym 
padom rc skript nikdy neskonci a system nenabehne do normalneho rezimu.

/usr/local/etc/rc.d/squid obsahuje funkciu squid_getpid():
# retrieve the PID of the Squid master process explicitly here
# in case rc.subr was unable to determine it:
if [ -z "$rc_pid" ]; then
   while ! [ -f ${pidfile} ]; do
     sleep 1
   done
   read _pid _junk <${pidfile}
   [ -z "${_pid}" ] || pid=${_pid}
else
   pid=${rc_pid}
fi

Po vypisani "ps ax | grep squid" dostanem:
4527  ??  Ss     0:00.00 /usr/local/sbin/squid -s -F -D -f 
/usr/local/etc/squid/squid.conf -s -F -D
4529  ??  S      0:00.45 (squid-1) -s -F -D -f 
/usr/local/etc/squid/squid.conf -s -F -D (squid)
4516   0  S+     0:00.01 /bin/sh /usr/local/etc/rc.d/squid start
4540   1  S+     0:00.00 grep squid

Samotny squid uz bezi (hlavny proces 4527) a pracuje (worker 1, proces 
4529), takze pripojenie na internet funguje. Ked rc skript zastavim cez 
Ctrl+C, tak squid zostane bezat v pozadi a vsetko funguje. Kedze vsak je 
nutne stlacit Ctrl+C, tak system po restarte nenabehne po login, kym 
rucne z konzoly nezastavim rc skript.

# squid -v
Squid Cache: Version 3.4.12
configure options:  '--with-default-user=squid' ... 
'--with-pidfile=/var/run/squid/squid.pid'

Opravnenia k /var/run/squid su:
drwxr-xr-x   2 squid     wheel      512 Mar 24 18:16 squid/


Poradite mi niekto, kde hladat chybu, alebo este lepsie, ako to opravit, 
prosim?


Prajem prijemny den,

-- 

Peter Rosa


More information about the Users-l mailing list