Discussion:
[Maia-users] intermittent lock issue
David Newman
2015-09-15 18:29:08 UTC
Permalink
(cross-posting from the pho-postfix list, as I haven't gotten an answer
there)

Maia 1.0.4 on FreeBSD running as user vscan. User vscan's crontab
includes this line:

0 * * * * /usr/local/share/maia/scripts/process-quarantine.pl --learn
--report > /dev/null

Around once a day or so, and not at any particular time I can discern,
the cron job fails with errors like this:

bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists

How to address the locking issue?

Thanks!

dn
Dirk Bonengel
2015-09-16 06:05:04 UTC
Permalink
David,
i suggest using MySQL to store SpamAssassin's Bayes data. Should give you a performance boost and you get rid of the lovking issues. Should be no problem migrating your data ....
Dirk


Mit meinem rechten Daumen gesendet.

-------- UrsprÃŒngliche Nachricht --------
Von: David Newman <***@networktest.com>
Datum: 15.09.2015 20:29 (GMT+01:00)
An: maia-***@renaissoft.com
Betreff: [Maia-users] intermittent lock issue

(cross-posting from the pho-postfix list, as I haven't gotten an answer
there)

Maia 1.0.4 on FreeBSD running as user vscan. User vscan's crontab
includes this line:

0 * * * * /usr/local/share/maia/scripts/process-quarantine.pl --learn
--report > /dev/null

Around once a day or so, and not at any particular time I can discern,
the cron job fails with errors like this:

bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists
bayes: cannot open bayes databases /var/maiad/.spamassassin/bayes_* R/W:
lock failed: File exists

How to address the locking issue?

Thanks!

dn
David Newman
2015-09-16 18:17:31 UTC
Permalink
Post by Dirk Bonengel
David,
i suggest using MySQL to store SpamAssassin's Bayes data. Should give
you a performance boost and you get rid of the lovking issues. Should be
no problem migrating your data ....
Dirk
Thanks, Dirk.

Per the pho-postfix setup instructions [1], Maia comes with a
maia-mysql.sql initial setup script to create a 'maia' database. Pasting
the comments from the script, the database sets up these tables:

[bayes_expire] is SpamAssassin 3.x's Bayes database expiry reference

[bayes_global_vars] is SpamAssassin 3.x's Bayes database global variables

[bayes_seen] is SpamAssassin 3.x's Bayes database token reference

[bayes_token] is SpamAssassin 3.x's Bayes database token list

[bayes_vars] is SpamAssassin 3.x's Bayes database variables scoreboard

Is that what you meant, or is some other setup needed to use MySQL to
store Bayes data?

Thanks again.

dn

[1] http://www.purplehat.org/?page_id=5
Post by Dirk Bonengel
-------- Ursprüngliche Nachricht --------
Datum: 15.09.2015 20:29 (GMT+01:00)
Betreff: [Maia-users] intermittent lock issue
(cross-posting from the pho-postfix list, as I haven't gotten an answer
there)
Maia 1.0.4 on FreeBSD running as user vscan. User vscan's crontab
0 * * * * /usr/local/share/maia/scripts/process-quarantine.pl --learn
--report > /dev/null
Around once a day or so, and not at any particular time I can discern,
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
How to address the locking issue?
Thanks!
dn
_______________________________________________
Maia-users mailing list
http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
Dirk Bonengel
2015-09-19 12:33:17 UTC
Permalink
David,

you need to tell SpamAssassin (not Maia) how to connect to the MySQL
Bayes data.
That should be done by adding the following lines in your SpamAssassin
local.cf, just make sure you use your Maia DB connection data.
You should also comment out any other Bayes config stuff
(Caveat - that's an old snippet, if the don't work - ask google)

|# Tell Spamassissin to use MySQL for bayes data
bayes_store_module Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn DBI:mysql:db_spam:localhost:3306
bayes_sql_username dbspam
bayes_sql_password passwort|

HTH

Dirk
Post by David Newman
Post by Dirk Bonengel
David,
i suggest using MySQL to store SpamAssassin's Bayes data. Should give
you a performance boost and you get rid of the lovking issues. Should be
no problem migrating your data ....
Dirk
Thanks, Dirk.
Per the pho-postfix setup instructions [1], Maia comes with a
maia-mysql.sql initial setup script to create a 'maia' database. Pasting
[bayes_expire] is SpamAssassin 3.x's Bayes database expiry reference
[bayes_global_vars] is SpamAssassin 3.x's Bayes database global variables
[bayes_seen] is SpamAssassin 3.x's Bayes database token reference
[bayes_token] is SpamAssassin 3.x's Bayes database token list
[bayes_vars] is SpamAssassin 3.x's Bayes database variables scoreboard
Is that what you meant, or is some other setup needed to use MySQL to
store Bayes data?
Thanks again.
dn
[1] http://www.purplehat.org/?page_id=5
Post by Dirk Bonengel
-------- UrsprÃŒngliche Nachricht --------
Datum: 15.09.2015 20:29 (GMT+01:00)
Betreff: [Maia-users] intermittent lock issue
(cross-posting from the pho-postfix list, as I haven't gotten an answer
there)
Maia 1.0.4 on FreeBSD running as user vscan. User vscan's crontab
0 * * * * /usr/local/share/maia/scripts/process-quarantine.pl --learn
--report > /dev/null
Around once a day or so, and not at any particular time I can discern,
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
lock failed: File exists
How to address the locking issue?
Thanks!
dn
_______________________________________________
Maia-users mailing list
http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
_______________________________________________
Maia-users mailing list
http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
Loading...