# amavisd-new upgrade = borken [SOLVED]

## hanj

Hello All

I upgraded amavisd-new to 2.4.1. Now I'm unable to restart amavisd-new. I keep getting the following error...

```

Aug 10 22:32:14 comp amavis[30780]: Creating db in /var/amavis/db/; BerkeleyDB 0.27, libdb 4.2

Aug 10 22:32:14 comp amavis[30780]: (!!) TROUBLE in pre_loop_hook: Transactions not supported by database at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/DBI.pm line 664.
```

I was initially receiving this error:

```
(host localhost[127.0.0.1] said: 451 4.5.0 Error in processing, id=30049-04, parts_decode_ext FAILED: parsing file(1) results - missing last 1 results at (eval 57) line 154. (in reply to end of DATA command))
```

Which appears to be related to net-server. I upgraded net-server yesterday, and thought the new amavisd-new update would fix this.. but now everything appears to be messed up. My mail is stacking up in the mailq.. so any ideas to get this working.. is greatly appreciated.

Here my related packages.

```
[ebuild   R   ] mail-mta/postfix-2.2.10  USE="mysql pam sasl ssl vda -cdb -hardened -ipv6 -ldap -mailwrapper -mbox -nis -postgres" 2,393 kB 

[ebuild   R   ] mail-filter/spamassassin-3.1.3  USE="berkdb ssl -doc -ipv6 -ldap -mysql* -postgres -qmail -sqlite -tools" 952 kB 

[ebuild   R   ] mail-filter/amavisd-new-2.4.1  USE="mysql -ldap -milter -postgres" 0 kB 

[ebuild   R   ] dev-perl/DBI-1.50  377 kB 

[ebuild   R   ] dev-perl/BerkeleyDB-0.27  151 kB
```

Anyone know how to enable transactions in berkdb? I'm not seeing USE flag, etc.

Thanks in advance!

hanjiLast edited by hanj on Fri Aug 11, 2006 3:31 pm; edited 1 time in total

----------

## hanj

Hmmm... I even rolled back to 

```
[ebuild     U ] dev-perl/net-server-0.94 [0.88] 0 kB 

[ebuild     U ] mail-filter/amavisd-new-2.4.1 [2.3.3-r2] USE="mysql -ldap -milter -postgres" 0 kB 
```

And it's still giving me the error. I thought it might be some perl weirdness, and ran 'perl-cleaner all', it didn't need to do anything. I'm not sure where else to look? When I downgraded amavis, I was sure to use the archived config.. FYI.

update. I had to pull the amavis hooks out to get mail flowing again. I think it's not a problem with DBI, but the underlying database that it's trying to talk to. I guess BerkeleyDB, but I'm not sure about the transaction part. It might be another DB as well. Here is my full output of log messages on startup...

```
Aug 10 22:32:14 comp amavis[30780]: Module Net::Server         0.94

Aug 10 22:32:14 comp amavis[30780]: Module Time::HiRes         1.82

Aug 10 22:32:14 comp amavis[30780]: Module Unix::Syslog        0.100

Aug 10 22:32:14 comp amavis[30780]: Amavis::DB code      loaded

Aug 10 22:32:14 comp amavis[30780]: Amavis::Cache code   loaded

Aug 10 22:32:14 comp amavis[30780]: SQL base code        NOT loaded

Aug 10 22:32:14 comp amavis[30780]: SQL::Log code        NOT loaded

Aug 10 22:32:14 comp amavis[30780]: SQL::Quarantine      NOT loaded

Aug 10 22:32:14 comp amavis[30780]: Lookup::SQL code     NOT loaded

Aug 10 22:32:14 comp amavis[30780]: Lookup::LDAP code    NOT loaded

Aug 10 22:32:14 comp amavis[30780]: AM.PDP-in proto code loaded

Aug 10 22:32:14 comp amavis[30780]: SMTP-in proto code   loaded

Aug 10 22:32:14 comp amavis[30780]: Courier proto code   NOT loaded

Aug 10 22:32:14 comp amavis[30780]: SMTP-out proto code  loaded

Aug 10 22:32:14 comp amavis[30780]: Pipe-out proto code  NOT loaded

Aug 10 22:32:14 comp amavis[30780]: BSMTP-out proto code NOT loaded

Aug 10 22:32:14 comp amavis[30780]: Local-out proto code loaded

Aug 10 22:32:14 comp amavis[30780]: OS_Fingerprint code  NOT loaded

Aug 10 22:32:14 comp amavis[30780]: ANTI-VIRUS code      loaded

Aug 10 22:32:14 comp amavis[30780]: ANTI-SPAM code       loaded

Aug 10 22:32:14 comp amavis[30780]: ANTI-SPAM-SA code    loaded

Aug 10 22:32:14 comp amavis[30780]: Unpackers code       loaded

Aug 10 22:32:14 comp amavis[30780]: Found $file            at /usr/bin/file

Aug 10 22:32:14 comp amavis[30780]: No $dspam,             not using it

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .mail

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .asc 

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .uue 

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .hqx 

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .ync 

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .F    at /usr/bin/unfreeze

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .Z    at /usr/bin/uncompress

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .gz  

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .bz2  at /bin/bzip2 -d

Aug 10 22:32:14 comp amavis[30780]: No decoder for       .lzo  tried: lzop -d

Aug 10 22:32:14 comp amavis[30780]: No decoder for       .rpm  tried: rpm2cpio.pl, rpm2cpio

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .cpio at /bin/cpio

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .tar  at /bin/cpio

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .deb  at /usr/bin/ar

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .zip 

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .rar  at /usr/bin/unrar

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .arj  at /usr/bin/unarj

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .arc  at /usr/bin/arc

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .zoo  at /usr/bin/zoo

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .lha  at /usr/bin/lha

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .cab  at /usr/bin/cabextract

Aug 10 22:32:14 comp amavis[30780]: No decoder for       .tnef tried: tnef

Aug 10 22:32:14 comp amavis[30780]: Internal decoder for .tnef

Aug 10 22:32:14 comp amavis[30780]: Found decoder for    .exe  at /usr/bin/unrar; /usr/bin/lha; /usr/bin/unarj

Aug 10 22:32:14 comp amavis[30780]: Using internal av scanner code for (primary) ClamAV-clamd

Aug 10 22:32:14 comp amavis[30780]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan

Aug 10 22:32:14 comp amavis[30780]: Creating db in /var/amavis/db/; BerkeleyDB 0.27, libdb 4.2

Aug 10 22:32:14 comp amavis[30780]: (!!) TROUBLE in pre_loop_hook: Transactions not supported by database at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/DBI.pm line 664.
```

I tried various things like disabling database in amavisd.conf

```
$enable_db = 0;              # enable use of BerkeleyDB/libdb (SNMP and nanny)

$enable_global_cache = 0;    # enable use of libdb-based cache if $enable_db=1
```

as well as removing clamav, etc.. since that was a recent upgrade.

Thanks!

hanji

----------

## magic919

You seem to still be using net-server 0.94.  Try 0.88

----------

## hanj

Hello

I downgraded to net-server-0.88

```
[ebuild     U ] dev-perl/net-server-0.94 [0.88] 0 kB

[ebuild     U ] mail-filter/amavisd-new-2.4.1 [2.3.3-r2] USE="mysql -ldap -milter -postgres" 0 kB

```

It's showing my current version at [0.88] and wants to upgrade to 0.94.

hanji

----------

## magic919

From your output

```

Aug 10 22:32:14 comp amavis[30780]: Module Net::Server         0.94 

```

----------

## hanj

Problem appears to be related to spamassassin + bayes. If I comment out the database connection in /etc/spammassassin/local.cf, amavis can start.

I'm not sure why it's complaining about transaction support?? I've always had my tables built as MyISAM, and if I'm not mistaken, INNODB is the only table type that can support transactions. Backing up... I have bayes tokens stored in mysql instead of a flat file. I'll post the relevent sections of my local.cf file.

```
bayes_auto_learn 1 

bayes_auto_learn_threshold_nonspam 1 

bayes_auto_learn_threshold_spam 14.00

bayes_store_module      Mail::SpamAssassin::BayesStore::MySQL

bayes_sql_dsn           DBI:mysql:mailsql:localhost

bayes_sql_username      user

bayes_sql_password      pass

bayes_auto_expire       1

bayes_expiry_max_db_size 100000

add_header all Level _STARS(*)_

skip_rbl_checks         0

use_razor2              1

use_dcc                 1

use_pyzor               1

use_bayes               1

ok_languages            en

ok_locales              en
```

[edit] I changed table types to INNODB, and restarted amavis.. and it still is complaining about transactions.

Thanks!

hanjiLast edited by hanj on Fri Aug 11, 2006 2:52 pm; edited 1 time in total

----------

## magic919

Good to see you are on the track of sorting it.

----------

## hanj

 *magic919 wrote:*   

> From your output
> 
> ```
> 
> Aug 10 22:32:14 comp amavis[30780]: Module Net::Server         0.94 
> ...

 

Ah... that was from an eariler output.. when I was running with the latest. Here is amavis output with 'rolled back' packages...

```
Aug 11 08:37:13 comp amavis[6912]: starting.  /usr/sbin/amavisd at comp amavisd-new-2.3.3 (20050822), Unicode aware

Aug 11 08:37:13 comp amavis[6912]: Perl version               5.008008

Aug 11 08:37:13 comp amavis[14956]: Module Amavis::Conf        2.043

Aug 11 08:37:13 comp amavis[14956]: Module Archive::Tar        1.28

Aug 11 08:37:13 comp amavis[14956]: Module Archive::Zip        1.16

Aug 11 08:37:13 comp amavis[14956]: Module BerkeleyDB          0.27

Aug 11 08:37:13 comp amavis[14956]: Module Compress::Zlib      1.41

Aug 11 08:37:13 comp amavis[14956]: Module Convert::TNEF       0.17

Aug 11 08:37:13 comp amavis[14956]: Module Convert::UUlib      1.06

Aug 11 08:37:13 comp amavis[14956]: Module DBD::mysql          2.9007

Aug 11 08:37:13 comp amavis[14956]: Module DBI                 1.50

Aug 11 08:37:13 comp amavis[14956]: Module DB_File             1.814

Aug 11 08:37:13 comp amavis[14956]: Module MIME::Entity        5.417

Aug 11 08:37:13 comp amavis[14956]: Module MIME::Parser        5.417

Aug 11 08:37:13 comp amavis[14956]: Module MIME::Tools         5.417

Aug 11 08:37:13 comp amavis[14956]: Module Mail::Header        1.67

Aug 11 08:37:13 comp amavis[14956]: Module Mail::Internet      1.67

Aug 11 08:37:13 comp amavis[14956]: Module Mail::SpamAssassin  3.001003

Aug 11 08:37:13 comp amavis[14956]: Module Net::Cmd            2.26

Aug 11 08:37:13 comp amavis[14956]: Module Net::DNS            0.53

Aug 11 08:37:13 comp amavis[14956]: Module Net::SMTP           2.29

Aug 11 08:37:13 comp amavis[14956]: Module Net::Server         0.88

Aug 11 08:37:13 comp amavis[14956]: Module Time::HiRes         1.82

Aug 11 08:37:13 comp amavis[14956]: Module Unix::Syslog        0.100

Aug 11 08:37:13 comp amavis[14956]: Amavis::DB code    loaded

Aug 11 08:37:13 comp amavis[14956]: Amavis::Cache code loaded

Aug 11 08:37:13 comp amavis[14956]: SQL base code      NOT loaded

Aug 11 08:37:13 comp amavis[14956]: SQL::Log code      NOT loaded

Aug 11 08:37:13 comp amavis[14956]: SQL::Quarantine    NOT loaded

Aug 11 08:37:13 comp amavis[14956]: Lookup::SQL  code  NOT loaded

Aug 11 08:37:13 comp amavis[14956]: Lookup::LDAP code  NOT loaded

Aug 11 08:37:13 comp amavis[14956]: AM.PDP prot  code  loaded

Aug 11 08:37:13 comp amavis[14956]: SMTP-in prot code  loaded

Aug 11 08:37:13 comp amavis[14956]: ANTI-VIRUS code    loaded

Aug 11 08:37:13 comp amavis[14956]: ANTI-SPAM  code    loaded

Aug 11 08:37:13 comp amavis[14956]: Unpackers  code    loaded

Aug 11 08:37:13 comp amavis[14956]: Found $file            at /usr/bin/file

Aug 11 08:37:13 comp amavis[14956]: No $dspam,             not using it

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .mail

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .asc 

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .uue 

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .hqx 

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .ync 

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .F    at /usr/bin/unfreeze

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .Z    at /usr/bin/uncompress

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .gz  

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .bz2  at /bin/bzip2 -d

Aug 11 08:37:13 comp amavis[14956]: No decoder for       .lzo  tried: lzop -d

Aug 11 08:37:13 comp amavis[14956]: No decoder for       .rpm  tried: rpm2cpio.pl, rpm2cpio

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .cpio at /bin/cpio

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .tar  at /bin/cpio

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .deb  at /usr/bin/ar

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .zip 

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .rar  at /usr/bin/unrar

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .arj  at /usr/bin/unarj

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .arc  at /usr/bin/arc

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .zoo  at /usr/bin/zoo

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .lha  at /usr/bin/lha

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .cab  at /usr/bin/cabextract

Aug 11 08:37:13 comp amavis[14956]: No decoder for       .tnef tried: tnef

Aug 11 08:37:13 comp amavis[14956]: Internal decoder for .tnef

Aug 11 08:37:13 comp amavis[14956]: Found decoder for    .exe  at /usr/bin/unrar; /usr/bin/lha; /usr/bin/unarj

Aug 11 08:37:13 comp amavis[14956]: Using internal av scanner code for (primary) ClamAV-clamd

Aug 11 08:37:13 comp amavis[14956]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan

Aug 11 08:37:13 comp amavis[14956]: Creating db in /var/amavis/db/; BerkeleyDB 0.27, libdb 4.2

Aug 11 08:37:13 comp amavis[14956]: TROUBLE in pre_loop_hook: Transactions not supported by database at /usr/lib/perl5/vendor_perl/5.8.8/i686-li

nux/DBI.pm line 664.
```

Thanks for replying!

hanji

----------

## hanj

 *magic919 wrote:*   

> Good to see you are on the track of sorting it.

 

I thought INNODB was going to be the winning ticket.. but no dice.

hanji

----------

## hanj

Looks like I'm making progress now. I re-emerged DBD-mysql and the error went away. I'm going to try upgrading net-server and amavisd-new now.. and see it's still good. If so, I'll be sure to mark the post solved.

Also, while testing I restored my tables back to MyISAM.. so table type is not an issue.

Thanks!

hank

----------

## hanj

Everything works now.

Thanks!

hanji

----------

## steveb

 :Smile: 

----------

## brownowl

This happened to me as well, but the solution was really simple:

emerge =dev-perl/net-server-0.88

Then:

/etc/init.d/amavisd restart

Cheers, Laurie.

----------

## lukasa

My problem went further on. 

Until now I had to re-emerge Unix-Syslog, BerkeleyDB, Digest-SHA1 and HTML-Parser.

Is there a dependency missing for the perl-modules?

UPDATE:

After re-emerging Convert-UUlib amavisd-new would run again.

Looks like all necessary perl-modules needed re-emerging.

----------

## lonewolfnight

Mine also turned out to be a simple rebuild of DBD-mysql. Strange nothing came up previously when I had run revdep-rebuild.

----------

## dtperik

I had a similer problem when I updated RT along with bunches of perl updates.  Re-emerging DBD-mysql fixed it!  

Thanks!

----------

## awconstable

re-emerging DBD-mysql is def the answer!

Just wish I'd found this thread a few hours ago   :Sad: 

----------

