If you recently upgraded you SpamAssassin install to version 3.0.0+ and are getting an error similar to:

bayes db version 2 is not able to be used, aborting! at...

There is nothing to fear, it is just a warning.

First off, I assume you read UPGRADE right? If not, go read it now.

SpamAssassin 3.0.0+ changed the format of the bayes database, this means that the old databases need to be upgraded. In theory, this should happen automatically whenever the database is opened for writing. You can issue a sa-learn --sync command to force this upgrade (--sync opens the database for writing).

This error message comes from the initial initialization of SpamAssassin, which tries to open the database in readonly mode, and is harmless. In theory, the code will eventually open in write mode and perform the upgrade as necessary.

If you continue to see this message, even after an attempt at running sa-learn --sync then you might have a slightly different problem.

First off, run sa-learn -D --sync so you can see the debug messages, it might tell you something. You might see something about being unable to get a lock, with a good number of retries. If this is the case you should tread lightly. If something has the lock already then it might be upgrading the database for you (remember it does this the first time you open for writing), so things might just resolve themselves. Wait a few minutes and run 'sa-learn --dump magic'. If you receive no error message then you can move on. If you still get the message, run sa-learn -D --sync again to see if something still has it locked. If something still has the file locked, then you might have a problem. Worst case, kill off whatever is currently locking the database (ie spamd) and then run sa-learn --sync.

If sa-learn -D --sync doesn't really show any problems, then it might be this bug.

If it's not that, then post a message to the users MailingLists, be sure that you include the output from sa-learn -D --sync otherwise it will be hard to help.


BayesUpgradeError (last edited 2009-09-20 23:17:30 by localhost)