Search squid archive

Re: Need help to build my own external help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
>>>  I jump in the middle of the conversation but,
>>>  the return will constantly end the helper...
>>>  It is supposed to loop "forever".
>>>  I used to use this:
>>>
>>>  #define INPUTSIZE 8192 char input[INPUTSIZE]; while (fgets(input,
>> sizeof(input), stdin)) { if ((cp=strchr(input, '\n')) == NULL) {
>> fprintf(stderr, "filter: input too big: %s\n", input); } else {
>> *cp = '\0'; } ... fflush(stderr); fflush(stdout); }
>>>
>>>  JD
>>
>> Actually, it should loop forever because the return is outside the
>> while (fgets(...) != NULL) and fgets is supposed to not return NULL
>> unless some error occurs.
>>
>> Also refer to the source code of ext_session_acl which has a return 0
>> at the end.
>
> Ah... my bad...  I jumped too fast  ^_^
> I saw "The src_ip_ext helpers are crashing too rapidly" and ran to a bad conclusion.
> Tried to debug by printing from the helper to stderr?
> Tried negative_ttl=0 ?
> Tried debug_options ALL,1 33,2 ?
>
> JD

I'm getting these logs when debug is On:

##################
2012/04/17 12:11:18.200| ACLChecklist::preCheck: 0xa595a30 checking
'http_access allow src_ip'
2012/04/17 12:11:18.200| ACLList::matches: checking src_ip
2012/04/17 12:11:18.200| ACL::checklistMatches: checking 'src_ip'
2012/04/17 12:11:18.201| ACL::ChecklistMatches: result for 'src_ip' is -1
2012/04/17 12:11:18.201| ACLList::matches: result is false
2012/04/17 12:11:18.201| aclmatchAclList: 0xa595a30 returning false
(AND list entry failed to match)
2012/04/17 12:11:18.201| ACL::FindByName 'src_ip'
2012/04/17 12:11:18.201| ACLChecklist::asyncInProgress: 0xa595a30 async set to 1
2012/04/17 12:11:18.201| aclmatchAclList: async=1 nodeMatched=0
async_in_progress=1 lastACLResult() = 0 finished() = 0
##################


And after five requests, I get:

##################
2012/04/17 12:15:18.944| ACLChecklist::preCheck: 0xa5acd40 checking
'http_access allow src_ip'
2012/04/17 12:15:18.944| ACLList::matches: checking src_ip
2012/04/17 12:15:18.944| ACL::checklistMatches: checking 'src_ip'
2012/04/17 12:15:18.944| ACL::ChecklistMatches: result for 'src_ip' is -1
2012/04/17 12:15:18.944| ACLList::matches: result is false
2012/04/17 12:15:18.944| aclmatchAclList: 0xa5acd40 returning false
(AND list entry failed to match)
2012/04/17 12:15:18.944| ACL::FindByName 'src_ip'
2012/04/17 12:15:18.944| ACLChecklist::asyncInProgress: 0xa5acd40 async set to 1
2012/04/17 12:15:18.944| WARNING: All srcip processes are busy.
2012/04/17 12:15:18.944| WARNING: 5 pending requests queued
2012/04/17 12:15:18.944| Consider increasing the number of srcip
processes in your config file.
2012/04/17 12:15:18.945| aclmatchAclList: async=1 nodeMatched=0
async_in_progress=1 lastACLResult() = 0 finished() = 0
##################

I can't figure out why the requests are being queued indefinitely in the helper.

Here's my squid.conf:

##################
debug_options ALL,1 33,2 28,9
external_acl_type srcip negative_ttl=0 %URI /usr/lib/squid3/src_ip

acl src_ip external srcip

http_access allow src_ip
http_access deny all

http_port 3128
##################

-- 
Mohamed Amine Kadimi

Tél     : +212 (0) 675 72 36 45



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux