Squid url rewriters creating issues in case of multi-threaded mode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Squid url rewriters creating issues in case of multi-threaded mode

Chirayu Patel
This is my config :

http_port 3129 intercept
https_port 3131 intercept ssl-bump cert=/etc/ray/certificates/myCA.pem \
    generate-host-certificates=off dynamic_cert_mem_cache_size=2MB
## For Captive Portal
http_port 3132 intercept
https_port 3133 intercept ssl-bump cert=/etc/ray/certificates/myCA.pem \
    generate-host-certificates=off dynamic_cert_mem_cache_size=1MB

#sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB
#sslcrtd_children 5

# TLS/SSL bumping definitions
acl tls_s1_connect at_step SslBump1
acl tls_s2_client_hello at_step SslBump2
acl tls_s3_server_hello at_step SslBump3

# TLS/SSL bumping steps
ssl_bump peek tls_s1_connect all # peek at TLS/SSL connect data
ssl_bump splice all # splice: no active bumping
on_unsupported_protocol tunnel all

pinger_enable off
digest_generation off
netdb_filename none
ipcache_size 128
fqdncache_size 128
via off
forwarded_for transparent
httpd_suppress_version_string on
cache deny all
cache_mem 0 MB
memory_pools off
shutdown_lifetime 0 seconds

#logfile_daemon /dev/null
access_log none

#acl good_url dstdomain .yahoo.com
http_access allow all

url_rewrite_program /tmp/squid/urlcat_server
#url_rewrite_bypass on
url_rewrite_children 15 startup=1 idle=1 concurrency=30 queue-size=10000
#url_rewrite_access allow all
#url_rewrite_extras "%>a/%>A %un %>rm bump_mode=%ssl::bump_mode sni=\"%ssl::>sni\" referer=\"%{Referer}>h\""
url_rewrite_extras "%>a %lp %ssl::>sni"

---------------------
--> I have a single process which receives the requests in multi-threaded mode

--> The issue I am facing right now is, I am continuously getting these messages :

Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '176 OK'
Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '176 OK'
Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '178 OK'
Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '178 OK'
Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '174 OK'
Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '180 OK'
Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '181 OK'
Tue Aug  6 15:33:11 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '182 OK'
Tue Aug  6 15:33:12 2019 daemon.notice squid[7934]: helperHandleRead: unexpected reply on channel 0 from redirector #Hlpr1 '183 OK'  


--> In single threaded mode, it used to work fine because I used to reply instantly. Now which multi-threaded mode, I am queuing the requests and answering them after processing. 

--> I am following the convention of concurrency, whereby I am attaching the id before the response.

--> Does squid not preserve the requests ? I am doubting that when I am sending the reply, there is no such request existing on squid side and hence I am getting this reply from squid

Am I missing some config here..
--
Thank You
Chirayu Patel
Truecom Telesoft 
+91 8758484287



_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Squid url rewriters creating issues in case of multi-threaded mode

Amos Jeffries
Administrator
On 7/08/19 6:40 pm, Chirayu Patel wrote:

>
> url_rewrite_program /tmp/squid/urlcat_server
> url_rewrite_children 15 startup=1 idle=1 concurrency=30 queue-size=10000
> url_rewrite_extras "%>a %lp %ssl::>sni"
>
> ---------------------
> --> I have a single process which receives the requests in
> multi-threaded mode
>
> --> The issue I am facing right now is, I am continuously getting these
> messages :
>
> Tue Aug  6 15:33:09 2019 daemon.notice squid[7934]: helperHandleRead:
> unexpected reply on channel 0 from redirector #Hlpr1 '176 OK'


It looks like your helper is trying to indicate channel-ID 176 but
sending something that is not a digit before the ID number.


Can you run the helper manually and send it one or a bunch of requests
to see if it is producing the correct output?

Is there any whitespace or prefix before the channel-ID it is putting on
the line?  The above log entry looks like the helper is producing
something like these:
 "0 178 OK"
 " 178 OK"

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users