eClamAV initialization failure

Asked by John Bull

I recently rebuilt Squid with libecap and ecap_clamav which was formerly working fine, now the cache log indicates the following:

Loading Squid module from '/usr/lib/ecap_clamav_adapter.so'
Squid plugin modules loaded: 1
Adaptation support is on
eClamAV: Initializing ClamAV engine #1.
ERROR: failed to start optional eCAP service: ecap://e-cap.org/ecap/services/clamav?mode=REQMOD:
cl_load: Can't get file status

my squid.conf:

### eCAP / Virus Detection

#acl multimedia rep_mime_type ^image/
#acl multimedia rep_mime_type video
#acl multimedia rep_mime_type audio

ecap_enable on

loadable_modules /usr/lib/ecap_clamav_adapter.so

ecap_service eReqmod reqmod_precache bypass=1 uri=ecap://e-cap.org/ecap/services/clamav?mode=REQMOD staging_dir=/var/spool/vscan/XXXXXX on_error=allow
ecap_service eRespmod respmod_precache bypass=1 uri=ecap://e-cap.org/ecap/services/clamav?mode=RESPMOD staging_dir=/var/spool/vscan/XXXXXX on_error=allow

adaptation_service_set reqFilter eReqmod
adaptation_service_set respFilter eRespmod

#adaptation_access reqfilter deny multimedia
adaptation_access reqFilter allow all

#adaptation_access respFilter deny multimedia
adaptation_access respFilter allow all

My staging directory:

mkdir /var/spool/vscan
touch /var/spool/vscan/XXXXXX
chown -R squid.squid /var/spool/vscan
chmod 755 -R /var/spool/vscan
cp -a /var/spool/vscan /usr/.spool

I have tried a number of staging directory variations without success and continue to receive:
cl_load: Can't get file status.

Do you have any thought on what may have happened?

Thanks,
John

Question information

Language:
English Edit question
Status:
Answered
For:
eCAP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

Sounds like a ClamAV engine initialization error: ClamAV cannot find its databases in the default location. This is most likely unrelated to Squid or the ClamAV adapter itself. Does clamscan or a similar native ClamAV tool work?

Revision history for this message
John Bull (jbull) said :
#2

Yes, that is it. I moved the ClamAV databases to /var/spool/clamav.
ln -s /var/spool/clamav /var/clamav has resolve the location issue, but I am now receiving:

Adaptation support is on
eClamAV: Initializing ClamAV engine #1.
ERROR: failed to start optional eCAP service: ecap://e-cap.org/ecap/services/clamav?mode=REQMOD:
cl_load: Can't open file or directory

I suspect it is permissions on the link. Is there a location I can edit within ecap_clamav?

Revision history for this message
Alex Rousskov (rousskov) said :
#3

No, you cannot tell the adapter where to look for the ClamAV database. The adapter just tells libClamAV to use defaults. You may be able to rebuild libClamAV to change the default, but that is a question to ClamAV folks.

Can you help with this problem?

Provide an answer of your own, or ask John Bull for more information if necessary.

To post a message you must log in.