Не могу понять в чем дело. маршрутизатор FreeBSD, postfix+amavis+clamav. Все работало, но недавно начались зависания. Выяснилось, что clamav виснет читая свою базу вирусов. Последнее сообщение в логе clamav: Reading databases from /var/db/clamav. Начинаю перезапускать - не помогает. Вырубил freshclam - тоже самое. Удалил базы скачал новые - опять висит. Вот перезапустишь - висит с 15 мин (на том же сообщении) и запашет не на долго.Потом виснет, но не обязательно на "Reading databases from /var/db/clamav", хотя это сообщение последнее в логе в 90% случаях.
В последнее время на сервере ничего не делал.. только bash поставил из портов, заодно установились новые версии каких-то двух библиотек, но ведь старые должны остаться?host#uname -a
host#FreeBSD host.xxx 5.4-RELEASE FreeBSD 5.4-RELEASE #3: Fri Nov 3 13:08:26 MSK 2006 root@xxx:/usr/src/sys/i386/compile/tuned i386
host# cat /usr/local/etc/clamd.conf | egrep "^[^#].*"
LogFile /var/log/clamav/clamd.log
LogTime yes
LogClean no
LogSyslog no
LogVerbose yes
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/db/clamav
LocalSocket /var/run/clamav/clamd
User vscan
Debug yes
ScanMail 1
Кусок из amavisd.conf
host# cat /usr/local/etc/amavisd.conf | egrep "^[^#].*"
use strict;
$MYHOME = '/var/amavis'; # (default is '/var/amavis')
$mydomain = 'host.triz-ri.ru'; # (no useful default)
$daemon_user = 'vscan'; # (no default; customary: vscan or amavis)
$daemon_group = 'vscan'; # (no default; customary: vscan or amavis or sweep)
$TEMPBASE = $MYHOME; # (must be set if other config vars use is)
$ENV{TMPDIR} = $TEMPBASE; # wise to set TMPDIR, but not obligatory
$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny)
$enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1
$max_servers = 3; # number of pre-forked children (default 2)
$max_requests = 20; # retire a child after that many accepts (default 10)
$child_timeout=5*60; # abort child if it does not complete each task in
# approximately n sec (default: 8*60 seconds)
@local_domains_maps = ( [".$mydomain",'triz-ri.ru','altshuller.ru'] ); # $mydomain and its subdomains
# (does not apply to sendmail/milter)
# (default is true)
$unix_socketname = "$MYHOME/amavisd.sock"; # amavis helper protocol socket
# (default is undef, i.e. disabled)
# (usual setting is $MYHOME/amavisd.sock)
$inet_socket_port = 10024; # accept SMTP on this local TCP port
# (default is undef, i.e. disabled)
# (default is '127.0.0.1')
@inet_acl = qw(127.0.0.1 [::1]); # allow SMTP access only from localhost IP
# (default is qw(127.0.0.1 [::1]) )
$LOGFILE = "/var/log/amavisd.log"; # (defaults to empty, no log)
host# cat /usr/local/etc/postfix/master.cf | egrep "^[^#].*"
smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:[127.0.0.1]:10024
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
smtp-amavis unix - - n - 10 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
ЛОГ clamav
host# tail -n 55 /var/log/clamav/clamd.log
Fri Aug 17 10:20:58 2007 -> +++ Started at Fri Aug 17 10:20:58 2007
Fri Aug 17 10:20:58 2007 -> clamd daemon 0.90 (OS: freebsd5.5, ARCH: i386, CPU: i386)
Fri Aug 17 10:20:58 2007 -> Log file size limited to 1048576 bytes.
Fri Aug 17 10:20:58 2007 -> Reading databases from /var/db/clamav
Fri Aug 17 10:24:54 2007 -> +++ Started at Fri Aug 17 10:24:54 2007
Fri Aug 17 10:24:54 2007 -> clamd daemon 0.90 (OS: freebsd5.5, ARCH: i386, CPU: i386)
Fri Aug 17 10:24:54 2007 -> Log file size limited to 1048576 bytes.
Fri Aug 17 10:24:54 2007 -> Reading databases from /var/db/clamav
Fri Aug 17 10:25:38 2007 -> Loaded 147225 signatures.
Fri Aug 17 10:25:39 2007 -> Unix socket file /var/run/clamav/clamd
Fri Aug 17 10:25:39 2007 -> Setting connection queue length to 15
Fri Aug 17 10:25:39 2007 -> Listening daemon: PID: 17457
Fri Aug 17 10:25:39 2007 -> Archive: Archived file size limit set to 10485760 bytes.
Fri Aug 17 10:25:39 2007 -> Archive: Recursion level limit set to 8.
Fri Aug 17 10:25:39 2007 -> Archive: Files limit set to 1000.
Fri Aug 17 10:25:39 2007 -> Archive: Compression ratio limit set to 250.
Fri Aug 17 10:25:39 2007 -> Archive support enabled.
Fri Aug 17 10:25:39 2007 -> Algorithmic detection enabled.
Fri Aug 17 10:25:39 2007 -> Portable Executable support enabled.
Fri Aug 17 10:25:39 2007 -> ELF support enabled.
Fri Aug 17 10:25:39 2007 -> Mail files support enabled.
Fri Aug 17 10:25:39 2007 -> Mail: Recursion level limit set to 64.
Fri Aug 17 10:25:39 2007 -> OLE2 support enabled.
Fri Aug 17 10:25:39 2007 -> HTML support enabled.
Fri Aug 17 10:25:39 2007 -> Self checking every 1800 seconds.
Fri Aug 17 10:25:39 2007 -> Set stacksize to 1048576
Fri Aug 17 10:26:57 2007 -> Loaded 147225 signatures.
Fri Aug 17 10:28:54 2007 -> Shutting down the main socket.
Fri Aug 17 10:28:54 2007 -> Closing the main socket.
Fri Aug 17 10:28:54 2007 -> Socket file removed.
Fri Aug 17 10:28:54 2007 -> Pid file removed.
Fri Aug 17 10:28:54 2007 -> --- Stopped at Fri Aug 17 10:28:54 2007
Fri Aug 17 10:29:12 2007 -> +++ Started at Fri Aug 17 10:29:12 2007
Fri Aug 17 10:29:12 2007 -> clamd daemon 0.90 (OS: freebsd5.5, ARCH: i386, CPU: i386)
Fri Aug 17 10:29:12 2007 -> Log file size limited to 1048576 bytes.
Fri Aug 17 10:29:12 2007 -> Reading databases from /var/db/clamav
Fri Aug 17 10:30:54 2007 -> Loaded 147225 signatures.
Fri Aug 17 10:30:54 2007 -> Unix socket file /var/run/clamav/clamd
Fri Aug 17 10:30:54 2007 -> Setting connection queue length to 15
Fri Aug 17 10:30:54 2007 -> Listening daemon: PID: 17744
Fri Aug 17 10:30:54 2007 -> Archive: Archived file size limit set to 10485760 bytes.
Fri Aug 17 10:30:54 2007 -> Archive: Recursion level limit set to 8.
Fri Aug 17 10:30:54 2007 -> Archive: Files limit set to 1000.
Fri Aug 17 10:30:54 2007 -> Archive: Compression ratio limit set to 250.
Fri Aug 17 10:30:54 2007 -> Archive support enabled.
Fri Aug 17 10:30:54 2007 -> Algorithmic detection enabled.
Fri Aug 17 10:30:54 2007 -> Portable Executable support enabled.
Fri Aug 17 10:30:54 2007 -> ELF support enabled.
Fri Aug 17 10:30:54 2007 -> Mail files support enabled.
Fri Aug 17 10:30:54 2007 -> Mail: Recursion level limit set to 64.
Fri Aug 17 10:30:54 2007 -> OLE2 support enabled.
Fri Aug 17 10:30:54 2007 -> HTML support enabled.
Fri Aug 17 10:30:54 2007 -> Self checking every 1800 seconds.
Fri Aug 17 10:30:54 2007 -> Set stacksize to 1048576
В логах postfix и amavis ничего особенного. Когда clamd виснет amavis тщетно пытается использовать clamscan и тоже виснет. Видя все это, postfix говорит, что не может подключится к локальному сокету и откладывает сообщения в долгий ящик.
Буду благодарен за любую помощь.