clamav 0.99.3 + addedllvm-0ubuntu0.16.04.1 보고서 (유닉스 소켓 '/var/lib/clamav/clamd.socket'에 연결할 수 없음 : 연결 : 해당 파일 또는 디렉토리가 없음)


1

어제 ClamAV 99.2에서 ClamAV 99.3 (주제에 표시된 버전)으로 업데이트되었습니다. 그 이후로 clamd.socket 파일이 이전 버전에서와 같이 / var / lib / clamav에 생성되지 않는 문제가있었습니다. 내 구성 파일은 다음과 같습니다.

/ect/clamav/clamd.conf  
TCPSocket 3310
TCPAddr 127.0.0.1
TemporaryDirectory /var/tmp
User clamav
AllowSupplementaryGroups false
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 300
MaxThreads 10
MaxConnectionQueueLength 15
LogSyslog true
LogRotate false
LogFacility LOG_MAIL
LogClean false
LogVerbose yes
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly no
SelfCheck 600
Foreground false
Debug false
ScanPE yes
MaxEmbeddedPE 10M
ScanOLE2 yes
ScanPDF yes
ScanHTML yes
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
DetectBrokenExecutables false
ExitOnOOM yes
LeaveTemporaryFiles false
AlgorithmicDetection yes
ScanELF yes
IdleTimeout 30
CrossFilesystems true
PhishingSignatures yes
PhishingScanURLs yes
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA yes
ScanPartialMessages false
HeuristicScanPrecedence yes
StructuredDataDetection no
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo yes
OLE2BlockMacros false
ScanOnAccess false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanSize 50M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StatsEnabled true
StatsPEDisabled true
StatsHostID auto
StatsTimeout 10
StreamMaxLength 25M
LogFile /var/log/clamav/clamd.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
PidFile /var/lib/clamav/clamd.pid

내 /etc/systemd/system/clamav-daemon.socket.d/extend.conf

[Socket]
ListenStream=
SocketUser=clamav
ListenStream=127.0.0.1:3310

내 /lib/systemd/system/clamav-daemon.socket

[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.ne/lang/en/doc/
ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}

[Socket]
ListenStream=/run/clamav/clamd.ctl
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True

[Install]
WantedBy=sockets.target

참고 : 찾을 수있는 곳에는 clamd.ctl 파일이 없습니다.

sudo service clamav-daemon start를 실행할 때 Syslog 출력

Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:37:12 localhost clamd[6544]: Received 1 file descriptor(s) from systemd.
Jan 31 16:37:12 localhost clamd[6544]: clamd daemon 0.99.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Jan 31 16:37:12 localhost clamd[6544]: Running as user clamav (UID 121, GID 130)
Jan 31 16:37:12 localhost clamd[6544]: Log file size limited to 4294967295 bytes.
Jan 31 16:37:12 localhost clamd[6544]: Reading databases from /var/lib/clamav
Jan 31 16:37:12 localhost clamd[6544]: Bytecode: Security mode set to "TrustSigned".
Jan 31 16:37:29 localhost clamd[6544]: Loaded 6629236 signatures.
Jan 31 16:37:31 localhost clamd[6544]: TCP: Received AF_INET SOCK_STREAM socket from systemd.
Jan 31 16:37:31 localhost clamd[6544]: LOCAL: No local AF_UNIX SOCK_STREAM socket received from systemd.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Global size limit set to 52428800 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:37:31 localhost clamd[6544]: Limits: File size limit set to 26214400 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Recursion level limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Files limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: Core-dump limit is 0.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxPartitions limit set to 50.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxIconsPE limit set to 100.
Jan 31 16:37:31 localhost clamd[6544]: Limits: MaxRecHWP3 limit set to 16.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMatchLimit limit set to 10000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 31 16:37:31 localhost clamd[6544]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 31 16:37:31 localhost clamd[6544]: Archive support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Algorithmic detection enabled.
Jan 31 16:37:31 localhost clamd[6544]: Portable Executable support enabled.
Jan 31 16:37:31 localhost clamd[6544]: ELF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Mail files support enabled.
Jan 31 16:37:31 localhost clamd[6544]: OLE2 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: PDF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: SWF support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HTML support enabled.
Jan 31 16:37:31 localhost clamd[6544]: XMLDOCS support enabled.
Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus userspace daemon.
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.

sudo systemctl status clamav-daemon.socket의 출력

● clamav-daemon.socket - Socket for Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.socket; enabled; vendor pre
Drop-In: /etc/systemd/system/clamav-daemon.socket.d
       └─extend.conf
Active: active (running) since Wed 2018-01-31 16:37:07 CST; 27min ago
 Docs: man:clamd(8)
       man:clamd.conf(5)
       http://www.clamav.net/lang/en/doc/
Listen: 127.0.0.1:3310 (Stream)

Jan 31 16:37:07 localhost systemd[1]: Closed Socket for Clam AntiVirus userspace
Jan 31 16:37:07 localhost systemd[1]: Starting Socket for Clam AntiVirus userspa
Jan 31 16:37:07 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:37:11 localhost systemd[1]: Listening on Socket for Clam AntiVirus use
Jan 31 16:39:36 localhost systemd[1]: Listening on Socket for Clam AntiVirus use

sudo systemctl status clamav-daemon.service의 출력

● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor pr
Active: active (running) since Wed 2018-01-31 16:37:12 CST; 28min ago
 Docs: man:clamd(8)
       man:clamd.conf(5)
       http://www.clamav.net/lang/en/doc/
 Main PID: 6544 (clamd)
 CGroup: /system.slice/clamav-daemon.service
       └─6544 /usr/sbin/clamd --foreground=true

Jan 31 16:37:31 localhost clamd[6544]: HWP3 support enabled.
Jan 31 16:37:31 localhost clamd[6544]: Heuristic: precedence enabled
Jan 31 16:37:31 localhost clamd[6544]: Self checking every 600 seconds.
Jan 31 16:37:31 localhost clamd[6544]: Listening daemon: PID: 6544
Jan 31 16:37:31 localhost clamd[6544]: MaxQueue set to: 100
Jan 31 16:39:36 localhost systemd[1]: Started Clam AntiVirus userspace daemon.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:47:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.
Jan 31 16:57:31 localhost clamd[6544]: SelfCheck: Database status OK.

도움을 주시면 감사하겠습니다. 그러나 이것이 직접 드롭 인 업그레이드 일 것이지만 지금까지는 그렇지 않았습니다. 지금까지 구글에서 이틀에 가까운 시간을 보냈습니다.


sudo dpkg-reconfigure clamav-daemonUNIX 소켓을 사용하도록 실행 및 재구성 을 시도 했습니까 ?
Terrance

Terrnace를 수행했으며 / var / lib / clamav에 clamd.socket 파일을 만들었습니다. 그러나 또 다른 문제는보고 할 것 중 하나를 공식 또는 비공식 시그마의 데이터베이스 업데이트 후 경우 팝업 Can't connect to clamd on 127.0.0.1:3310: Connection refused. 은 ClamAV 목록 및 더 많은 인터넷 검색에 대한 몇 가지 코멘트를 한 후 나는 [구글]을 발견 serverfault.com/questions/798587/... 그것을 수정하는 방법을 보여줍니다 당신의 문제를 해결하는 /lib/systemd/system/clamav-daemon.socket 및 /etc/systemd/system/clamav-daemon.socket.d/extend.conf
크리스 폴락

문제를 해결할 수있어서 다행입니다. 취한 단계를 통해 자신의 질문에 자유롭게 대답하십시오. 동일한 문제가있는 다른 사용자가 문제를 해결하는 방법을 알 수 있도록 실제로 권장됩니다. 또한 할당 된 시간이 지나면 정답으로 수락하기 위해 자신의 답변을 작성한 후 기억하십시오. :)
Terrance

답변:


1

며칠간의 인터넷 검색으로 비슷한 문제가 발생했습니다. 여기에서 올바른 문제를 발견했습니다-[Google] https://serverfault.com/questions/798587/debian-8-cant-get-clamav-to-listen-on-tcp 문제를 해결 한 -3310 내가 취한 단계는 표시된 파일을 아래에서 변경하는 것입니다.

/etc/systemd/system/clamav-daemon.socket.d/extend.conf   
[Socket]
ListenStream=
SocketUser=clamav
ListenStream=/var/lib/clamav/clamd.socket

/lib/systemd/system/clamav-daemon.socket
[Unit]
Description=Socket for Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) http://www.clamav.net/lang/en/doc/
# Check for database existence
ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}

[Socket]
#ListenStream=/run/clamav/clamd.ctl
ListenStream=/var/lib/clamav/clamd.socket
ListenStream=127.0.0.1:3310
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True
[Install]
WantedBy=sockets.target

이 작업을 수행 한 후에 systemctl daemon-reload는 clamav-daemon을 다시 sudo service clamav-daemon start시작하거나으로 데몬을 시작해야 할 수도 있습니다 sudo /etc/init.d/clamav-daemon start. 위의 모든 작업을 수행했기 때문에 아무런 문제가 없었습니다.

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.