|

10-07-2007, 03:46 PM
|
|
Member
|
|
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
|
|
[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.
|

10-07-2007, 05:26 PM
|
 |
Zimbra Employee
|
|
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
|
|
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.
|

10-07-2007, 10:34 PM
|
|
Member
|
|
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
|
|
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.
|

10-07-2007, 10:42 PM
|
 |
Zimbra Employee
|
|
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
|
|
Quote:
Originally Posted by mlissner
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
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
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
|

10-07-2007, 11:16 PM
|
|
Member
|
|
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
|
|
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...
|

10-07-2007, 11:21 PM
|
 |
Zimbra Employee
|
|
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
|
|
Quote:
Originally Posted by mlissner
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
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
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.
|

10-07-2007, 11:30 PM
|
 |
Zimbra Employee
|
|
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
|
|
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.
|

10-08-2007, 08:23 PM
|
|
Member
|
|
Join Date: Sep 2007
ZCS Version: 5.0.5_GA_2201.UBUNTU6 UBUNTU6 FOSS edition
Posts: 15
|
|
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?
|

10-08-2007, 08:36 PM
|
 |
Zimbra Employee
|
|
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,613
|
|
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.
|

02-01-2008, 07:31 AM
|
|
Elite Member
|
|
Join Date: Jul 2006
ZCS Version: 5.0.4_GA_2101.RHEL4_64 NETWORK
Posts: 241
|
|
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
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|