Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

Could not connect to database

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


floeff at gmail

Nov 9, 2009, 12:33 AM

Post #1 of 3 (438 views)
Permalink
Could not connect to database

Hello,

all of a sudden, on my Ubuntu 9.04 machine with amavids-new 2.6.2 and
SpamAssassin 3.2.5, I get the following error when starting:

# /etc/init.d/amavis start
Starting amavisd:
Could not connect to database
amavisd-new.

I found out that if I disable SpamAssassin, everything works fine
again. It might be related to an unfinished FusionForge installation,
but I can't find out why it doesn't work. Anyone has an idea what
might cause the error message? sa-update -D works fine, so the basic
database seems to be existing, and I couldn't find any changes neither
in amavisd nor in SpamAssassin configuration.

amavisd-new debug gives the following (relevant) output:

==
Nov 9 09:19:56.250 myserver /usr/sbin/amavisd-new[30023]: starting.
/usr/sbin/amavisd-new at myserver amavisd-new-2.6.2 (20081215),
Unicode aware, LANG="de_DE.UTF-8"
Nov 9 09:19:56.250 myserver /usr/sbin/amavisd-new[30023]: user=,
EUID: 108 (108); group=, EGID: 116 116 (116 116)
Nov 9 09:19:56.250 myserver /usr/sbin/amavisd-new[30023]: Perl
version 5.010000

Could not connect to database
Nov 9 09:19:56.775 myserver /usr/sbin/amavisd-new[30023]: INFO: SA
version: 3.2.5, 3.002005, no optional modules: Net::CIDR::Lite
Encode::Detect IP::Country::Fast Image::Info Image::Info::GIF
Image::Info::JPEG Image::Info::PNG Image::Info::TIFF
Nov 9 09:19:56.775 myserver /usr/sbin/amavisd-new[30023]:
SpamControl: init_pre_chroot on SpamAssassin done
Nov 9 09:19:56.776 myserver /usr/sbin/amavisd-new[30023]:
Net::Server: 2009/11/09-09:19:56 Amavis (type
Net::Server::PreForkSimple) starting! pid(30023)
[...]
Nov 9 09:19:56.823 myserver /usr/sbin/amavisd-new[30023]: Creating db
in /var/lib/amavis/db/; BerkeleyDB 0.34, libdb 4.6
Nov 9 09:19:59.897 myserver /usr/sbin/amavisd-new[30023]:
SpamControl: initializing Mail::SpamAssassin
Nov 9 09:19:59.897 myserver /usr/sbin/amavisd-new[30023]:
SpamAssassin debug facilities: info

Could not connect to database
Nov 9 09:20:02.283 myserver /usr/sbin/amavisd-new[30023]:
SpamControl: init_pre_fork on SpamAssassin done
Nov 9 09:20:02.283 myserver /usr/sbin/amavisd-new[30023]:
Net::Server: Beginning prefork (2 processes)
Nov 9 09:20:02.284 myserver /usr/sbin/amavisd-new[30023]:
Net::Server: Starting "2" children
[...]
==

The mail log files do not contain any errors.

I didn't modify the configuration in the last months according to the
date/time stamp.

Thanks,
Florian


Mark.Martinec+sa at ijs

Nov 9, 2009, 4:11 AM

Post #2 of 3 (407 views)
Permalink
Re: Could not connect to database [In reply to]

Florian,

> all of a sudden, on my Ubuntu 9.04 machine with amavids-new 2.6.2 and
> SpamAssassin 3.2.5, I get the following error when starting:
> [...]
> I found out that if I disable SpamAssassin, everything works fine
> again. It might be related to an unfinished FusionForge installation,
> but I can't find out why it doesn't work. Anyone has an idea what
> might cause the error message? sa-update -D works fine, so the basic
> database seems to be existing, and I couldn't find any changes neither
> in amavisd nor in SpamAssassin configuration.
>
> Nov 9 09:19:56.250 myserver /usr/sbin/amavisd-new[30023]: Perl
> version 5.010000
>
> Could not connect to database
> Nov 9 09:19:56.775 myserver /usr/sbin/amavisd-new[30023]: INFO: SA
> version: 3.2.5, 3.002005, no optional modules: Net::CIDR::Lite
> Encode::Detect IP::Country::Fast Image::Info Image::Info::GIF
> Image::Info::JPEG Image::Info::PNG Image::Info::TIFF

The message 'Could not connect to database' does not come directly
neither from amavisd nor from SpamAssassin. It seems to occur during
loading ('require') or perl modules needed by SpamAssassin, so attention
should be directed there. I couldn't find the message in question
by searching through all .pm modules in the library, so it is either
spliced together from components, or more likely, coming from one
of the underlying libraries, perhaps your PAM login authentication.

> sa-update -D works fine

Try: su vscan -c 'spamassassin -D -t <test.msg'
(run it under the same user as amavisd is runnning under)


Mark


floeff at gmail

Nov 9, 2009, 4:27 AM

Post #3 of 3 (399 views)
Permalink
Re: Could not connect to database [In reply to]

Hi Mark,

> The message 'Could not connect to database' does not come directly
> neither from amavisd nor from SpamAssassin. It seems to occur during
> loading ('require') or perl modules needed by SpamAssassin, so attention
> should be directed there. I couldn't find the message in question
> by searching through all .pm modules in the library, so it is either
> spliced together from components, or more likely, coming from one
> of the underlying libraries, perhaps your PAM login authentication.

wow, thanks a lot! Indeed, you seem to be right. The error seems to be
caused from entires in /etc/nsswitch.conf that FusionForge set up.
After removal of FF, it all worked fine again. I guess that
amavisd-new and/or SA tried to get user data from the added database,
and did not succeed.

Thanks for your fast help!

Florian

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.