I'm having some problems, no idea what caused them, but I can't get clamav-daemon to start I get this when trying to start (clam av log) Wed Apr 16 12:22:02 2014 -> +++ Started at Wed Apr 16 12:22:02 2014 Wed Apr 16 12:22:02 2014 -> clamd daemon 0.97.8 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64) Wed Apr 16 12:22:02 2014 -> Log file size limited to -1 bytes. Wed Apr 16 12:22:02 2014 -> Reading databases from /var/lib/clamav Wed Apr 16 12:22:02 2014 -> Not loading PUA signatures. Wed Apr 16 12:22:02 2014 -> Bytecode: Security mode set to "TrustSigned". Wed Apr 16 12:22:09 2014 -> Loaded 3310648 signatures. Wed Apr 16 12:22:10 2014 -> LOCAL: Unix socket file /var/run/clamav/clamd.ctl Wed Apr 16 12:22:10 2014 -> LOCAL: Setting connection queue length to 15 Wed Apr 16 12:22:10 2014 -> ERROR: daemonize() failed: Cannot allocate memory Wed Apr 16 12:22:10 2014 -> Socket file removed. And when trying to send/receive mail I get this error (mail log) Apr 16 12:36:51 vps2 amavis[24299]: (24299-09) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory Apr 16 12:36:52 vps2 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=81.149.192.161, lip=82.196.10.23, mpid=26160, TLS, session=<P4PNKyj3tABRlcCh> Apr 16 12:36:52 vps2 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=81.149.192.161, lip=82.196.10.23, mpid=26162, TLS, session=<f+7SKyj3tgBRlcCh> Apr 16 12:36:52 vps2 amavis[24299]: (24299-09) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory Apr 16 12:36:52 vps2 amavis[24299]: (24299-09) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2) Apr 16 12:36:58 vps2 amavis[24299]: (24299-09) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory Apr 16 12:36:58 vps2 amavis[24299]: (24299-09) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 114) line 603.\n Now I can see it's saying "can't allocate memory" but I have plenty of ram available Output of cat /proc/meminfo MemTotal: 1019048 kB MemFree: 333952 kB Buffers: 7900 kB Cached: 187248 kB SwapCached: 0 kB Active: 517740 kB Inactive: 98660 kB Active(anon): 424756 kB Inactive(anon): 6764 kB Active(file): 92984 kB Inactive(file): 91896 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 10044 kB Writeback: 0 kB AnonPages: 421380 kB Mapped: 21168 kB Shmem: 10200 kB Slab: 31196 kB SReclaimable: 13968 kB SUnreclaim: 17228 kB KernelStack: 2200 kB PageTables: 21516 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 509524 kB Committed_AS: 1538928 kB VmallocTotal: 34359738367 kB VmallocUsed: 1888 kB VmallocChunk: 34359736471 kB HardwareCorrupted: 0 kB AnonHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 34804 kB DirectMap2M: 1013760 kB and I can see I've got over 300mb of ram I've googled and googled and I can't see anything thats overly helpful, and I need to get this sorted quick as I realize it occasionally stops sending emails (which requires restarting amavisd and postfix to fix). Apart from that emails work fine, sending receiving works all good, just that error. If for the short term I can get this error to stop stopping postfix (Postfix/amavisd - connect to 127.0.0.1[127.0.0.1]:10024: Connection refused) or at the very least a way to poll the service and restart it if it's failed, then I know emails will be active, but ideally need a fix as having no av is not a particularly good idea especially when dealing with a fair few email domains. Running ISPConfig 3 on Ubuntu 13.04 Around the same time this happened, I did add a new email domain to ISPConfig with the spam filter set to "normal" normally I set the spam filter to the email address, but can't say if it was the same time. Cheers!
You have 300mb free ram at the moment, but at the time calamv tried to start, there was not enough free ram. the amavis issue was most likely caused by the same thing. Your server ahs not much ram, so this might happen when you do not have some swap space. I recommend that you add a swap file on your server and activate it, so the kernel can swap memory pages to the file if there is not enough ram.
Thanks Till, root@vps2:~# swapon -s Filename Type Size Used Priority So no swap file! Do you have a link or something on how to add a swap file? I can see a few around but I trust a reliable source from you guys more than a google search! Cheers
Just googled one, I guess this should work: http://www.rackspace.com/knowledge_center/article/create-a-linux-swap-file
Brilliant all is working! Thanks so much! On another note, I know I should put this in a separate thread, but I was looking at some posts from around 2011 about changing the welcome email, I want to include just a link to a page or attach a file (for instructions on how to setup the email client etc) just wandering if there is any way to do this at all.