
Ubuntu 14.04 서버에서 ClamAV 데몬을 시작할 수 없습니다. 서비스를 시작하려고 하면 다음과 같은 내용이 표시됩니다.
sudo service clamav-daemon start
* Starting ClamAV daemon clamd [fail]
내가 실행하려고하면 clamdscan
여기에 내가 얻는 것이 있습니다.
clamdscan test.jpg
ERROR: Could not lookup (null): Servname not supported for ai_socktype
----------- SCAN SUMMARY -----------
Infected files: 0
Total errors: 1
Time: 0.000 sec (0 m 0 s)
clamscan
파일에서 법선을 실행하면 모든 것이 정상입니다.
clamscan test.jpg
test.jpg: OK
----------- SCAN SUMMARY -----------
Known viruses: 3708601
Engine version: 0.98.5
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.18 MB
Data read: 0.18 MB (ratio 1.02:1)
Time: 9.991 sec (0 m 9 s)
ClamAV와 관련하여 내가 설치한 패키지는 다음과 같습니다.
> dpkg -l | grep 'clam'
ii clamav 0.98.5+addedllvm-0ubuntu0.14.04.1 amd64 anti-virus utility for Unix - command-line interface
ii clamav-base 0.98.5+addedllvm-0ubuntu0.14.04.1 all anti-virus utility for Unix - base package
ii clamav-daemon 0.98.5+addedllvm-0ubuntu0.14.04.1 amd64 anti-virus utility for Unix - scanner daemon
ii clamav-freshclam 0.98.5+addedllvm-0ubuntu0.14.04.1 amd64 anti-virus utility for Unix - virus database update utility
ii libclamav6 0.98.5+addedllvm-0ubuntu0.14.04.1 amd64 anti-virus utility for Unix - library
내용은 다음과 같습니다./etc/clamav/clamd.conf
http://paste.ubuntu.com/9544920/
내용은 다음과 같습니다.ll /var/run/
http://paste.ubuntu.com/9553966/
답변1
문제는 메모리 사용량이었습니다. clamav-daemon
모든 바이러스 라이브러리가 로드될 때 약 300MB의 메모리를 사용하는 것으로 보입니다 . 저는 1GB RAM을 갖춘 작은 VPS에서 실행 중이며 mysql-server-5.6
그 중 큰 부분을 차지합니다. 성능을 향상시키기 위해 메모리 소비를 약 400MB 줄인 것을 performance_schema = off
추가 했습니다 ! /etc/mysql/my.cnf
(왜 이것이 5.6.6의 새로운 기본값입니까?!) 어쨌든 clamav-daemon
문제 없이 시작할 수 있는 일부 메모리가 확보되었습니다.
답변2
우리는 그것을 얻었다! :-) 터미널에 다음 명령을 입력 Ctrl+ Alt+T
sudo touch /var/run/clamav/clamd.ctl
sudo chown clamav:clamav /var/run/clamav/clamd.ctl
다시 시작 clamd
!
답변3
나는 clamav로 vagrant box를 프로비저닝할 때 이 문제에 꽤 일관되게 직면했습니다. 정의가 다운로드되었는지 확인하고 서비스를 다시 시작하면 지속적으로 문제가 해결됩니다.
sudo freshclam && sudo service clamav-daemon restart