Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
  #1 (permalink)  
Old 10-07-2007, 03:46 PM
Member
 
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
mlissner is on a distinguished road
Default [SOLVED] Clamd.pid - no such file

I noticed today that Zimbra isn't working, and that the reason seems to have something to do with the virus scanner.

I did a zmclamdctl status, and the result was /opt/zimbra/log/clamd.pid: No such file or directory...

I can't imagine what would cause this, but I performed: locate clamd.pid, and that didn't bring up any results, so this is a bit worrisome...any ideas on how to fix this?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-07-2007, 05:26 PM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

Welcome to the forums,

What version are you running? (zmcontrol -v)

Is your mail going to the differed queue?

Do you see anything like: "Can't connect to INET socket 127.0.0.1:3310: Connection refused" in the logs?
(check /var/log/zimbra.log)

If your on 4.5.6 try modifying /opt/zimbra/libexec/zmmtaconfig line 59 & change the interval from 120 to something 180+
& if your up to over 320 still with no luck, create a clamd.pid in /opt/zimbra/log/ then try to startup.

Last edited by mmorse : 10-07-2007 at 10:56 PM.
Reply With Quote
  #3 (permalink)  
Old 10-07-2007, 10:34 PM
Member
 
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
mlissner is on a distinguished road
Default

Hi Mike.

Thanks for the help - I hadn't realized that was my first post. I guess I had been thinking about posting for a little while.

To answer your question, I'm running Zimbra Release 4.5.6_GA_1044.UBUNTU6, UBUNTU6 FOSS edition, and I ought to metion I'm running it on Ubuntu 7.04.

You're right, the mail is going to the deferred queue as of now. As for error messages you're right on the money. I guess that means that I'm making some beginner's mistake, but I don't understand what that message means.

I upped the value in the zmmtaconfig file to 320, restarting the server, and checked the status of the server, and antivirus still wasn't running, so I made a clamd.pid file in /opt/zimbra/log/, via touch /opt/zimbra/log/clamd.pid, but that didn't do the trick either.

Am I missing something? Thanks.
Reply With Quote
  #4 (permalink)  
Old 10-07-2007, 10:42 PM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

Quote:
Originally Posted by mlissner View Post
Thanks for the help - I hadn't realized that was my first post. I guess I had been thinking about posting for a little while.
I saw you were a member since Sept 21st though

Quote:
Originally Posted by mlissner View Post
You're right, the mail is going to the deferred queue as of now. As for error messages you're right on the money. I guess that means that I'm making some beginner's mistake, but I don't understand what that message means.
Am I missing something? Thanks.
Nope it's not your fault, make a backup & upgrade to 4.5.7 SourceForge.net: Files or .8 /community/downloads.html
The clamav version in 4.5.6 needed some fixing. In-short you end up in a clamav restart loop, hence why I first suggested changing the watchdog timeout.

Optionally you can also update manually, again make a backup and see Updating CLAMAV - ZimbraWiki

Quote:
Originally Posted by mlissner View Post
I upped the value in the zmmtaconfig file to 320, restarting the server, and checked the status of the server, and antivirus still wasn't running, so I made a clamd.pid file in /opt/zimbra/log/, via touch /opt/zimbra/log/clamd.pid, but that didn't do the trick either.
If you want to keep trying with the .pid - though if you're already not getting any luck past 5 min I doubt it will help...
Backup the /opt/zimbra/bin/zmantivirusctl file
As the zimbra user create /opt/zimbra/log/clamd.pid.fake
Then as root, in /opt/zimbra/bin/zmantivirusctl right after the line
Code:
/opt/zimbra/bin/$i start norewrite
insert
Code:
cp /opt/zimbra/log/clamd.pid.fake /opt/zimbra/log/clamd.pid
so that everytime clamav starts it creates the clamd.pid file from clamd.pid.fake

If you we're curious, one of the bugs was here: Bug 18312 - ClamAV: clamd corrupt db
The most succinct summary:
Quote:
One theory is that since clamAV 0.90 has a very long start-up, and zmmtaconfig/watchdog runs once a minute, it's entirely possible that corruptions are happening when a second clamAV is started. So getting a faster start-up (0.91.1) may fix this.

Last edited by mmorse : 10-08-2007 at 01:46 PM. Reason: other methods - but you might as well update to 4.5.8
Reply With Quote
  #5 (permalink)  
Old 10-07-2007, 11:16 PM
Member
 
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
mlissner is on a distinguished road
Default

OK - I think I can do either of these three routes (update clamav, update zimbra or set up the clamd.pid copy trick). I think I will go with the first, but it doesn't sound like your recommendation. I had a heck of a time installing Zimbra the first time, and I'd hate to go through that all over again if it wasn't absolutely necessary. As for the file copy trick, it is quite tempting, but it seems like it would ultimately break as soon as I updated anything, so that doesn't sound like a good fix.

Before I go through with updating clamav though, why is it that this problem began in the first place? I had a functional installation at one point...I don't think I did any updating or anything that would have caused this problem...
Reply With Quote
  #6 (permalink)  
Old 10-07-2007, 11:21 PM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

Quote:
Originally Posted by mlissner View Post
OK - I think I can do either of these three routes (update clamav, update zimbra or set up the clamd.pid copy trick). I think I will go with the first, but it doesn't sound like your recommendation. I had a heck of a time installing Zimbra the first time, and I'd hate to go through that all over again if it wasn't absolutely necessary. As for the file copy trick, it is quite tempting, but it seems like it would ultimately break as soon as I updated anything, so that doesn't sound like a good fix.
Upgrading is actually really fast, easy, & and your most reliable bet to get this up as fast as possible.
See the bottom of the release notes for instructions /pdf/Zimbra OS Release Notes.pdf

4.5.7 also had a bunch of tomcat & ldap stability enhancements - 4.5.8 is just a release under Yahoo's license to appease the lawyers

Quote:
Originally Posted by mlissner View Post
Before I go through with updating clamav though, why is it that this problem began in the first place? I had a functional installation at one point...I don't think I did any updating or anything that would have caused this problem...
I edited my above post & put the original bug link in (probably after you had started replying).
Quote:
Originally Posted by mmorse View Post
If you we're curious, one of the bugs was here: Bug 18312 - ClamAV: clamd corrupt db
The most succinct summary:
Quote:
One theory is that since clamAV 0.90 has a very long start-up, and zmmtaconfig/watchdog runs once a minute, it's entirely possible that corruptions are happening when a second clamAV is started. So getting a faster start-up (0.91.1) may fix this.

Last edited by mmorse : 10-07-2007 at 11:50 PM.
Reply With Quote
  #7 (permalink)  
Old 10-07-2007, 11:30 PM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

Though I did forget to mention:
After you get this working with 4.5.7 (or .8 if you wish) with no more differed mails, "Can't connect to INET socket 127.0.0.1:3310" errors, etc you may wish to update clamav manually.
See here a list of fixes: Bug 20568 - Clamav update to version 0.91.2
As always, be sure to have a full backup of your /opt/zimbra/ directory first!

We always recommend to get on the current version anyway; because if you have a problem that builds from this, it's hard to troubleshoot if it's a bug or if it's just you
(Someone had trouble on a v3 version the other day & that's a little old when v5.0 is about to roll out...& even v4.0 -not to be confused with v4.5- is approaching EOL)
Just the DB:
Quote:
su - zimbra
mkdir /tmp/clamdb
mv /opt/zimbra/clamav/db/* /tmp/clamdb
zmprov ms `zmhostname` +zimbraServiceEnabled antivirus
/opt/zimbra/clamav/bin/freshclam --config-file=/opt/zimbra/conf/freshclam.conf
zmamavisctl stop
zmamavisctl start

Last edited by mmorse : 03-02-2008 at 07:06 PM.
Reply With Quote
  #8 (permalink)  
Old 10-08-2007, 08:23 PM
Member
 
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
mlissner is on a distinguished road
Default

This is a bit odd, but suddenly during the night, everything started working...can I trust that I'll soon have problems again, or is everything OK? I'm a bit hesitant to do any installs/upgrades unless I really need to...

Is the concensus on the version I'm running that it pretty much MUST be upgraded eventually?
Reply With Quote
  #9 (permalink)  
Old 10-08-2007, 08:36 PM
mmorse's Avatar
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

If you can survive great, the problems usually crop up on reboots, if you can plan sometime to upgrade to .7/.8 (which has now been found to contain the stats fix) go for it, else keep an eye on your box & you already know the 3 fix methods...
Though it did take 66 comments on that bug if that says anything...

Last edited by mmorse : 10-08-2007 at 09:33 PM.
Reply With Quote
  #10 (permalink)  
Old 02-01-2008, 07:31 AM
Elite Member
 
Join Date: Jul 2006
ZCS Version: 5.0.4_GA_2101.RHEL4_64 NETWORK
Posts: 241
padraig is on a distinguished road
Talking thanks for the post

thanks for the post also found extra steps on bugz:

su - zimbra
mkdir /tmp/clamdb
mv /opt/zimbra/clamav/db/* /tmp/clamdb
zmprov ms `zmhostname` +zimbraServiceEnabled antivirus
/opt/zimbra/clamav/bin/freshclam --config-file=/opt/zimbra/conf/freshclam.conf
zmamavisctl stop
zmamavisctl start
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
centos 5 zimbra 4.5.6 no statistics rutman286 Installation 9 08-14-2007 09:30 AM
Opensource backup Question. nfear24 Administrators 3 03-31-2007 11:47 PM
Upgrade fails for v4.5.1 on Ubuntu w/ Symbolic Link Ajael Installation 5 03-01-2007 02:20 AM
Traslation SVN tree status meikka I18N/L10N - Translations 7 02-13-2007 10:13 AM
M3 problem with shares titangears Users 4 01-12-2006 12:01 PM


freshmeat.net sourceforge.net The best Java IDE



 

Search Engine Optimization by vBSEO 3.1.0