LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 12-26-2019, 04:55 PM   #1
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Rep: Reputation: Disabled
squidclamav cant connect to clamd service


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/tut...v-on-centos-7/

squidclamav

https://sourceforge.net/projects/squ...atest/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/ConfigE...ptation/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

thanks,

rob
 
Old 12-26-2019, 07:16 PM   #2
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
smashed it -

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/not..._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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error (Cannot connect to unix socket '/var/lib/clamav/clamd.socket': connect: No such file or directory) Toadman Ubuntu 1 08-10-2016 06:00 PM
issues with squidclamav - c-icap lacrosse1991 Linux - Server 4 04-10-2012 09:51 AM
[SOLVED] Install squidclamav linuxmen Linux - Server 4 08-04-2011 08:28 AM
Can't get squidclamav redirecting with squid 2.6 billymayday Linux - Software 1 11-12-2008 07:08 PM
squidclamav neelendhar Linux - Server 0 09-17-2007 02:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration