Hello all... I would really appreciate some help.
So I have written an external acl helper in C++ that talks to a REST API that I developed. Here is a github link (don't worry, it is pretty short, and the only parts you need to look at are lines 46, 52, 58 and 60):https://github.com/e2guardian-angel/squid-acl-category-helper/blob/main/category_host.cpp
external_acl_type host_category_helper %ACL %DST /usr/local/bin/squidhelpers/host_category_helper
acl searchengines external host_category_helper
...
ssl_bump bump searchengines
ssl_bump none all
2021/05/08 02:04:57| helperHandleRead: unexpected read from host_category_helper #Hlpr6, 4 bytes 'ERR
$ docker exec -it squid /usr/local/bin/squidhelpers/host_category_helper
searchengines google.com
OK
searchengines facebook.com
ERR
searchengines imdb.com
ERR
2021/05/08 02:04:59| helperHandleRead: unexpected read from host_category_helper #Hlpr6, 8 bytes 'ERR
ERR
'
2021/05/08 01:52:04| helperOpenServers: Starting 1/5 'host_category_helper' processes
Is there anything glaring here that could be the issue? Is it indeed a concurrency problem? I would have assumed that each helper (there are 5 of them) would have their own stdin/stdout and be writing to/from it rather than everyone at once. It also seems a little suspicious that I am only seeing this for ERR, not OK... you are supposed to print ERR when there is not a match, correct?
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users