Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clamav-daemon is not running on Heroku #5

Closed
tomhamiltonstubber opened this issue Mar 24, 2021 · 1 comment
Closed

clamav-daemon is not running on Heroku #5

tomhamiltonstubber opened this issue Mar 24, 2021 · 1 comment

Comments

@tomhamiltonstubber
Copy link
Member

tomhamiltonstubber commented Mar 24, 2021

I deploy to Heroku in a container, using the configuration set out in tc_av/Dockerfile:

FROM heroku/heroku:18.v16
WORKDIR /root/
ADD install.sh install.sh
RUN bash install.sh && rm /bin/sh && ln -s /bin/bash /bin/sh
ADD ./requirements.txt /home/app/requirements.txt
RUN pip install -r /home/app/requirements.txt
ADD ./app /home/root/app
ADD run.py /home/root/run.py
ENV PYTHONUNBUFFERED 1
WORKDIR /home/root
CMD ["python", "./run.py"]

Now, if I shell in and run service clamav-daemon status, I get:

chown: invalid user: 'clamav'
chown: invalid user: 'clamav'

Starting the service gives me:

~ $ service clamav-daemon start
chown: invalid user: 'clamav'
 * Starting ClamAV daemon clamd           
start-stop-daemon: user 'clamav' not found

It's my understanding that the user clamav gets created when we install clamav-daemon, and indeed, when I edited my Dockerfile to add them, I get an error saying they already exist.

Running freshclam gives me the following output:

Wed Mar 24 18:37:07 2021 -> ClamAV update process started at Wed Mar 24 18:37:07 2021
Wed Mar 24 18:37:07 2021 -> daily database available for download (remote version: 26119)
Time: 2.1s, ETA: 0.0s [=============================>] 100.57MiB/100.57MiB      
Wed Mar 24 18:37:12 2021 -> Testing database: '/var/lib/clamav/tmp.4d8a8/clamav-d121f3eabdb6bdb755e64
d41210f1c14.tmp-daily.cvd' ...
Wed Mar 24 18:38:07 2021 -> Database test passed.
Wed Mar 24 18:38:07 2021 -> daily.cvd updated (version: 26119, sigs: 3965409, f-level: 63, builder: r
aynman)
Wed Mar 24 18:38:07 2021 -> main database available for download (remote version: 59)
Time: 2.4s, ETA: 0.0s [=============================>] 112.40MiB/112.40MiB      
Wed Mar 24 18:38:13 2021 -> Testing database: '/var/lib/clamav/tmp.4d8a8/clamav-7c4a2e48008286c6b8f29
8de65ec0b05.tmp-main.cvd' ...
Wed Mar 24 18:38:21 2021 -> Database test passed.
Wed Mar 24 18:38:21 2021 -> main.cvd updated (version: 59, sigs: 4564902, f-level: 60, builder: sigmg
r)
Wed Mar 24 18:38:21 2021 -> bytecode database available for download (remote version: 333)
Time: 0.0s, ETA: 0.0s [=============================>] 286.79KiB/286.79KiB     
Wed Mar 24 18:38:21 2021 -> Testing database: '/var/lib/clamav/tmp.4d8a8/clamav-ae231a6a35a0e07fc20f3
3b0f0442a21.tmp-bytecode.cvd' ...
Wed Mar 24 18:38:23 2021 -> Database test passed.
Wed Mar 24 18:38:23 2021 -> bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder: awill
ia2)
Wed Mar 24 18:38:23 2021 -> ^Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/c
lamd.ctl: No such file or directory

Any help would be appreciated. I have a feeling this is due to how the users are created with Docker, but I'm not sure.

@tomhamiltonstubber
Copy link
Member Author

For the record, I moved away from Docker and deployed with the following buildpacks:

https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku-community/apt.tgz
https://github.com/riskmethods/heroku-buildpack-clamav.git

I then discovered that ClamAV needs 1.2GB of RAM and, seeing this would cost $250 pm, moved to EC2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant