Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

amavis/clamd - can't connect to clamd.socket

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
overcast
n00b
n00b
User avatar
Posts: 43
Joined: Mon Dec 15, 2003 4:51 pm

amavis/clamd - can't connect to clamd.socket

  • Quote

Post by overcast » Thu Jan 11, 2007 2:22 pm

This is what's appearing over and over again in my logs:

Code: Select all

Jan 11 09:12:09 [amavis] (10624-02) (!!) ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.sock (Can't connect to UNIX socket /var/run/clamav/clamd.sock: Permission denied) at (eval 66) line 268.
Jan 11 09:14:51 [amavis] (09372-20) ClamAV-clamd: Can't send to socket /var/run/clamav/clamd.sock: Transport endpoint is not connected, retrying (1)
Jan 11 09:14:52 [amavis] (09372-20) (!) ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.sock: Permission denied, retrying (2)
Jan 11 09:14:58 [amavis] (09372-20) (!!) ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.sock (Can't connect to UNIX socket /var/run/clamav/clamd.sock: Permission denied) at (eval 66) line 268.
I thought it might be simple file permissions, but this looks correct to me:

Code: Select all

inquisitor ~ # ls -lu /var/run/clamav/
total 4
-rw-rw---- 1 clamav clamav 0 Jan 11 08:50 clamd.sock
-rw-rw---- 1 clamav clamav 4 Dec 28 13:09 freshclam.pid
amavis is part of the clamav group:

Code: Select all

inquisitor ~ # groups clamav
amavis clamav
Help! :?
Top
Katphish
Apprentice
Apprentice
Posts: 155
Joined: Mon Dec 05, 2005 9:08 pm

  • Quote

Post by Katphish » Fri Jan 12, 2007 4:56 am

I went the other way and told clamd to run as the amavis user and put the socket at /var/run/amavis/clamav.sock. This was the recommended method from amavisd-new documentation.
Top
serotonin
n00b
n00b
Posts: 50
Joined: Wed Dec 24, 2003 3:58 am

  • Quote

Post by serotonin » Fri Jan 12, 2007 3:57 pm

Katphish wrote:I went the other way and told clamd to run as the amavis user and put the socket at /var/run/amavis/clamav.sock. This was the recommended method from amavisd-new documentation.
I'll second that, make sure your /etc/amavisd.con file has

Code: Select all

$daemon_user  = 'amavis';   # (no default;  customary: vscan or amavis), -u
$daemon_group = 'amavis';   # (no default;  customary: vscan or amavis), -g

$unix_socketname = "$MYHOME/amavisd.sock"; 
then this

Code: Select all

ls -lah /var/run/clamav/
total 12K
drwxr-xr-x 2 amavis clamav 4.0K Dec 30 12:45 .
drwxr-xr-x 8 root   root   4.0K Jan 10 03:10 ..
-rw-r--r-- 1 root   root      0 Dec 29 23:24 .keep_app-antivirus_clamav-0
-rw-rw---- 1 amavis amavis    5 Dec 30 12:45 clamd.pid
srwxrwxrwx 1 amavis amavis    0 Dec 30 12:45 clamd.sock
Should be all set after a /etc/init.d/postfix reload

:D
http://www.tankprofiler.com
Top
Red-Drop
n00b
n00b
User avatar
Posts: 37
Joined: Thu Mar 10, 2005 5:25 am
Contact:
Contact Red-Drop
Website

  • Quote

Post by Red-Drop » Fri Nov 02, 2007 4:55 am

If you are like me and use clamav for more than just amavis you would want to have it so that clamav is not running as the amavis user.

Check that you have in your /etc/clamd.conf

Code: Select all

# Initialize supplementary group access (clamd must be started by root).
# Default: no
AllowSupplementaryGroups yes
To have clamav use groups you specify in your /etc/group file


Hope this helps.
Top
trossachs
Veteran
Veteran
User avatar
Posts: 1204
Joined: Thu Jan 22, 2004 9:48 am
Location: London

  • Quote

Post by trossachs » Sat Nov 24, 2007 2:55 pm

I have clamav installed, but cannot locate the clamd.pid, or clamd.sock files. Can these be inserted manually?
Top
ScOut3R
Tux's lil' helper
Tux's lil' helper
Posts: 116
Joined: Fri Apr 29, 2005 7:05 am
Location: Australia

  • Quote

Post by ScOut3R » Sat Nov 24, 2007 3:03 pm

trossachs wrote:I have clamav installed, but cannot locate the clamd.pid, or clamd.sock files. Can these be inserted manually?
Check the /etc/clamd.conf file, there's an option where you can set the location of the socket file, or you can setup clamav to listen on the loopback interface.
Top
trossachs
Veteran
Veteran
User avatar
Posts: 1204
Joined: Thu Jan 22, 2004 9:48 am
Location: London

  • Quote

Post by trossachs » Sat Nov 24, 2007 4:19 pm

Socket set to:

Code: Select all

LocalSocket /var/run/amavis/clamd
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic