Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.35k stars 700 forks source link

ClamAV Database Daily Update Failure - #1078

Open ClemCreator opened 11 months ago

ClemCreator commented 11 months ago

Describe the bug

In our Kubernetes deployment of ClamAV, database updates are failing with errors indicating an inability to resolve the host name for the update server (database.clamav.net). This issue persists unless a hostAliases entry is manually added to the pod definition.

How to reproduce the problem

  1. Deploy ClamAV in a Kubernetes cluster without any hostAliases.
  2. Kill freshclam process
  3. Run the database update command. (freshclam --checks=1 --daemon --foreground --stdout --user=clamav)
  4. The update process fails with warnings and errors about failed DNS resolution.

Logs

.WARNING: remote_cvdhead: Download failed (6) WARNING: Couldn't resolve host name WARNING: Failed to get daily database version information from server: https://database.clamav.net ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net. Trying again in 5 secs..

Expected behavior

The database update process should be able to resolve the host database.clamav.net without requiring manual addition of a hostAliases entry.

Actual behavior

Database updates fail due to DNS resolution issues unless an IP is manually mapped to database.clamav.net via hostAliases in the pod specification.

Attachments

(Attach any relevant configuration snippets, logs, or screenshots.)

Additional context

(Provide any additional context that might help diagnose the problem, such as network configurations or DNS settings in your Kubernetes cluster.)

micahsnyder commented 11 months ago

@ClemTheStudent it sounds like a DNS resolution issue in your kubernetes environment. I'm not sure of anything in our container that would cause this problem.

milanmaximo commented 11 months ago

@ClemTheStudent I would appreciate if you could please share how did you configure cronjob or other manifests for updateing Clamav database ?

Thank you!