[squid-users] Re: R: R: [squid-users] Two squid processes can run as squid users ?!

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 06 Jun 2009 01:13:52 +1200

Riccardo Castellani wrote:
> When I say squid user, I reference to proxy user for 2.7 version.
>
> This is my output of squid processes:
>
> A) root 3617 1 0 Jun03 ? 00:00:00 /usr/sbin/squid -D -YC
> B) proxy 3621 3617 0 Jun03 ? 00:00:01 (squid) -D -YC
> C) proxy 3622 3621 0 Jun03 ? 00:00:00 (unlinkd)
>
> There are 3 processes, where A is the squid monitor.
> I'd like knowing if I can run only processes B+C, excluding A; if I remember
> right many years ago I had problems with monitor process because squid
> starting went loop. Monitor tried to start squid until 10 times.

Many years is a long time. Many things get fixed over long times.
Try working with what is there _now_ and see how it works.

Particularly since this is a completely different monitor process than
any of the versions you have run so far.
This one is well tested over the last 4-5 years and will start exactly
one squid at a time.

> I'm also interesting to know how start squid without using monitor process
> (A). What do you think ?
>

-N option for disabling daemon mode.
The master process becomes the live Squid and runs in foreground.

>
>> I don't quite understand what you are meaning by "two processes".
>>
>
> It means only B+C
>
>
>
>> I'd also recommend getting rid of cache_effective_group and ensuring the
>> OS group privileges are correctly set for the squid user
>
> I have not to use "cache_effective_group" directive but what means "ensuring
> the OS group privileges are correctly set for the squid user" ?

Making sure the OS settings have 'proxy' user as a member of 'proxy' group.

Amos

>
> -----Messaggio originale-----
> Da: Amos Jeffries [mailto:squid3_at_treenet.co.nz]
> Inviato: Friday, June 05, 2009 5:33 AM
> A: Riccardo Castellani
> Oggetto: Re: R: [squid-users] Two squid processes can run as squid users ?!
>
> Riccardo Castellani wrote:
>> About "I'm not sure from that info why the unlinkd is not also showing up"
>> I forgot this entry in SQUID 2.7 infact reduced output with grep but only
>> "squid" word.
>>
>> proxy 3622 3621 0 Jun03 ? 00:00:00 (unlinkd)
>>
>> If I want 2 squid running processes excluding 3rd root process (which
>> monitors squid), how can I set this behaviour ?
>>
>
> I don't quite understand what you are meaning by "two processes".
>
> * two "(squid) -D -YC" processes?
> http://wiki.squid-cache.org/MultipleInstances
>
> * two processing running as 'squid' user?
> "cache_effective_user squid"
>
>
> Amos
>
>>
>> I forgot this lines
>>
>> -----Messaggio originale-----
>> Da: Amos Jeffries [mailto:squid3_at_treenet.co.nz]
>> Inviato: Thursday, June 04, 2009 2:07 PM
>> A: Riccardo Castellani
>> Cc: squid-users_at_squid-cache.org
>> Oggetto: Re: [squid-users] Two squid processes can run as squid users ?!
>>
>> Riccardo Castellani wrote:
>>> I'm migrating from "Squid 2.5.STABLE3" to "Squid 2.7.STABLE3" but I noted
>>> this point:
>>>
>>>
>>> SQUID 2.5
>>>
>>> There are 2 squid processes which run both as squid user:
>>>
>>> squid 11959 1 6 May25 ? 15:44:49 (squid) -D
>>> squid 12022 11959 0 May25 ? 00:01:38 (unlinkd)
>>>
>>> This is a part of my squid.conf:
>>> #cache_effective_user squid
>>> #cache_effective_group squid
>>>
>>>
>>>
>>> SQUID 2.7
>>>
>>> There are 2 squid processes which run one as root user and other as squid
>>> user:
>>>
>>> root 3617 1 0 Jun03 ? 00:00:00 /usr/sbin/squid -D
>> -YC
>>> proxy 3621 3617 0 Jun03 ? 00:00:01 (squid) -D -YC
>>>
>>> This is a part of my squid.conf:
>>> # cache_effective_user proxy
>>> # cache_effective_group proxy
>>>
>>>
>>>
>>> 1- In squid 2.7, can I start both processes as squid user ?
>>> 2- What behaviour is't suggested ? 2 processes which run as squid user
>>> (Squid 2.5) or 2 processes as root+squid users (Squid 2.7) ?
>>>
>> You can, though its not recommended. The process you see running as root
>> is the master process which acts like the obsolete RunCache/RunAccel.
>>
>> Its primary purpose is to monitor the other low-privilege process and
>> restart it if there are any problems. To maintain constant uptime from a
>> user viewpoint.
>>
>> It's also responsible for controlling issues such as reconfiguration and
>> restarts happen cleanly.
>>
>> I'm not sure from that info why the unlinkd is not also showing up.
>>
>>
>> I would recommend starting the master as root when using 2.7.
>> I'd also recommend getting rid of cache_effective_group and ensuring the
>> OS group privileges are correctly set for the squid user. Squid detects
>> them just fine these days.
>>
>> Amos
>
>

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE15
   Current Beta Squid 3.1.0.8 or 3.0.STABLE16-RC1
Received on Fri Jun 05 2009 - 13:14:02 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 05 2009 - 12:00:02 MDT