Thanks for the prompt reply. In my case clamd service is not running. I am 
unable to see these services undernWindows Services list ("ClamWin Free 
Antivirus Scanner Service" and the "ClamWin Free Antivirus Database Updater") .


Thanks & Regards
Bijay Nandagiri
Sr Member Technical - ULI
Cdk int - 593-8062
Ext -793-6962
Ph: 7799277731



-----Original Message-----
From: clamav-users [mailto:clamav-users-boun...@lists.clamav.net] On Behalf Of 
G.W. Haywood via clamav-users
Sent: Wednesday, April 8, 2020 4:59 PM
To: N, BijayKumar via clamav-users <clamav-users@lists.clamav.net>
Cc: G.W. Haywood <cla...@jubileegroup.co.uk>
Subject: Re: [clamav-users] Issue in connecting to clamav from dot net code

Hi there,

On Wed, 8 Apr 2020, N, BijayKumar via clamav-users wrote:

> After installing clamAV ,I see we need to run clamd.exe which will 
> create a windows service .But in my case it's not happening ...

It is not clear to me what is not happening. :/

Is the clamd service not running, or is it running but the host is refusing 
connections?

> and I am unable to connect scan an image file from my .net application.

If the service is not running, obviously you need to make it run.
Some ways to check that you can make connections to it are given in the 
stackoverflow page to which you linked.  Have you tried them?

If the service is running but you cannot connect to it, you need to
(1) make sure that it is listening in the way that you think it is configured 
to listen, and (1a) make sure the nothing _else_ on the same machine is trying 
to listen in the same way; (2) make sure that you're trying to connect to it 
the way you think you're trying to connect to it; and finally (3) make sure 
that there is nothing on the machine which hosts clamd which is actively 
blocking connections, such as a local firewall (which is very common on Windows 
boxes, as a quick test you can simply disable the firewall completely but BE 
CAREFUL if you do that).

You should be able to connect to the daemon manually from a command line 
prompt.  Search for PING in the _ClamAV_ documentation (this is not the same as 
the 'ping' utility commonly used to quickly check a network route is alive; 
PING is described in the clamd 'man' page).

Here's what happens when I send 'PING' to a clamd daemon here at my place of 
work:

8<----------------------------------------------------------------------
mail6:# >>> telnet 192.168.44.7 3313
Trying 192.168.44.7...
Connected to 192.168.44.7.
Escape character is '^]'.
PING
PONG
Connection closed by foreign host.
mail6:# >>>
8<----------------------------------------------------------------------

>From a 'bash' shell prompt on a mail server, I started the 'telnet'
utility to connect my terminal to the clamd server.  That server is configured 
to listen on a TCP socket because mail servers on our LAN will be connecting to 
it (by default, clamd on Linux does not listen to TCP sockets so I had to 
configure it to do that - I do not know if that applies to Windows, because I 
have never run clamd on Windows).
It listens on port 3313 in my configuration so I have to connect to that port 
using telnet (there's nothing special about that port; I could have chosen more 
or less any otherwise unused port in the thousands range; all that matters is 
that I connect to the port on which the daemon is listening).  After the TCP 
connection is established, I see messages which are typical for a Linux system 
- you will likely see different messages, but you can ignore that.  Very 
quickly, I typed the word 'PING' followed by the carriage return (or
ENTER) key, and almost immediately the reply 'PONG' appears.  I need to type 
quickly because there is a short timeout of a few seconds in the configuration, 
and if I am too slow the daemon will unilaterally close the connection.  You 
can change the timeout if it too short.
After the exchange of PING and PONG, the daemon immediately closes the 
connection and I again see the shell prompt.

If you cannot seem to establish any connection with a running daemon, use a 
utility like 'tcpdump' or 'Wireshark' to trace the traffic.
There is plenty of documentation online about how to do that, there should be 
no need to ask again here.

-- 

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

----------------------------------------------------------------------
This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to