[prev in list] [next in list] [prev in thread] [next in thread]
List: squid-users
Subject: [squid-users] squidclamav cant connect to clamd service
From: robert k Wild <robertkwild () gmail ! com>
Date: 2019-12-27 19:15:49
Message-ID: CAGU_CiLfoNorfqCjWScpJVROCZHdJZTemNZ+vYUTX-tdFnf4Kg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
hi all,
ive been struggling with this for a few weeks and hopefully one of you guys
can help me out as im struggling finding solutions
ive installed on my centos 7 vm machine
c-icap
c-icap modules
http://c-icap.sourceforge.net/download.html
squid 4.9
http://www.squid-cache.org/Versions/v4/
clamav
https://hostpresto.com/community/tutorials/how-to-install-clamav-on-centos-7/
squidclamav
https://sourceforge.net/projects/squidclamav/files/latest/download
and i followed this guide compiling them from source with the configure
options make and make install on all of them
https://wiki.squid-cache.org/ConfigExamples/ContentAdaptation/C-ICAP
squid works as a proxy just fine, just struggling with the c-icap with
squidclamav part
this is the error i get -
Sun Dec 22 21:40:44 2019, 1586/40797952, squidclamav.c(2081) dconnect: Sun
Dec 22 21:40:44 2019, 1586/40797952, ERROR Can't connect to clamd on local
socket /run/clamd.scan/clamd.sock.
Sun Dec 22 21:40:44 2019, 1586/40797952, squidclamav.c(787)
squidclamav_end_of_data_handler: Sun Dec 22 21:40:44 2019, 1586/40797952,
ERROR Can't connect to Clamd daemon.
Mon Dec 23 10:10:11 2019, main proc, c-icap server already running!
Mon Dec 23 10:37:44 2019, main proc, c-icap server already running!
[root@squid ~]# ls /run/clamd.scan/
[root@squid ~]#
but i have changed all my services to a /services directory and there all
running -
[root@squid ~]# ls /services/c-icap/
c-icap.ctl c-icap.pid
[root@squid ~]# ls /services/clamd.scan/
clamd.sock
[root@squid ~]#
so my question is why is squidclamav still looking in
"/run/clamd.scan/clamd.sock"
i have even specified in my "/etc/squidclamav.conf" where the clamd service
is
# clamd_port to the corresponding value.
clamd_local /services/clamd.scan/clamd.sock
#clamd_ip 127.0.0.1
#clamd_port 3310
but i have resolved it by this :)
so in my squid.conf i added the c-icap lines using this site as the link i
gave, gave a c-icap protocol error, everytime i opened a web page
https://www.server-world.info/en/note?os=CentOS_7&p=squid&f=5 (the c-icap
lines are at the end of the guide)
i also did this
vi /etc/tmpfiles.d/c-icap.conf
d /run/c-icap 0770 root root -
vi /etc/tmpfiles.d/clamd.scan.conf
d /run/clamd.scan 0770 root root -
i also made c-icap.conf and clamd.d/scan.conf, i made the user root just to
make my life a lot easier not to run into any troubleshooting problems
and finally this command to re-initialise squidclamav with the c-icap
configs
echo -n "squidclamav:cfgreload" > /run/c-icap/c-icap.ctl
then when i went on the http://www.eicar.org/download/eicar_com.zip
i got a virus found
[Attachment #5 (text/html)]
<div dir="ltr">
<p>hi all,</p><p>ive been struggling with this for a few weeks and hopefully one of \
you guys can help me out as im struggling finding solutions</p><p>ive installed on my \
centos 7 vm machine</p><p>c-icap</p><p>c-icap modules</p><p><a target="_blank" \
rel="nofollow noopener" \
href="http://c-icap.sourceforge.net/download.html">http://c-icap.sourceforge.net/download.html</a></p><p>squid \
4.9</p><p><a target="_blank" rel="nofollow noopener" \
href="http://www.squid-cache.org/Versions/v4/">http://www.squid-cache.org/Versions/v4/</a></p><p>clamav</p><p><a \
target="_blank" rel="nofollow noopener" \
href="https://hostpresto.com/community/tutorials/how-to-install-clamav-on-centos-7/">h \
ttps://hostpresto.com/community/tutorials/how-to-install-clamav-on-centos-7/</a></p><p>squidclamav</p><p><a \
target="_blank" rel="nofollow noopener" \
href="https://sourceforge.net/projects/squidclamav/files/latest/download">https://sourceforge.net/projects/squidclamav/files/latest/download</a><br></p><p>and \
i followed this guide compiling them from source with the configure options make and \
make install on all of them<br></p><p><a target="_blank" rel="nofollow noopener" \
href="https://wiki.squid-cache.org/ConfigExamples/ContentAdaptation/C-ICAP">https://wiki.squid-cache.org/ConfigExamples/ContentAdaptation/C-ICAP</a></p><p>squid \
works as a proxy just fine, just struggling with the c-icap with squidclamav \
part</p><p>this is the error i get - <br></p><p>Sun Dec 22 21:40:44 2019, \
1586/40797952, squidclamav.c(2081) dconnect: Sun Dec 22 21:40:44 2019, \
1586/40797952, ERROR Can't connect to clamd on local socket \
/run/clamd.scan/clamd.sock.<br>Sun Dec 22 21:40:44 2019, 1586/40797952, \
squidclamav.c(787) squidclamav_end_of_data_handler: Sun Dec 22 21:40:44 2019, \
1586/40797952, ERROR Can't connect to Clamd daemon.<br>Mon Dec 23 10:10:11 2019, \
main proc, c-icap server already running!<br>Mon Dec 23 10:37:44 2019, main proc, \
c-icap server already running!<br>[root@squid ~]# ls /run/clamd.scan/<br>[root@squid \
~]#</p><p>but i have changed all my services to a /services directory and there all \
running - <br></p><p>[root@squid ~]# ls /services/c-icap/<br>c-icap.ctl \
c-icap.pid<br>[root@squid ~]# ls /services/clamd.scan/<br>clamd.sock<br>[root@squid \
~]#</p><p>so my question is why is squidclamav still looking in \
"/run/clamd.scan/clamd.sock"</p><p>i have even specified in my \
"/etc/squidclamav.conf" where the clamd service is</p><p># clamd_port to \
the corresponding value.<br>clamd_local /services/clamd.scan/clamd.sock<br>#clamd_ip \
127.0.0.1<br>#clamd_port 3310</p><div>
but i have resolved it by this :)</div><div><br></div><div>so in my squid.conf i \
added the c-icap lines using this site as the link i gave, gave a c-icap protocol \
error, everytime i opened a web page<br></div><div><p><a target="_blank" \
rel="nofollow noopener" \
href="https://www.server-world.info/en/note?os=CentOS_7&p=squid&f=5">https://www.server-world.info/en/note?os=CentOS_7&p=squid&f=5</a> \
(the c-icap lines are at the end of the guide)</p><p>i also did this</p><p> vi \
/etc/tmpfiles.d/c-icap.conf<br> d /run/c-icap
0770 root root
-<br>
<br>
vi /etc/tmpfiles.d/clamd.scan.conf<br>
d /run/clamd.scan 0770 root root
-</p><p>i also made c-icap.conf and clamd.d/scan.conf, i made the user
root just to make my life a lot easier not to run into any
troubleshooting problems</p><p>and finally this command to re-initialise squidclamav \
with the c-icap configs</p><p>echo -n "squidclamav:cfgreload" > \
/run/c-icap/c-icap.ctl</p><p>then when i went on the <a target="_blank" rel="nofollow \
noopener" href="http://www.eicar.org/download/eicar_com.zip">http://www.eicar.org/download/eicar_com.zip</a></p><p>i \
got a virus found</p>
</div><div><br></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic