Open vandman opened 6 months ago
Is there any progress? Since the latest update of the app, the clamav-docker-container stops working a couple of minutes after the background scan started. Then the mentioned failure-message (The ClamAV module is not in daemon mode) appears in Nextcloud-Log and the clamav-container starts yelling "unable to contact server" - whatever that means, the container does its updates, can download signatures etc. Any help is highly appreciated.
Hi, No, Now I use the latest nextcloud 28. It is still the same. Regards, Pierre
same problem
Seems same here. After added new user with 100 GB data.
Seems, More than 50k logs by 2hours. I try to upgrade the memory of the server, but nothing change.
Same here since nextcloud-aio update to release v8.0.0 (https://github.com/nextcloud/all-in-one/releases/tag/v8.0.0).
The ClamAV container seems to be in an unhealthy state:
docker container inspect nextcloud-aio-clamav
[
{
"Id": "7b3c392f0199c3fd4915f0ba8e2943410ebb851cc84339ac1cd209208a507a97",
"Created": "2024-03-30T02:06:29.129222453Z",
"Path": "/init",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 11080,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-03-30T02:06:29.885130752Z",
"FinishedAt": "0001-01-01T00:00:00Z",
"Health": {
"Status": "unhealthy",
"FailingStreak": 3464,
"Log": [
{
"Start": "2024-03-31T09:06:50.791101425+02:00",
"End": "2024-03-31T09:06:50.827030088+02:00",
"ExitCode": 1,
"Output": "ERROR: Unable to contact server\n"
},
{
"Start": "2024-03-31T09:07:20.86192423+02:00",
"End": "2024-03-31T09:07:20.89463122+02:00",
"ExitCode": 1,
"Output": "ERROR: Unable to contact server\n"
},
{
"Start": "2024-03-31T09:07:50.919538069+02:00",
"End": "2024-03-31T09:07:50.955255735+02:00",
"ExitCode": 1,
"Output": "ERROR: Unable to contact server\n"
},
{
"Start": "2024-03-31T09:08:20.990889328+02:00",
"End": "2024-03-31T09:08:21.031462805+02:00",
"ExitCode": 1,
"Output": "ERROR: Unable to contact server\n"
},
{
"Start": "2024-03-31T09:08:51.069352222+02:00",
"End": "2024-03-31T09:08:51.12075238+02:00",
"ExitCode": 1,
"Output": "ERROR: Unable to contact server\n"
}
]
},
"StartedTs": 1711764389,
"FinishedTs": -62135596800
},
https://github.com/Cisco-Talos/clamav/issues/567 seems to be the same problem, could reproduce within clamav container:
/ $ clamdcheck.sh
ERROR: Unable to contact server
/ $ clamd restart
/ $ clamdcheck.sh
Clamd is up
Afterwards clamav container is healthy again.
Same here after AIO auto upgrade a few weeks ago. 1000s of log entries with:
RuntimeException
The ClamAV module is not in daemon mode.
OCA\Files_Antivirus\BackgroundJob\BackgroundScanner::processFiles, exception: The ClamAV module is not in daemon mode.
This is a beefy bare metal server with 64GB RAM and 4GB allocated to PHP processes
I've been having this same issue for a while now. The logs looked similar, and the docker container inspect nextcloud-aio-clamav
gave the same unhealthy response.
I've had nextcloud-aio running on Unraid through the nextcloud-aio-mastercontainer community package.
The fix was the disable the "autostart" switch in the Unraid docker settings for all containers except the mastercontainer. This means that the mastercontainer does autostart, and that in turn can start the other nextcloud-aio containers.
What this means for other installations I assume is that this error has something to do with the order the containers are started. My guess is that if ClamAV starts too soon it somehow locks itself into this unhealthy state.
Same issue after update. root@Tower:~# docker container inspect nextcloud-aio-clamav [ { "Id": "7e92739130bdc0fbea09cf7d4d7da99e52ee37328962eda3363ec5d74fda958d", "Created": "2024-04-23T04:02:18.593749129Z", "Path": "/init", "Args": [], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 9977, "ExitCode": 0, "Error": "", "StartedAt": "2024-04-23T04:02:19.168507173Z", "FinishedAt": "0001-01-01T00:00:00Z", "Health": { "Status": "unhealthy", "FailingStreak": 413, "Log": [ { "Start": "2024-04-23T11:22:48.206678164-04:00", "End": "2024-04-23T11:22:48.266021349-04:00", "ExitCode": 1, "Output": "ERROR: Unable to contact server\n" }, { "Start": "2024-04-23T11:23:18.292244079-04:00", "End": "2024-04-23T11:23:18.347990214-04:00", "ExitCode": 1, "Output": "ERROR: Unable to contact server\n" }, { "Start": "2024-04-23T11:23:48.36992937-04:00", "End": "2024-04-23T11:23:48.425752455-04:00", "ExitCode": 1, "Output": "ERROR: Unable to contact server\n" }, { "Start": "2024-04-23T11:24:18.478660663-04:00", "End": "2024-04-23T11:24:18.537370707-04:00", "ExitCode": 1, "Output": "ERROR: Unable to contact server\n" }, { "Start": "2024-04-23T11:24:48.562973378-04:00", "End": "2024-04-23T11:24:48.632097386-04:00", "ExitCode": 1, "Output": "ERROR: Unable to contact server\n" } ] } }, "Image": "sha256:c6f18419c1df81b7cf138d671806adc48fc2aa7224f444403fddc867459cb3e6", "ResolvConfPath": "/var/lib/docker/containers/7e92739130bdc0fbea09cf7d4d7da99e52ee37328962eda3363ec5d74fda958d/resolv.conf", "HostnamePath": "/var/lib/docker/containers/7e92739130bdc0fbea09cf7d4d7da99e52ee37328962eda3363ec5d74fda958d/hostname", "HostsPath": "/var/lib/docker/containers/7e92739130bdc0fbea09cf7d4d7da99e52ee37328962eda3363ec5d74fda958d/hosts", "LogPath": "/var/lib/docker/containers/7e92739130bdc0fbea09cf7d4d7da99e52ee37328962eda3363ec5d74fda958d/7e92739130bdc0fbea09cf7d4d7da99e52ee37328962eda3363ec5d74fda958d-json.log", "Name": "/nextcloud-aio-clamav", "RestartCount": 0, "Driver": "btrfs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": [ "nextcloud_aio_clamav:/var/lib/clamav:rw" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": { "max-file": "1", "max-size": "50m" } }, "NetworkMode": "nextcloud-aio", "PortBindings": null, "RestartPolicy": { "Name": "unless-stopped", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": [ "NET_RAW" ], "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": null, "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": true, "SecurityOpt": [ "label:disable" ], "Tmpfs": { "/tmp": "", "/var/lock": "", "/var/log/clamav": "" }, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": null, "DeviceCgroupRules": null, "DeviceRequests": null, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": null, "PidsLimit": null, "Ulimits": null, "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware", "/sys/devices/virtual/powercap" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ], "Init": false }, "GraphDriver": { "Data": null, "Name": "btrfs" }, "Mounts": [ { "Type": "volume", "Name": "nextcloud_aio_clamav", "Source": "/var/lib/docker/volumes/nextcloud_aio_clamav/_data", "Destination": "/var/lib/clamav", "Driver": "local", "Mode": "rw", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "7e92739130bd", "Domainname": "", "User": "clamav", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "3310/tcp": {}, "7357/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "TZ=America/New_York", "CLAMD_STARTUP_TIMEOUT=90", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": null, "Healthcheck": { "Test": [ "CMD-SHELL", "clamdcheck.sh" ], "StartPeriod": 360000000000 }, "Image": "nextcloud/aio-clamav:latest", "Volumes": { "/var/lib/clamav": {} }, "WorkingDir": "", "Entrypoint": [ "/init" ], "OnBuild": null, "Labels": { "com.centurylinklabs.watchtower.enable": "false", "maintainer": "ClamAV bugs clamav-bugs@external.cisco.com" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "7effdf0002103fba45079eb31140efffc7974e8493596cb1440bbdd57e5d0b16", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "3310/tcp": null, "7357/tcp": null }, "SandboxKey": "/var/run/docker/netns/7effdf000210", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "nextcloud-aio": { "IPAMConfig": null, "Links": null, "Aliases": [ "7e92739130bd" ], "NetworkID": "f75557b2f31d5b18baa8b203594b59382292ecfdf594fa3a722f6c9bf5261116", "EndpointID": "938904d78345be48e80346db08f63ab2ffc759be5d468b49d57124323357f90b", "Gateway": "172.20.0.1", "IPAddress": "172.20.0.7", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:14:00:07", "DriverOpts": null } } } } ] root@Tower:~#
same for me here (https://github.com/nextcloud/files_antivirus/issues/293) - following this thread too
so far, for me, the best workaround is to stop and restart containers in the AiO interface: the problem will come back but later than when I restart the ClamAV container manually with a docker command
⚠️ This issue respects the following points: ⚠️
Bug description
Hi, I always get "The ClamAV module is not in daemon mode" error in my log. There are so many same message, that I can't see the other important log. Because of "The ClamAV module is not in daemon mode" message, the journal log is useless. Regards Pierre NIKOLOV
Steps to reproduce
Nothing, just setup clamav.
Expected behavior
no error.
Installation method
Community Docker image
Nextcloud Server version
27
Operating system
None
PHP engine version
None
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response