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

Starting ClamAV daemon clamd: fail! #6

Closed
jeroenlammerts opened this issue May 12, 2015 · 6 comments
Closed

Starting ClamAV daemon clamd: fail! #6

jeroenlammerts opened this issue May 12, 2015 · 6 comments

Comments

@jeroenlammerts
Copy link

Using docker-compose up
Ubuntu 14.04

mail_1 | Starting SpamAssassin Mail Filter Daemon: spamd.
mail_1 |  * Starting ClamAV daemon clamd 
mail_1 |    ...fail!
mail_1 | Starting amavisd: amavisd-new.
mail_1 |  * Starting Postfix Mail Transport Agent postfix
mail_1 |    ...done.
mail_1 | Listing SASL users
mail_1 | info@mydomain.com: userPassword
mail_1 | Starting...
mail_1 | May 12 11:49:51 mail amavis[506]: Found decoder for    .zoo  at /usr/bin/zoo
mail_1 | May 12 11:49:51 mail amavis[506]: No decoder for       .doc  tried: ripole
mail_1 | May 12 11:49:51 mail amavis[506]: Found decoder for    .cab  at /usr/bin/cabextract
mail_1 | May 12 11:49:51 mail amavis[506]: No decoder for       .tnef
mail_1 | May 12 11:49:51 mail amavis[506]: Internal decoder for .tnef
mail_1 | May 12 11:49:51 mail amavis[506]: Found decoder for    .exe  at /usr/bin/arj
mail_1 | May 12 11:49:51 mail amavis[506]: Using primary internal av scanner code for ClamAV-clamd
mail_1 | May 12 11:49:51 mail amavis[506]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail_1 | May 12 11:49:51 mail amavis[506]: Deleting db files  in /var/lib/amavis/db
mail_1 | May 12 11:49:51 mail amavis[506]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
mail_1 | May 12 11:49:52 mail postfix/master[600]: daemon started -- version 2.11.0, configuration /etc/postfix

When sending to the server:

mail_1 | May 12 11:38:00 mail amavis[602]: (00602-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail_1 | May 12 11:38:01 mail amavis[602]: (00602-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail_1 | May 12 11:38:01 mail amavis[602]: (00602-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
mail_1 | May 12 11:38:07 mail amavis[602]: (00602-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail_1 | May 12 11:38:07 mail amavis[602]: (00602-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 136) line 603.\n
@tomav
Copy link
Contributor

tomav commented May 12, 2015

Hi @jeroenlammerts, can I get your docker-compose.yml or command line?
Thank you.

@jeroenlammerts
Copy link
Author

mail:
  # image: tvial/docker-mailserver
  build: .
  hostname: mail
  domainname: cloudmailer.nl
  ports:
  - "25:25"
  - "143:143"
  - "587:587"
  - "993:993"
  environment:
    docker_mail_domain: "cloudmailer.nl"
    # format is user@domain.tld|clear_password
    docker_mail_users:
      - "info@cloudmailer.nl|secret!"
      - "bounce@cloudmailer.nl|secret!"
    # format is user@domain.tld|list,of,aliases,comma,separated
    docker_mail_aliases:
      - "info@cloudmailer.nl|support"

@tomav
Copy link
Contributor

tomav commented May 12, 2015

@jeroenlammerts, just tried your docker-compose.yml with the image available on the registry tvial/docker-mailserver and it works.

➜  docker-mailserver git:(master) ✗ docker-compose up mail
Recreating dockermailserver_mail_1...
Attaching to dockermailserver_mail_1
mail_1 | Regenerating 'vmailbox' for given users
mail_1 | user 'info' for domain 'cloudmailer.nl' with password 'secret!'
mail_1 | user 'bounce' for domain 'cloudmailer.nl' with password 'secret!'
mail_1 | Regenerating 'virtual' for given aliases
mail_1 | support@cloudmailer.nl redirects to info@cloudmailer.nl
mail_1 | Postfix configurations
mail_1 | Fixing permissions
mail_1 | Creating /etc/mailname
mail_1 | Starting daemons
mail_1 |  * Starting enhanced syslogd rsyslogd
mail_1 |    ...done.
mail_1 |  * Starting file alteration monitor FAM
mail_1 |    ...done.
mail_1 |  * Starting  saslauthd
mail_1 |    ...done.
mail_1 |  * Starting Courier authentication services authdaemond
mail_1 |    ...done.
mail_1 |  * Starting Courier IMAP server imapd
mail_1 |    ...done.
mail_1 |  * Starting Courier IMAP-SSL server imapd-ssl
mail_1 |    ...done.
mail_1 | Starting SpamAssassin Mail Filter Daemon: spamd.
mail_1 |  * Starting ClamAV daemon clamd
mail_1 | LibClamAV Warning: **************************************************
mail_1 | LibClamAV Warning: ***  The virus database is older than 7 days!  ***
mail_1 | LibClamAV Warning: ***   Please update it as soon as possible.    ***
mail_1 | LibClamAV Warning: **************************************************
mail_1 |    ...done.
mail_1 | Starting amavisd: amavisd-new.
mail_1 |  * Starting Postfix Mail Transport Agent postfix
mail_1 |    ...done.
mail_1 | Listing SASL users
mail_1 | bounce@cloudmailer.nl: userPassword
mail_1 | info@cloudmailer.nl: userPassword
mail_1 | Starting...
mail_1 | May 12 12:00:57 mail amavis[507]: No decoder for       .doc  tried: ripole
mail_1 | May 12 12:00:57 mail amavis[507]: Found decoder for    .cab  at /usr/bin/cabextract
mail_1 | May 12 12:00:57 mail amavis[507]: No decoder for       .tnef
mail_1 | May 12 12:00:57 mail amavis[507]: Internal decoder for .tnef
mail_1 | May 12 12:00:57 mail amavis[507]: Found decoder for    .exe  at /usr/bin/arj
mail_1 | May 12 12:00:57 mail amavis[507]: Using primary internal av scanner code for ClamAV-clamd
mail_1 | May 12 12:00:57 mail amavis[507]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail_1 | May 12 12:00:57 mail amavis[507]: Deleting db files  in /var/lib/amavis/db
mail_1 | May 12 12:00:57 mail amavis[507]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
mail_1 | May 12 12:00:57 mail postfix/master[601]: daemon started -- version 2.11.0, configuration /etc/postfix

Could you please try with the image?
Have you modified the Dockerfile or another file of the git repository?

Thank you.

@jeroenlammerts
Copy link
Author

Thanks for your quick help!

I tried this on osx and it is working there, but still have the issue on ubuntu.

I'm using a Digitalocean droplet:

Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

docker version:

Client version: 1.6.1
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 97cd073
OS/Arch (client): linux/amd64
Server version: 1.6.1
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 97cd073
OS/Arch (server): linux/amd64

docker-compose 1.2.0

@jeroenlammerts
Copy link
Author

Looks like the issue is not in your image. I have the same error as here:
https://www.digitalocean.com/community/questions/clamav-daemon-fails-to-load-due-to-memory-any-way-to-run-clamscan-on-demand-for-attachments

thanks for your help!

@tomav
Copy link
Contributor

tomav commented May 12, 2015

Hmmm.... had a memory issue, not with docker, but with capistrano when compiling assets on Digitalocean. I resolved my issue with this.
Hope this helps.

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

2 participants