DEV Community

nabbisen
nabbisen

Posted on • Edited on

3 1

ClamAV: Fixing freshclam's Hanging Up

This post is about a small tip of ClamAV, actually ClamAV Unofficial Sigs in my case, troubleshooting.

I found freshclam freezed up in my OpenBSD server the other day:

# freshclam
ClamAV update process started at Fri Mar 22 22:32:33 2019
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.100.2 Recommended version: 0.101.1
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Downloading daily-25378.cdiff [100%]
Downloading daily-25379.cdiff [100%]
Downloading daily-25380.cdiff [100%]

Enter fullscreen mode Exit fullscreen mode

Waiting or retrying didn't make any meaning.

The reason often seems in the database file.
Try to renew it by moving the original file to /tmp:

# # OpenBSD:
# mv /var/db/clamav/daily.cld /tmp
# # Manjaro Linux:
# mv /var/lib/clamav/daily.cld /tmp
Enter fullscreen mode Exit fullscreen mode

Note: The directory is up to your operating system.

Run freshclam and check if it works well:

# freshclam
ClamAV update process started at Sat Mar 23 00:28:30 2019
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.100.2 Recommended version: 0.101.1
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
main.cvd is up to date (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Downloading daily.cvd [100%]
daily.cvd updated (version: 25396, sigs: 1528057, f-level: 63, builder: raynman)
bytecode.cvd is up to date (version: 328, sigs: 94, f-level: 63, builder: neo)
Database updated (6094400 signatures) from database.clamav.net (IP: xxx.xxx.xxx.xxx)
Enter fullscreen mode Exit fullscreen mode

If it's all right, delete the old file:

# rm /tmp/daily.cld
Enter fullscreen mode Exit fullscreen mode

I'm happy if this solution would help someone someday : )
Happy securing.

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay