On Sun, 2016-08-07 at 17:02 +0200, Tobi wrote:
> Hi Chris
> 
> sorry I was not clear enough. I did not mean to start the service via
> systemd but to call like
> 
> sudo /usr/sbin/clamd -c /path/to/config
> 
> and see then if the socket has been created in expected location.
> 
> Cheers
> 
> tobi

Tobi, apologies for not getting back to you earlier, yes the above did
create the clamd.socket in /var/lib/clamav as it always had before.

Wed Aug 10 20:26:14 2016 -> +++ Started at Wed Aug 10 20:26:14 2016
Wed Aug 10 20:26:14 2016 -> Received 0 file descriptor(s) from systemd.
Wed Aug 10 20:26:14 2016 -> clamd daemon 0.99 (OS: linux-gnu, ARCH:
x86_64, CPU: x86_64)
Wed Aug 10 20:26:14 2016 -> Running as user clamav (UID 121, GID 130)
Wed Aug 10 20:26:14 2016 -> Log file size limited to 2097152bytes.
Wed Aug 10 20:26:14 2016 -> Reading databases from /var/lib/clamav
Wed Aug 10 20:26:14 2016 -> Bytecode: Security mode set to
"TrustSigned".
Wed Aug 10 20:26:27 2016 -> Loaded 4931451 signatures.
Wed Aug 10 20:26:29 2016 -> ERROR: TCP: Cannot bind to
[127.0.0.1]:3310: Address already in use
Wed Aug 10 20:26:29 2016 -> LOCAL: Unix socket file
/var/lib/clamav/clamd.socket
Wed Aug 10 20:26:29 2016 -> LOCAL: Setting connection queue length to
200
Wed Aug 10 20:26:29 2016 -> Limits: Global size limit set to 52428800
bytes.
Wed Aug 10 20:26:29 2016 -> Limits: File size limit set to 26214400
bytes.
Wed Aug 10 20:26:29 2016 -> Limits: Recursion level limit set to 16.
Wed Aug 10 20:26:29 2016 -> Limits: Files limit set to 10000.
Wed Aug 10 20:26:29 2016 -> Limits: Core-dump limit is 0.
Wed Aug 10 20:26:29 2016 -> Limits: MaxEmbeddedPE limit set to 10485760
bytes.
Wed Aug 10 20:26:29 2016 -> Limits: MaxHTMLNormalize limit set to
10485760 bytes.
Wed Aug 10 20:26:29 2016 -> Limits: MaxHTMLNoTags limit set to 2097152
bytes.
Wed Aug 10 20:26:29 2016 -> Limits: MaxScriptNormalize limit set to
5242880 bytes.
Wed Aug 10 20:26:29 2016 -> Limits: MaxZipTypeRcg limit set to 1048576
bytes.
Wed Aug 10 20:26:29 2016 -> Limits: MaxPartitions limit set to 50.
Wed Aug 10 20:26:29 2016 -> Limits: MaxIconsPE limit set to 100.
Wed Aug 10 20:26:29 2016 -> Limits: PCREMatchLimit limit set to 10000.
Wed Aug 10 20:26:29 2016 -> Limits: PCRERecMatchLimit limit set to
5000.
Wed Aug 10 20:26:29 2016 -> Limits: PCREMaxFileSize limit set to
26214400.
Wed Aug 10 20:26:29 2016 -> Archive support enabled.
Wed Aug 10 20:26:29 2016 -> Algorithmic detection enabled.
Wed Aug 10 20:26:29 2016 -> Portable Executable support enabled.
Wed Aug 10 20:26:29 2016 -> ELF support enabled.
Wed Aug 10 20:26:29 2016 -> Mail files support enabled.
Wed Aug 10 20:26:29 2016 -> OLE2 support enabled.
Wed Aug 10 20:26:29 2016 -> PDF support enabled.
Wed Aug 10 20:26:29 2016 -> SWF support enabled.
Wed Aug 10 20:26:29 2016 -> HTML support enabled.
Wed Aug 10 20:26:29 2016 -> Heuristic: precedence enabled
Wed Aug 10 20:26:29 2016 -> Self checking every 600 seconds.
Wed Aug 10 20:26:29 2016 -> ERROR: Can't save PID in file
/var/run/clamav/clamd.pid
Wed Aug 10 20:26:29 2016 -> Listening daemon: PID: 13330
Wed Aug 10 20:26:29 2016 -> MaxQueue set to: 100
Wed Aug 10 20:33:38 2016 -> SelfCheck: Database status OK.
Wed Aug 10 20:36:29 2016 -> SelfCheck: Database status OK.
The socket file is now present

srw-rw-rw- 1 clamav clamav         0 Aug 10 20:26 clamd.socket

If I run spamassassin from a terminal to test a message all goes well

X-Spam-Virus: No
However, if an incoming message is tested I get this result

X-spam-virus: Error (Cannot connect to unix socket '/run/clamd.socket':
connect: No such file or directory)

I have looked high and low through my clamd.conf (in /etc/clamav) and
clamav.pm (in /etc/spamassassin) and find no mention anywhere of
/run/clamd.socket.

Chris



> ----- Originale Nachricht -----
> Von: Chris <cpoll...@embarqmail.com>
> Gesendet: 07.08.16 - 15:51
> An: clamav-users@lists.clamav.net
> Betreff: Re: [clamav-users] Error (Cannot connect to unix socket
> '/var/lib/clamav/clamd.socket': connect: No such file or directory)
> 
> > 
> > On Sun, 2016-08-07 at 10:49 +0200, Tobi wrote:
> > > 
> > > It might a systemd issue. Have you tried to start clamd by
> > > calling it
> > > directly on cli? Does it create the socket then?
> > > 
> > > Cheers
> > > 
> > > tobi
> > I've tried that lots of times Tobi, however, it still doesn't
> > create
> > it:
> > 
> > chris@localhost:~$ sudo service clamav-daemon stop  [ - ]  clamav-
> > daemon
> > 
> > chris@localhost:~$ sudo service clamav-daemon start [ + ]  clamav-
> > daemon
> > 
> > The 'clamd.socket' file should be between these two but it's not:
> > 
> > -rw-r--r--  1 clamav clamav    446464 Jun 23 11:40 bytecode.cld
> > -rw-r--r--  1 clamav clamav        82 Jul 13 14:44
> > crdfam.clamav.hdb
> > 
> > 
> > 
> > > 
> > > ----- Originale Nachricht -----
> > > Von: Chris <cpoll...@embarqmail.com>
> > > Gesendet: 07.08.16 - 04:49
> > > An: clamav-users@lists.clamav.net
> > > Betreff: [clamav-users] Error (Cannot connect to unix socket
> > > '/var/lib/clamav/clamd.socket': connect: No such file or
> > > directory)
> > > 
> > > > 
> > > > 
> > > > I upgraded to Ubuntu 16.04LTS earlier this week and it
> > > > installed
> > > > ClamAV
> > > > 0.99. I previously had 98.7 installed and running perfectly. I
> > > > have
> > > > it
> > > > being called by Spamassassin. When an incoming message is
> > > > checked
> > > > the
> > > > line in the subject appears. Permissions for the directory
> > > > /var/lib/clamav:
> > > > 
> > > > drwxr-xr-x 3 clamav        clamav        4096 Aug  6 20:36
> > > > clamav
> > > > 
> > > > Owner and group of each file in /var/lib/clamav is clamav
> > > >  clamav.
> > > > 
> > > > The clamd.ctl file exist as shown in my /etc/clamav/clamd.conf:
> > > > 
> > > > # This option allows you to save a process identifier of the
> > > > listening
> > > > # daemon (main thread).
> > > > # Default: disabled
> > > > PidFile /var/run/clamav/clamd.pid
> > > > 
> > > > I have the /tmp location set:
> > > > 
> > > > # Optional path to the global temporary directory.
> > > > # Default: system specific (usually /tmp or /var/tmp).
> > > > TemporaryDirectory /var/tmp
> > > > 
> > > > I have this set for the socket file:
> > > > 
> > > > # Path to a local socket file the daemon will listen on.
> > > > # Default: disabled (must be specified by a user)
> > > > LocalSocket /var/lib/clamav/clamd.socket
> > > > 
> > > > It's not getting created no matter what I do. It used to be
> > > > created
> > > > in
> > > > fact it was there before I did the system upgrade.
> > > > 
> > > > Any assistance would be appreciated.
> > > > 
> > > > Chris
> > > > 
-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
19:43:49 up 2 days, 35 min, 2 users, load average: 1.28, 0.67, 0.47
Ubuntu 16.04.1 LTS, kernel 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 
UTC 2016

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

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

Reply via email to