[Dspace-tech] virus checker unavailable

36 views
Skip to first unread message

Jose Blanco

unread,
Aug 26, 2015, 10:21:29 AM8/26/15
to Dspace-Tech
This morning in my installation (1.8.2) some one tried to upload a file and got an error because the virus checker was unavailable.  The same user tried it again now and it worked well.  Why would it have been unavailable?  Can it only be used by one user at a time?  I have it enabled it so that it runs when users upload files via the UI.  I'm wondering if I should tell the user that if this happens again, to just try later because it probably means that it's being used right now.

Many thanks!
Jose

helix84

unread,
Aug 26, 2015, 10:21:35 AM8/26/15
to Jose Blanco, Dspace-Tech
Hi Jose,

I can't seem any such error message in the DSpace codebase, so I think
it comes from the antivirus itself. The error messages about virus
checking from DSpace are quite generic. Do you have the exact error
message? You're using XMLUI, right?

If you want to add more info for the uploader, you may want to edit this key:
xmlui.Submission.submit.UploadStep.virus_checker_error


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

helix84

unread,
Aug 26, 2015, 10:21:39 AM8/26/15
to Jose Blanco, Dspace-Tech
Also, try looking here, seems there are some options in how the
communication with clamav can be configured. I never tried it myself,
though.

http://dspace.2283337.n4.nabble.com/ClamScan-curation-task-td4660181.html

Jose Blanco

unread,
Aug 26, 2015, 10:21:41 AM8/26/15
to hel...@centrum.sk, Dspace-Tech
In UploadStep.java  there is this code:

                    Curator curator = new Curator();
                    curator.addTask("vscan").curate(item);
                    int status = curator.getStatus("vscan");
                    if (status == Curator.CURATE_ERROR)
                    {
                        backoutBitstream(subInfo, b, item);
                        return STATUS_VIRUS_CHECKER_UNAVAILABLE;
                    }
                    else if (status == Curator.CURATE_FAIL)
                    {
                        backoutBitstream(subInfo, b, item);
                        return STATUS_CONTAINS_VIRUS;
                    }

What seems to be happening sometimes, is this line gets executed:

                        return STATUS_VIRUS_CHECKER_UNAVAILABLE;

The problem in debugging this is that it's not all the time.


------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Jose Blanco

unread,
Aug 26, 2015, 10:21:42 AM8/26/15
to hel...@centrum.sk, Dspace-Tech
I have a little bit more info.  I have a file that consistently fails.  It is an mp4 file about 1G.  If I turn the virus scanner off, it uploads.  If I turn the virus scanner on and change the timeout period to 1msec it fails right away.  If I set it to 5min it fails about 3 minutes into it.  Can the virus scan not handle a file that big?  I will try a larger timeout period, and see what happens.

Jose Blanco

unread,
Aug 26, 2015, 10:21:43 AM8/26/15
to Dspace-Tech
I changed it to 10 minutes and it failed after 3 minutes.  It seems like right after the file is uploaded and it begins the virus check it fails.  This is the message I get:

A technical problem was encountered whilst attempting to scan the file for viruses. Please contact the system administrator.

-Jose

Jose Blanco

unread,
Aug 26, 2015, 10:21:45 AM8/26/15
to Dspace-Tech
I have a bit more info.  First the file is not as big as I thought, just 1M, and this is what I'm seeing in the logfile:

13-01-16 15:37:58,453 DEBUG org.dspace.ctask.general.ClamScan @ Scanning wallenberg-gunnoe.mp4 . . .
2013-01-16 15:37:58,453 DEBUG org.dspace.storage.rdbms.DatabaseManager @ Running query "SELECT * FROM Handle WHERE resource_type_id = ? AND resource_id = ?"  with parameters: 2,216250
2013-01-16 15:37:58,613 ERROR org.dspace.ctask.general.ClamScan @ Could not write to the socket . . .
2013-01-16 15:37:58,613 ERROR org.dspace.ctask.general.ClamScan @ Exception closing dataOutputStream
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.DataOutputStream.write(DataOutputStream.java:90)

Maybe the connection was lost because it took the file so long to upload?




On Tue, Jan 15, 2013 at 11:32 AM, Jose Blanco <bla...@umich.edu> wrote:

helix84

unread,
Aug 26, 2015, 10:21:46 AM8/26/15
to Jose Blanco, Dspace-Tech
> java.net.SocketException: Broken pipe

This exception occurs when one connection endpoint tries to write to
the socket after the other endpoint has closed the socket on their
end. Can you post the full stacktrace? That should let us see whether
the browser closed the connection prematurely or clamav.

You could also try the other method of connecting to clamav as I wrote earlier.

Jose Blanco

unread,
Aug 26, 2015, 10:22:26 AM8/26/15
to hel...@centrum.sk, Dspace-Tech
Did not realize I had not included the dspace-tech list. 

-Jose

On Fri, Jan 18, 2013 at 10:35 AM, Jose Blanco <bla...@umich.edu> wrote:
helix84, Thank you for your suggestions.  The sys admin guy here changed the stream max size on clamav and it worked fine.

Thank you!
Jose
Reply all
Reply to author
Forward
0 new messages