I'm sorry Lior, I don't know how to help.  I don't have experience with the 
ClamavClient Java library you're using. Perhaps someone else here has 
experience with it. Otherwise, you may need help from that library's developers 
with configuration and debugging.

Respectfully,
Val

Valerie Snyder (she/they)
ClamAV Development
Talos
Cisco Systems, Inc.
________________________________
From: clamav-users <[email protected]> on behalf of Lior 
Koskas via clamav-users <[email protected]>
Sent: Wednesday, December 3, 2025 10:46 AM
To: [email protected] <[email protected]>
Cc: Lior Koskas <[email protected]>
Subject: [clamav-users] Cannot connect to ClamAV

Hi,

I'm running ClamAv on Kubernetes. The image tag is clamav/clamav:1.5.1. I have 
a Java app based SpringBoot that communicates with ClamAV.
When I'm trying to scan a file using my Java app The app hangs up at this line:

ClamavClient clamScan = new ClamavClient(url, port);

clamScan.ping(); // hangs up

When I'm running the telnet command to my URL the command run as expected.

My clamd config file:

##############################
# Network Settings (TCP mode)
##############################
TCPSocket 3310
TCPAddr 0.0.0.0
LocalSocket /run/clamav/clamd.sock
LocalSocketGroup clamav
LocalSocketMode 666

##############################
# Logging
##############################
# LogFile /var/log/clamav/clamd.log
LogFileUnlock yes
LogTime yes
LogVerbose no            # Change to "yes" for debug
ExtendedDetectionInfo yes
LogVerbose yes  # Enable verbose for debugging

##############################
# Performance & Limits
##############################
MaxScanSize 200M
MaxFileSize 100M
StreamMaxLength 150M
MaxRecursion 20
MaxFiles 10000
MaxScanTime 120000        # 120 seconds
ReadTimeout 120
IdleTimeout 60

##############################
# Heuristics / Features
##############################
ScanArchive yes
ScanOLE2 yes
ScanPDF yes
ScanSWF yes
ScanHWP3 yes
HeuristicScanPrecedence yes

##############################
# Misc
##############################
Foreground yes
User clamav
SelfCheck 3600           # Every 60 minutes

My freshclam config file:

###############
# Database Updates
###############
DatabaseOwner clamav
Checks 12   # every 2 hours

DatabaseMirror database.clamav.net<http://database.clamav.net/>
DNSDatabaseInfo current.cvd.clamav.net<http://current.cvd.clamav.net/>

###############
# Logging
###############
UpdateLogFile /var/log/clamav/freshclam.log
LogVerbose yes

--
[https://d36urhup7zbd7q.cloudfront.net/u/RMNXXWxENOk/1676375150887.png]
Lior Koskas
Blockchain Specialist, WaveBL

[https://cdn.gifo.wisestamp.com/s/rfw1/45668E/24/trans.png] 
wavebl.com<https://wavebl.com/>  |  
[https://cdn.gifo.wisestamp.com/s/rfem1/45668E/24/trans.png]  
[email protected]<mailto:[email protected]>

IMPORTANT: The contents of this email and any attachments are confidential. 
They are intended for the named recipient(s) only. If you have received this 
email by mistake, please notify the sender immediately and do not disclose the 
contents to anyone or make copies thereof.


Wavebl.com<http://wavebl.com/> | Twitter <https://twitter.com/wavebl?lang=en> | 
Linkedin<https://www.linkedin.com/company/10082448?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A10082448%2Cidx%3A2-1-3%2CtarId%3A1457252792686%2Ctas%3Awave%20(by>

_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

Reply via email to