Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Users

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-2005, 07:54 AM
Active Member
 
Posts: 36
Default MTA: Stopped --> Problem with amavisd, BerkeleyDB & libdb-4.2.so

Hello,

i have a strange problem. I installed Zimbra-M2 on FC4 regarding the very (!) useful howto Fedora Core 4 how-to

Everything is working fine, BUT:
============================

1. I can't send mails locally and externaly...

2. Status:
-------------

Code:
[zimbra@zimbra bin]$ zmcontrol status
Host zimbra.lan
        antispam                Stopped
        antivirus               Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        mta                     Stopped
        snmp                    Running
        spell                   Running
the mta is down, in /var/log/zimbra.log i get :

Code:
Nov 21 14:58:23 zimbra postfix/qmgr[2960]: 4293F1BFA0C: from=<>, size=10570, nrcpt=1 (queue active)
Nov 21 14:58:23 zimbra postfix/smtp[16264]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Nov 21 14:58:23 zimbra postfix/smtp[16265]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Nov 21 14:58:23 zimbra postfix/smtp[16265]: 1A1E31BF9FC: to=<admin@zimbra.lan>, relay=none, delay=135286, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Okay...Port 10024 belongs to amavisd but it is NOT running, trying to start:
Code:
[zimbra@zimbra bin]$ zmamavisdctl start
[zimbra@zimbra bin]$ Problem in Amavis::DB or Amavis::DB::SNMP code: Can't load '/opt/zimbra/zimbramon/lib/i386-linux-thread-multi/auto/BerkeleyDB/BerkeleyDB.so' for module BerkeleyDB: libdb-4.2.so: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/XSLoader.pm line 68.
 at (eval 36) line 12
Compilation failed in require at (eval 36) line 12.
BEGIN failed--compilation aborted at (eval 36) line 12.
Undefined subroutine &BerkeleyDB::Term::close_everything called at /opt/zimbra/zimbramon/lib/i386-linux-thread-multi/BerkeleyDB.pm line 1649.
END failed--call queue aborted.
Hmmm...what does that mean ? If i search for libdb-4.2.so, i get nothing....

Code:
[zimbra@zimbra bin]$ locate libdb-4.2.so
[zimbra@zimbra bin]$ locate libdb-4
/lib/tls/i686/libdb-4.3.so
/lib/tls/i586/libdb-4.3.so
/lib/tls/i486/libdb-4.3.so
/lib/libdb-4.3.so
/usr/lib/tls/i686/libdb-4.3.so
/usr/lib/tls/i586/libdb-4.3.so
/usr/lib/tls/i486/libdb-4.3.so
/usr/lib/libdb-4.3.so
3. So i have libdb-4.3.so installed --> How do i get libdb-4.2.so ??

Anyone out there, who can give me an advice ?!

Thanks !

/harry
Reply With Quote
  #2 (permalink)  
Old 11-21-2005, 08:09 AM
Zimbra Employee
 
Posts: 2,103
Default Recompilation of bdb

You're probably best off simply re-compiling the berkeley db perl module and replacing the one we shipped with.
Reply With Quote
  #3 (permalink)  
Old 11-21-2005, 08:32 AM
Active Member
 
Posts: 36
Default OKay...

i understand !

BUT HOW do i do this ?

I don't know where to search and what to compile....

Sorry...

/harry
Reply With Quote
  #4 (permalink)  
Old 11-21-2005, 08:34 AM
Zimbra Employee
 
Posts: 2,103
Default Cpan

As root:

perl -MCPAN -e 'install "BerkeleyDB"'

Then remove the BerkeleyDB modules from /opt/zimbra/zimbramon/lib
Reply With Quote
  #5 (permalink)  
Old 11-21-2005, 09:50 AM
Active Member
 
Posts: 36
Default i'm running in trouble

hmmm...there ist something wrong:


Code:
[root@zimbra ~]# perl -MCPAN -e 'install "BerkeleyDB"'
........
........
BerkeleyDB.c: In function ‘XS_BerkeleyDB___tiedHash_FIRSTKEY’:
BerkeleyDB.c:6026: error: syntax error before ‘db’
BerkeleyDB.c:6031: error: ‘db’ undeclared (first use in this function)
BerkeleyDB.c:6034: error: called object ‘BerkeleyDB__Common’ is not a function
BerkeleyDB.xs:3875: error: syntax error before ‘key’
BerkeleyDB.xs:3876: error: ‘DBT’ undeclared (first use in this function)
BerkeleyDB.xs:3877: error: ‘DBC’ undeclared (first use in this function)
BerkeleyDB.xs:3887: error: ‘key’ undeclared (first use in this function)
BerkeleyDB.xs:3888: error: ‘value’ undeclared (first use in this function)
BerkeleyDB.xs:3896: error: ‘DB_FIRST’ undeclared (first use in this function)
BerkeleyDB.xs:3900: error: ‘DB_NOTFOUND’ undeclared (first use in this function)
BerkeleyDB.c: In function ‘XS_BerkeleyDB___tiedHash_NEXTKEY’:
BerkeleyDB.c:6084: error: syntax error before ‘db’
BerkeleyDB.c:6090: error: ‘db’ undeclared (first use in this function)
BerkeleyDB.c:6093: error: called object ‘BerkeleyDB__Common’ is not a function
BerkeleyDB.xs:3916: error: ‘DBT’ undeclared (first use in this function)
BerkeleyDB.xs:3916: error: syntax error before ‘value’
BerkeleyDB.xs:3919: error: ‘key’ undeclared (first use in this function)
BerkeleyDB.xs:3920: error: ‘value’ undeclared (first use in this function)
BerkeleyDB.xs:3923: error: ‘DB_NEXT’ undeclared (first use in this function)
BerkeleyDB.xs:3926: error: ‘DB_NOTFOUND’ undeclared (first use in this function)
BerkeleyDB.c: In function ‘XS_BerkeleyDB___tiedArray_FETCHSIZE’:
BerkeleyDB.c:6128: error: syntax error before ‘db’
BerkeleyDB.c:6133: error: ‘db’ undeclared (first use in this function)
BerkeleyDB.c:6136: error: called object ‘BerkeleyDB__Common’ is not a function
BerkeleyDB.xs: In function ‘boot_BerkeleyDB’:
BerkeleyDB.xs:3956: error: ‘DB_VERSION_MAJOR’ undeclared (first use in this function)
BerkeleyDB.xs:3957: error: ‘DB_VERSION_MINOR’ undeclared (first use in this function)
BerkeleyDB.xs:3957: error: ‘DB_VERSION_PATCH’ undeclared (first use in this function)
BerkeleyDB.xs:3971: error: ‘DBT’ undeclared (first use in this function)
BerkeleyDB.xs:3972: error: request for member ‘data’ in something not a structure or union
BerkeleyDB.xs:3973: error: request for member ‘size’ in something not a structure or union
BerkeleyDB.xs:3973: error: ‘db_recno_t’ undeclared (first use in this function)
BerkeleyDB.xs:3974: error: request for member ‘flags’ in something not a structure or union
make: *** [BerkeleyDB.o] Error 1
  /usr/bin/make  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
GCC & make is installed...i cannot interpretate these errors...any ideas ?

Triple merci !

/harry

Last edited by papaya74; 11-21-2005 at 09:55 AM..
Reply With Quote
  #6 (permalink)  
Old 11-21-2005, 09:52 AM
Zimbra Employee
 
Posts: 2,103
Default Entire error?

I don't think that's the beginning of the error message - is there a line foo.h not found?

I suspect you're missing some headers.
Reply With Quote
  #7 (permalink)  
Old 11-21-2005, 10:21 AM
Active Member
 
Posts: 36
Default Entire error..

....message is too long to paste, too big to attach as .txt, so i had to zip it ;-)
Attached Files
File Type: zip BerkeleyDB_compile_error.zip (6.9 KB, 397 views)
Reply With Quote
  #8 (permalink)  
Old 11-21-2005, 10:37 AM
Zimbra Employee
 
Posts: 2,103
Default bdb

gcc -c -I/usr/local/BerkeleyDB/include -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_O$BerkeleyDB.xs:68:16: error: db.h: No such file or directory


Looks like it can't find db.h - should be in /opt/zimbra/sleepycat/include.

Try this:

BERKELEYDB_INCLUDE=/opt/zimbra/sleepycat/include BERKELEYDB_LIB=/opt/zimbra/sleepycat/lib perl -MCPAN -e 'install "BerkeleyDB"'

(That's all one line, in the bash shell, as root)
Reply With Quote
  #9 (permalink)  
Old 11-21-2005, 11:59 AM
Active Member
 
Posts: 36
Default That works !

Wow, thank you very much for this one ! That helped !

Now i'll try:
Quote:
Then remove the BerkeleyDB modules from /opt/zimbra/zimbramon/lib
And i do:

Code:
[root@zimbra ~]# cd /opt/zimbra/zimbramon/lib/i386-linux-thread-multi/
[root@zimbra i386-linux-thread-multi]# mv BerkeleyDB /root/
[root@zimbra i386-linux-thread-multi]# mv BerkeleyDB.pm /root/
[root@zimbra i386-linux-thread-multi]# mv BerkeleyDB.pod /root/
Now i start Zimbra again AND MTA & Amavisd are running, AND i can send internal mails...these are the good news..

BUT, the bad news are in /var/log/zimbra.log. This is the log after i created an appointment between the users "admin" and "harry".

Code:
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) ESMTP::10024 /opt/zimbra/amavisd/tmp/amavis-20051121T192603-06555: <admin@zimbra.lan> -> <admin@zimbra.lan> Received: SIZE=2093 from zimbra.lan ([127.0.0.1]) by localhost (zimbra.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06555-01 for <admin@zimbra.lan>; Mon, 21 Nov 2005 19:26:03 +0100 (CET)
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) body hash: a0e295b62f455c9ba44f3725b316ad29
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) Checking: 2IoYeycoWPBH [192.168.1.225] <admin@zimbra.lan> -> <admin@zimbra.lan>
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) p003 1 Content-Type: multipart/alternative
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) p001 1/1 Content-Type: text/plain, size: 233 B, name:
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) p002 1/2 Content-Type: text/calendar, size: 1033 B, name: meeting.ics
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) TROUBLE in check_mail: mime_decode-1 FAILED: run_command (open pipe): Can't fork at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/IO/File.pm line 176, <GEN3> line 87. at /opt/zimbra/amavisd/sbin/amavisd line 1836, <GEN3> line 87.
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) PRESERVING EVIDENCE in /opt/zimbra/amavisd/tmp/amavis-20051121T192603-06555
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) TIMING [total 1568 ms] - ldap-prepare: 517 (33%)33, SMTP EHLO: 8 (1%)34, SMTP pre-MAIL: 3 (0%)34, mkdir tempdir: 86 (5%)39, create email.txt: 1 (0%)39, ldap-connect: 685 (44%)83, lookup_ldap: 115 (7%)90, SMTP pre-DATA-flush: 6 (0%)91, SMTP DATA: 2 (0%)91, body_hash: 3 (0%)91, gen_mail_id: 2 (0%)91, mkdir parts: 1 (0%)91, mime_decode: 133 (9%)100, rundown: 6 (0%)100
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) extra modules loaded: Net/LDAP/Bind.pm
Nov 21 19:26:04 zimbra amavis[6555]: (06555-01) load: 100 %, total idle 0.001 s, busy 1.575 s
Nov 21 19:26:07 zimbra postfix/smtp[9884]: 1ADE11BFA1B: to=<admin@zimbra.lan>, relay=127.0.0.1[127.0.0.1], delay=7, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=06555-01, mime_decode-1 FAILED: run_command (open pipe): Can't fork at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/IO/File.pm line 176, <GEN3> line 87. at /opt/zimbra/amavisd/sbin/amavisd line 1836, <GEN3> line 87. (in reply to end of DATA command))
I think there is still something wrong with the Perl Installation...OR i did something wrong !

I check the STATUS:
Code:
zmcontrol status
Host zimbra.lan
        antispam                Running
        antivirus               Running
        ldap                    Running
        logger                  Running
        mailbox                 Stopped
        mta                     Running
        snmp                    Running
        spell                   Running
Yes, that´s right..i could not login anymore...hmm what's going on there ?!

Zimbra abends here while creating an appointment, i made 'zmcontrol stop' and 'zmcontrol start', but the same behaviour...

Any ideas again ?!

/harry
Reply With Quote
  #10 (permalink)  
Old 11-21-2005, 12:01 PM
Zimbra Employee
 
Posts: 2,103
Default Can't fork?

Are you out of memory/ file descriptors? What kind of server are you on?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.