Re: [squid-users] adding a parameter to a URL / Problem in the url_redirect program

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 10 Jul 2008 00:41:20 +1200

Shaine wrote:
> one thing i couldn't mention in the mail. my redirect program located in
> /usr/local/squid/bin/xxx.pl.
>
> And i have given permission for user squid.
>
> chown -R squid:squid /usr/local/squid
>
> In my squid.conf
>
> cache_effective_user squid
> cache_effective_group squid

Um, It's better to configure only the user in squid (and only then if
you have to), and leave the group config to your OS settings. That makes
things like permission debugging easier and more secure in the long run.

>
> But slite Database lacated in a defferent location. /home/user/db.sqlite. I
> have given the root permision for the database.
>
> is this wrong?

Maybe yes, maybe no.

Login as the 'squid' user and see if it has permissions to run the
helper properly.
Also while you are logged in there, check that the user is a member of
exactly one group same as your squid.conf settings.

I suspect its the DB connect and abort which is killing things early.
If it is, you should see the errors when your script is run to debug as
the squid user.

Amos

>
> Thank you
> Shaine.
>
>
>
>
> Shaine wrote:
>>
>>
>> Following are rest of logs which comes in the log.
>>
>> 2008/07/09 22:49:27| Starting Squid Cache version 3.0.STABLE6 for
>> i686-pc-linux-gnu...
>> 2008/07/09 22:49:27| Process ID 26309
>> 2008/07/09 22:49:27| With 1024 file descriptors available
>> 2008/07/09 22:49:27| Performing DNS Tests...
>> 2008/07/09 22:49:27| Successful DNS name lookup tests...
>> 2008/07/09 22:49:27| DNS Socket created at 0.0.0.0, port 39752, FD 5
>> 2008/07/09 22:49:27| Adding nameserver 192.168.4.3 from /etc/resolv.conf
>> 2008/07/09 22:49:27| Adding nameserver 202.69.192.2 from /etc/resolv.conf
>> 2008/07/09 22:49:27| helperOpenServers: Starting 10 'xxx.pl' processes
>> 2008/07/09 22:49:28| Unlinkd pipe opened on FD 20
>> 2008/07/09 22:49:28| Swap maxSize 102400 KB, estimated 7876 objects
>> 2008/07/09 22:49:28| Target number of buckets: 393
>> 2008/07/09 22:49:28| Using 8192 Store buckets
>> 2008/07/09 22:49:28| Max Mem size: 8192 KB
>> 2008/07/09 22:49:28| Max Swap size: 102400 KB
>> 2008/07/09 22:49:28| Version 1 of swap file with LFS support detected...
>> 2008/07/09 22:49:28| Rebuilding storage in /usr/local/squid/var/cache
>> (DIRTY)
>> 2008/07/09 22:49:28| Using Least Load store dir selection
>> 2008/07/09 22:49:28| Set Current Directory to /usr/local/squid/var/cache
>> 2008/07/09 22:49:28| Loaded Icons.
>> 2008/07/09 22:49:28| Accepting HTTP connections at 0.0.0.0, port 8080, FD
>> 22.
>> 2008/07/09 22:49:28| Accepting ICP messages at 0.0.0.0, port 3130, FD 23.
>> 2008/07/09 22:49:28| HTCP Disabled.
>> 2008/07/09 22:49:28| Ready to serve requests.
>>
>> Thank you
>> Shaine.
>>
>>
>>
>>
>>
>> Henrik Nordstrom-5 wrote:
>>> On tis, 2008-07-08 at 23:12 -0700, Shaine wrote:
>>>
>>>> Its working fine in command line, i tested and it works as i expected.
>>>> But
>>>> when i placed in url_rewrite_program in squid, unfortunately squid get
>>>> PANIC
>>>> and its crashed.
>>>>
>>>> 2008/07/09 17:14:34| WARNING: redirector #3 (FD 8) exited
>>>> 2008/07/09 17:14:34| WARNING: redirector #2 (FD 7) exited
>>> Anything before this?
>>>
>>>
>>>> Why , its getting FALAL error when placed in squid? what is wrong with
>>>> the
>>>> script ? Can you help me please ?
>>> For some reason your script exits before STDIN is closed by Squid... The
>>> question is why.
>>>
>>> Regards
>>> Henrik
>>>
>>>
>>>
>>
>

-- 
Please use Squid 2.7.STABLE3 or 3.0.STABLE7
Received on Wed Jul 09 2008 - 12:41:24 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 09 2008 - 12:00:03 MDT