Giter Club home page Giter Club logo

clamav's People

Contributors

josmers avatar tspicer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clamav's Issues

ERROR: TCP: Cannot bind to [172.17.0.1]:3310: Address not available

Tried running docker locally (MacOS 10.15.6) and on a RedHat Linux host and get the same message. There's nothing listening on 3310 in the docker host that I can see via netstat or lsof. Inside the container there's nothing listening on 3310 via netstat.

I edited /etc/clamd.conf to change the listener port and the docker-compose script to map the new port. Looking at the docker logs (below) it appears I'm no longer getting the port error but clamd starts up periodically and then stops. I'm able to telnet in on the new port during the few seconds clamd is running but the connection is dropped as soon as 'Pid file removed.' appears in the log.

  • exec /usr/sbin/clamd -c /etc/clamd.conf
    Limits: Global time limit set to 120000 milliseconds.
    Limits: Global size limit set to 1048576000 bytes.
    Limits: File size limit set to 1048576000 bytes.
    Limits: Recursion level limit set to 16.
    Limits: Files limit set to 10000.
    Limits: MaxEmbeddedPE limit set to 10485760 bytes.
    Limits: MaxHTMLNormalize limit set to 10485760 bytes.
    Limits: MaxHTMLNoTags limit set to 2097152 bytes.
    Limits: MaxScriptNormalize limit set to 5242880 bytes.
    Limits: MaxZipTypeRcg limit set to 1048576 bytes.
    Limits: MaxPartitions limit set to 50.
    Limits: MaxIconsPE limit set to 100.
    Limits: MaxRecHWP3 limit set to 16.
    Limits: PCREMatchLimit limit set to 100000.
    Limits: PCRERecMatchLimit limit set to 2000.
    Limits: PCREMaxFileSize limit set to 26214400.
    Archive support enabled.
    AlertExceedsMax heuristic detection disabled.
    Heuristic alerts enabled.
    Portable Executable support enabled.
    ELF support enabled.
    Mail files support enabled.
    OLE2 support enabled.
    PDF support enabled.
    SWF support enabled.
    HTML support enabled.
    XMLDOCS support enabled.
    HWP3 support enabled.
    Heuristic: precedence enabled
    Self checking every 600 seconds.
    Set stacksize to 1048576
    Pid file removed.

Changes to etc/clamd.conf are overwritten by image

Describe the bug
When you make a change to the config /etc/clamd.conf and rebuild the container, the changes are overwritten by the docker-compose build process

To Reproduce
Steps to reproduce the behavior:

  1. Make a change to clamd.conf
  2. run docker-compose up --build --force-recreate
  3. Login to the container and notice the changes are not present

Expected behavior
I expect changes to the clamd.conf to be respected during docker build process

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Docker for Mac

ClamAV installation is OUTDATED

hello,

When running freshclam on openbridge/clamav:latest we get:
"
WARNING: Local version: 0.103.1 Recommended version: 0.103.3
"
Is it possible to make the latest image up to date ?

thank you for your work.

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..

After performing test on K6 against API endpoint that calls clam docker container (through ClamClient) I got that last 50 requests failed (50 of 200) with the error message from above. K6 ran load test using 10 virtual users in this case.
Test was performed against Azure Function.

Does this mean that there is some limitation on server/docker side or rather that TCPClient is not dealing well with sockets? Should I set something differently?

The latest docker image has CRLF trouble.

Describe the bug
The following bash scripts linefeed code is CRLF and scripts does not work.

  • /usr/bin/clam
  • /usr/bin/cron
  • /tests/test_virus.sh
  • /tests/test_clamd.sh

And the linefeed code is LF in git repository.
I guess linefeed code was changed LR to CRLF when the latest docker image has built.

To Reproduce
Steps to reproduce the behavior:

# docker-compose up -d
# docker exec -it clamav /tests/test_virus.sh
env: ‘bash\r’: No such file or directory

Additional context

The Monit status of clamd-scan-check becomes to Not monitored.

Program 'clamd-scan-check'
  status                       Not monitored
  monitoring status            Not monitored
  monitoring mode              active
  on reboot                    start
  data collected               Fri, 21 Aug 2020 08:47:46

Container exits Can't connect to clamd through /tmp/clamd.sock: No such file or directory

starting container with

docker run -d -p 3310:3310 openbridge/clamav

results in container exiting.

└─[$] <git:(master*)> docker run -d -p 3310:3310 openbridge/clamav
Unable to find image 'openbridge/clamav:latest' locally
latest: Pulling from openbridge/clamav
4fe2ade4980c: Pull complete
652213daf9a2: Pull complete
ae5a31e191eb: Pull complete
4f528e35f8da: Pull complete
e927e57664ce: Pull complete
73c3531b3a3b: Pull complete
048745c266ec: Pull complete
29406d2d680a: Pull complete
61177c3df63f: Pull complete
Digest: sha256:70c44eabcb190e977f1068cdbcf0a20f2da74610f384c1c1bd0f4f2fe004aa31
Status: Downloaded newer image for openbridge/clamav:latest
534811de818c4219505519c540d51ad8fed387fb86da90bb8fab6f31d825310f

The container logs

* Connection #0 to host database.clamav.net left intact
Wed May 13 10:52:57 2020 -> *updatedb: Running g_cb_download_complete callback...
Wed May 13 10:52:57 2020 -> *download_complete_callback: Download complete for database : /data/tmp/clamav-3730850252de4014aed2ea6291e3214f.tmp-safebrowsing.cvd
Wed May 13 10:52:57 2020 -> *download_complete_callback:   fc_context->bTestDatabases   : 1
Wed May 13 10:52:57 2020 -> *download_complete_callback:   fc_context->bBytecodeEnabled : 1
Wed May 13 10:52:57 2020 -> Testing database: '/data/tmp/clamav-3730850252de4014aed2ea6291e3214f.tmp-safebrowsing.cvd' ...
Wed May 13 10:52:57 2020 -> *Loading signatures from /data/tmp/clamav-3730850252de4014aed2ea6291e3214f.tmp-safebrowsing.cvd
Wed May 13 10:53:01 2020 -> *Properly loaded 2213119 signatures from /data/tmp/clamav-3730850252de4014aed2ea6291e3214f.tmp-safebrowsing.cvd
Wed May 13 10:53:01 2020 -> Database test passed.
Wed May 13 10:53:01 2020 -> safebrowsing.cvd updated (version: 49191, sigs: 2213119, f-level: 63, builder: google)
Wed May 13 10:53:01 2020 -> *fc_update_database: safebrowsing.cvd updated.
WARNING: Ignoring deprecated option DetectBrokenExecutables at /etc/clamav/clamd.conf:33
Wed May 13 10:53:01 2020 -> ^Clamd was NOT notified: Can't connect to clamd through /tmp/clamd.sock: No such file or directory
[cont-init.d] 10-clamd: exited 0.
[cont-init.d] 99-container: executing... 
[cont-init.d] 99-container: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[INFO] ** [clamav] Starting ClamAV
WARNING: Ignoring deprecated option DetectBrokenExecutables at /etc/clamav/clamd.conf:33
[INFO] ** [zabbix] Starting Zabbix Agent
Wed May 13 10:53:36 2020 -> Limits: Global time limit set to 120000 milliseconds.
Wed May 13 10:53:36 2020 -> Limits: Global size limit set to 157286400 bytes.
Wed May 13 10:53:36 2020 -> Limits: File size limit set to 31457280 bytes.
Wed May 13 10:53:36 2020 -> Limits: Recursion level limit set to 10.
Wed May 13 10:53:36 2020 -> Limits: Files limit set to 15000.
Wed May 13 10:53:36 2020 -> *Limits: Core-dump limit is 18446744073709551615.
Wed May 13 10:53:36 2020 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Wed May 13 10:53:36 2020 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Wed May 13 10:53:36 2020 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Wed May 13 10:53:36 2020 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
Wed May 13 10:53:36 2020 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Wed May 13 10:53:36 2020 -> Limits: MaxPartitions limit set to 128.
Wed May 13 10:53:36 2020 -> Limits: MaxIconsPE limit set to 200.
Wed May 13 10:53:36 2020 -> Limits: MaxRecHWP3 limit set to 16.
Wed May 13 10:53:36 2020 -> Limits: PCREMatchLimit limit set to 10000.
Wed May 13 10:53:36 2020 -> Limits: PCRERecMatchLimit limit set to 10000.
Wed May 13 10:53:36 2020 -> Limits: PCREMaxFileSize limit set to 26214400.
Wed May 13 10:53:36 2020 -> Archive support enabled.
Wed May 13 10:53:36 2020 -> AlertExceedsMax heuristic detection disabled.
Wed May 13 10:53:36 2020 -> Heuristic alerts enabled.
Wed May 13 10:53:36 2020 -> Portable Executable support enabled.
Wed May 13 10:53:36 2020 -> ELF support enabled.
Wed May 13 10:53:36 2020 -> Mail files support enabled.
Wed May 13 10:53:36 2020 -> OLE2 support enabled.
Wed May 13 10:53:36 2020 -> PDF support enabled.
Wed May 13 10:53:36 2020 -> SWF support enabled.
Wed May 13 10:53:36 2020 -> HTML support enabled.
Wed May 13 10:53:36 2020 -> XMLDOCS support enabled.
Wed May 13 10:53:36 2020 -> HWP3 support enabled.
Wed May 13 10:53:36 2020 -> Self checking every 600 seconds.
Wed May 13 10:53:36 2020 -> *Listening daemon: PID: 1311
Wed May 13 10:53:36 2020 -> *MaxQueue set to: 100
Wed May 13 10:53:36 2020 -> Set stacksize to 1048576
[INFO] ** [cron] Starting cron
Wed May 13 11:01:46 2020 -> *Waiting for all threads to finish
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.

LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav

Describe the bug
When I follow the instructions, the container fails to start, with the error LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav. Longer trace below.

To Reproduce
Steps to reproduce the behavior:

  1. docker pull openbridge/clamav
  2. docker run -d -p 3310:3310 openbridge/clamav:latest
  3. Get the ID from docker ps -a, check docker logs:
+ run
+ mode
+ LOCALIPV4=0.0.0.0
+ PUBLICIPV4=0.0.0.0
+ export PUBLICIPV4
+ export LOCALIPV4
+ echo PUBLICIPV4=0.0.0.0
+ echo LOCALIPV4=0.0.0.0
+ sed -i 's|{{LOCALIPV4}}|0.0.0.0|g' /etc/clamd.conf
+ sed -i 's|{{PUBLICIPV4}}|0.0.0.0|g' /etc/clamd.conf
+ freshclam
+ chown -R clamav:clamav /var/lib/clamav/
++ find /var/lib/clamav/daily.cvd -mtime +2 -print
find: ‘/var/lib/clamav/daily.cvd’: No such file or directory
+ [[ -n '' ]]
+ [[ ! -f /var/lib/clamav/daily.cvd ]]
+ echo 'Clamd files are too old. Updating...'
+ echo 'OK: Running freshclam to update virus databases. This can take a few minutes...'
+ sleep 1
Clamd files are too old. Updating...
OK: Running freshclam to update virus databases. This can take a few minutes...
+ run='freshclam -d -c 12 -p /run/freshclam.pid'
+ bash -c 'freshclam -d -c 12 -p /run/freshclam.pid'
+ crond
+ CRONFILE=/crontab.conf
+ CRON_M=28
+ CRON_H=4
+ [[ -f /crontab.conf ]]
+ echo SHELL=/bin/bash
+ echo PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ echo '{{CRON_M}} {{CRON_H}} * * * /usr/bin/env bash -c freshclam' '--quiet 2>&1'
+ tee /crontab.conf
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
{{CRON_M}} {{CRON_H}} * * * /usr/bin/env bash -c freshclam --quiet 2>&1
+ sed -i 's|{{CRON_H}}|4|g' /crontab.conf
+ sed -i 's|{{CRON_M}}|28|g' /crontab.conf
+ cat /crontab.conf
+ crontab -
+ crontab -l
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
28 4 * * * /usr/bin/env bash -c freshclam --quiet 2>&1
+ runcrond='crond -b'
+ bash -c 'crond -b'
+ monit
+ echo 'set daemon 15'
+ echo '   with START DELAY 30'
+ echo 'set pidfile /var/run/monit.pid'
+ echo 'set statefile /var/run/monit.state'
+ echo 'set httpd port 2849 and'
+ echo '   use address localhost'
+ echo '   allow localhost'
+ echo 'set logfile syslog'
+ echo 'set eventqueue'
+ echo '   basedir /var/run'
+ echo '   slots 100'
+ echo 'include /etc/monit.d/*'
+ tee /etc/monitrc
set daemon 15
   with START DELAY 30
set pidfile /var/run/monit.pid
set statefile /var/run/monit.state
set httpd port 2849 and
   use address localhost
   allow localhost
set logfile syslog
set eventqueue
   basedir /var/run
   slots 100
include /etc/monit.d/*
+ find /etc/monit.d -maxdepth 5 -type f -exec sed -i -e 's|{{LOCALIPV4}}|0.0.0.0|g' '{}' ';'
+ find /etc/monit.d -maxdepth 5 -type f -exec sed -i -e 's|{{PUBLICIPV4}}|0.0.0.0|g' '{}' ';'
+ chmod 700 /etc/monitrc
+ run='monit -c /etc/monitrc'
+ bash -c 'monit -c /etc/monitrc'
 New Monit id: fa807ae58b7cece2b492c9aa4642ed70
 Stored in '/root/.monit.id'
Starting Monit 5.27.2 daemon with http interface at [localhost]:2849
+ echo 'OK: All processes have completed. Service is ready...'
OK: All processes have completed. Service is ready...
+ exec /usr/sbin/clamd -c /etc/clamd.conf
LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav
ERROR: Can't open file or directory

Expected behavior
Last week, this ran fine, exposing the service on port 3310.

Desktop (please complete the following information):

  • OS: MacOS 10.15.7

Unable to connect to ClamAV Stream port at ***.***.com:1422

Hi
i will use this Container for Remotescanning Emails Virus Detection. It´s Windows hMailserver which will connect to my Linux Homeserver (Docker) to check Virus. Now i have problem that the Streaming Port is not Reachable . Can you help?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.