Please to the following steps (in this order):
> 1) Shut down Squid.
> 2) Wait until its completed shutting down. ("ps aux | grep squid").
> 3) if the squid.pid fie is gone skip to step 4
> 3a) if squid.pid file is still present ensure there is no running process with
> same ID as inside it.
> 3b) shutdown the process with PID from inside squid.pid. repeat step 3.
> 4) erase the cache.log file
> 5) restart Squid
Thank you for help, above mentioned steps worked. After these steps Squid start working normally without any errors.
But please help more...! yes after system reboot, same error again. I think it's Squid's Start Up issue. I have tried to setup number of options in /etc/rc.conf: (All tested one by one, none worked)
squid_enable"YES"
/usr/local/sbin/squid
/usr/local/sbin/squid start
# Also try to create a startup script
#!/bin/sh
/usr/local/sbin/squid
chmod 755 /usr/local/etc/rc.d/squid.sh
Pasted the entry in "rc.conf" as
/usr/local/etc/rc.d/squid.sh
But none of above steps, worked...Only manually start method worked, please help howto setup automatically squid. After all the issue is "...multiple processes running with the same PID file."
When "/usr/local/sbin/squid" is set in rc.conf, Here's output of "ps aux | grep squid"
*******************************************************
# ps aux |grep squid
squid 289 0.2 0.6 72352 24060 ?? S 10:40AM 0:08.65 (squid-1) (squid)
root 23 0.0 0.2 47772 7652 ?? Is 10:40AM 0:00.00 /usr/local/sbin/squid
squid 290 0.0 0.1 19676 2208 ?? S 10:40AM 0:00.07 (logfile-daemon) /var/l
squid 291 0.0 0.1 19676 2172 ?? I 10:40AM 0:00.02 (unlinkd) (unlinkd)
operator 1831 0.0 0.2 47772 8288 ?? Ss 11:00AM 0:00.01 /usr/local/sbin/squid
root 1847 0.0 0.0 16424 1420 0 R+ 11:00AM 0:00.00 grep squid
*******************************************************
Thank you very much for you time and continued help.
----- Original Message -----
> From: Amos Jeffries <squid3_at_treenet.co.nz>
> To: "squid-users_at_squid-cache.org" <squid-users_at_squid-cache.org>; Squid Developers <squid-dev_at_squid-cache.org>
> Cc:
> Sent: Saturday, July 21, 2012 7:44 AM
> Subject: Re: [squid-users] Fw: [ERROR] commonUfsDirOpenSwapLog: Failed to open swap log
>
> On 21/07/2012 12:02 a.m., Anonymous wrote:
>> I search the "FATAL" in /var/log/squid/cache.log and didn't
> find anything. Here's all stuff:
>> **************************************************************
>> 2012/07/20 16:53:03| Squid is already running! Process ID 154
>
> You have multiple processes running with the same PID file. That may be the old
> problems of actually already running processes, or a clash between workers and
> the --with-pidfile option.
>
> Please to the following steps (in this order):
>
> 1) Shut down Squid.
> 2) Wait until its completed shutting down. ("ps aux | grep squid").
> 3) if the squid.pid fie is gone skip to step 4
> 3a) if squid.pid file is still present ensure there is no running process with
> same ID as inside it.
> 3b) shutdown the process with PID from inside squid.pid. repeat step 3.
> 4) erase the cache.log file
> 5) restart Squid
>
> If the crash is still occuring after all that please re-check the cache.log.
>
>
>
>> 2012/07/20 16:54:02 kid1| Starting Squid Cache version
> 3.2.0.18-20120717-r11615 for amd64-portbld-freebsd9.0...
>> 2012/07/20 16:54:02 kid1| Process ID 289
>> 2012/07/20 16:54:02 kid1| Process Roles: worker
>> 2012/07/20 16:54:02 kid1| With 11095 file descriptors available
>> 2012/07/20 16:54:02 kid1| Initializing IP Cache...
>> 2012/07/20 16:54:02 kid1| DNS Socket created at [::], FD 5
>> 2012/07/20 16:54:02 kid1| DNS Socket created at 0.0.0.0, FD 6
>> 2012/07/20 16:54:02 kid1| Adding nameserver 127.0.0.1 from squid.conf
>> 2012/07/20 16:54:02 kid1| Adding nameserver 8.8.8.8 from squid.conf
>> 2012/07/20 16:54:02 kid1| Logfile: opening log
> daemon:/var/log/squid/access.log
>> 2012/07/20 16:54:02 kid1| Logfile Daemon: opening log
> /var/log/squid/access.log
>> 2012/07/20 16:54:03 kid1| Unlinkd pipe opened on FD 12
>> 2012/07/20 16:54:03 kid1| Store logging disabled
>> 2012/07/20 16:54:03 kid1| Swap maxSize 10240000 + 262144 KB, estimated
> 807857 objects
>> 2012/07/20 16:54:03 kid1| Target number of buckets: 40392
>> 2012/07/20 16:54:03 kid1| Using 65536 Store buckets
>> 2012/07/20 16:54:03 kid1| Max Mem size: 262144 KB
>> 2012/07/20 16:54:03 kid1| Max Swap size: 10240000 KB
>> 2012/07/20 16:54:03 kid1| Rebuilding storage in /var/squid/cache/squid
> (dirty log)
>> 2012/07/20 16:54:03 kid1| Using Least Load store dir selection
>> 2012/07/20 16:54:03 kid1| Set Current Directory to /var/squid/cache/squid
>> 2012/07/20 16:54:03 kid1| Loaded Icons.
>> 2012/07/20 16:54:03 kid1| HTCP Disabled.
>> 2012/07/20 16:54:03 kid1| Squid plugin modules loaded: 0
>> 2012/07/20 16:54:03 kid1| Accepting HTTP Socket connections at
> local=[::]:1986 remote=[::] FD 15 flags=9
>> 2012/07/20 16:54:03 kid1| Done reading /var/squid/cache/squid swaplog (1581
> entries)
>
> NOTE: the swaplog in question here is the file which apparently failed to open
> ... has successfully been opened and 1581 records out of it processed.
>
>
> Amos
>
Received on Mon Jul 23 2012 - 06:02:56 MDT
This archive was generated by hypermail 2.2.0 : Mon Jul 23 2012 - 12:00:02 MDT