Re: [squid-users] Fw: [ERROR] commonUfsDirOpenSwapLog: Failed to open swap log

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 17 Jul 2012 23:08:10 +1200

On 17/07/2012 7:51 p.m., Anonymous wrote:
> Sorry! I forget to paste the Error Log displaying continuously on the console in my previous message. Here's error log:
> ******************************************************************
> [ERROR] commonUfsDirOpenSwapLog: Failed to open swap log
> ---------------------------------------------------------------------------
> Squid Parent: (squid-1) process 1870 exited with status 1
> Squid Parent: (squid-1) process 1874 started
> commonUfsDirOpenSwapLog: Failed to open swap log.
> Squid Parent: (squid-1) process 1874 exited with status 1
> Squid Parent: (squid-1) process 1879 started
> commonUfsDirOpenSwapLog: Failed to open swap log.
> Squid Parent: (squid-1) process 1879 exited with status 1
> Squid Parent: (squid-1) process 1879 will not be restarted due to repeated, frequent failures
> squid[1850]: Exiting due to repeated, frequent failures
> -------------***********************************************

These are the kernel messages about it.
The path to the failed fopen() is listed in cache.log at level 50,1
right before the "commonUfsDirOpenSwapLog" message is written.

> --- On Tue, 7/17/12, Anonymous wrote:
>
>> From: Anonymous

>> 1. OS: FreeBSD
>> 9.0-RELEASE-p3 amd64
>> 2. Squid User: squid:*:100:100:Squid
>> caching-proxy psuedo user:/var/squid:/usr/sbin/nologin
>> 3. # squid -v
>> Squid Cache: Version 3.2.0.18-20120711-r11610

>> configure options: '--with-default-user=squid'
>> '--bindir=/usr/local/sbin' '--sbindir=/usr/local/sbin'
>> '--datadir=/usr/local/etc/squid'
>> '--libexecdir=/usr/local/libexec/squid'
>> '--localstatedir=/var/squid'
>> --sysconfdir=/usr/local/etc/squid'
>> '--with-logdir=/var/log/squid'
>> '--with-pidfile=/var/run/squid/squid.pid'
Your PID file (/var/run/squid/squid.pid) is not inside the localstatedir
(/var/squid/). Does that work within BSD policy?

>> '--with-large-files' '--enable-removal-policies=lru heap'
>> '--enable-delay-pools' '--disable-linux-netfilter'
>> '--disable-linux-tproxy' '--disable-epoll'
>> '--disable-translation' '--enable-basic-auth-helpers=DB NCSA
>> PAM MSNT SMB squid_radius_auth YP'
>> '--enable-digest-auth-helpers=password'
>> '--enable-external-acl-helpers=ip_user session unix_group
>> wbinfo_group' '--enable-ntlm-auth-helpers=smb_lm'
>> '--enable-negotiate-auth-helpers=squid_kerb_auth'
>> '--enable-storeio=ufs diskd aufs' '--enable-disk-io=AIO
>> Blocking DiskDaemon DiskThreads' '--disable-ecap'
>> '--disable-loadable-modules' '--enable-kqueue'
>> '--prefix=/usr/local' '--mandir=/usr/local/man'
>> '--infodir=/usr/local/info/'
>> '--build=amd64-portbld-freebsd9.0'
>> 'build_alias=amd64-portbld-freebsd9.0' 'CC=cc' 'CFLAGS=-O2
>> -pipe -fno-strict-aliasing' 'LDFLAGS=' 'CPPFLAGS='
>> 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fno-strict-aliasing'
>> 'CPP=cpp'
>> '--with-squid=/work/a/ports/www/squid31/work/squid-3.1.16'
>> '--enable-ltdl-convenience'

FYI: configure options went under the knife in 3.2 and a lot of them
have some form of change. Particularly the ones with parameters. See the
squid-3.2 release notes for details.

>> --------------------------------------------------------------------------
>> 4. squid.conf >>
>> cache_effective_user squid

You built with "--with-default-user=squid" meaning the built-in value
for cache_effective_user is already "squid". You can omit that directive
from your config file.

>> # ls -all
>> /var/squid/cache/squid/swap.state
>> -rw-r----- 1 squid squid 130536 Jul 17
>> 08:35 /var/squid/cache/squid/swap.state

What version/release of Squid created this swap file?

What cache_dir lines does your squid config contain? there is no disk
cache by default in 3.2 series.

Amos
Received on Tue Jul 17 2012 - 11:08:27 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 18 2012 - 12:00:02 MDT