0

I'm trying to scan the Files for viruses using Clam Antivirus which is installed on Ubuntu on different machine from java code which is again on different machine. Below is my java code lines

//connect to Linux server
ClamScan clamScan = new ClamScan("127.0.0.1", 3310, 20);

// Scanning the test file 
ScanResult result = clamScan.scan(new FileInputStream("D:\\vcredist_x64.png"));

I have done the necessary changes in Clamd.conf files that is to add the Tcp Port and Address , but still getting below error description

ERROR com.philvarner.clamavj.ClamScan - could not connect to clamd server java.net.ConnectException: Connection refused: connect

So any body can help me to find out what is going wrong either in code or configuration .

Thanks in Advance. Ali

Manos Nikolaidis
  • 18,967
  • 11
  • 60
  • 72
ali jawadi
  • 35
  • 6
  • If the service is on a different machine, why are you connecting to the local machine (127.0.0.1)? – nobody Mar 11 '16 at 14:19
  • 1
    Possible duplicate of [java.net.ConnectException: Connection refused](http://stackoverflow.com/questions/6876266/java-net-connectexception-connection-refused) – sashoalm Mar 12 '16 at 10:14

1 Answers1

0

Finally found the solution , actually clam daemon was not up and running .

ali jawadi
  • 35
  • 6