1

I have a problem with the /.spamassassin/bayes.lock

This is the error I'm seeing :

Oct 23 15:12:14 server spamd[18073]: bayes: cannot open bayes databases /.spamassassin/bayes_* R/W: lock failed: File exists
Oct 23 15:12:14 server spamd[18157]: bayes: cannot open bayes databases /.spamassassin/bayes_* R/W: lock failed: File exists
Oct 23 15:12:14 server spamd[18107]: bayes: cannot open bayes databases /.spamassassin/bayes_* R/W: lock failed: File exists

The command spamassassin -V is showing :

SpamAssassin version 3.4.1
running on Perl version 5.10.1

bayes_expiry_max_db_size 150000
bayes_learn_to_journal 1
bayes_auto_learn 0

# spamassassin

SPAMDOPTIONS="-u nobody -H --round-robin --min-children=30 --max-children=190 --min-spare=5 --max-spare=80 --timeout-child=120 --max-conn-per-child=100 -i -A IP"

# directory perms

Also the command ll -d /.spamassassin is showing :

drwxrwxrwx 3 nobody nobody 4096 oct 23 15:16 /.spamassassin

Do you have any idea how to solve it?

Alexandre Roux
  • 470
  • 1
  • 6
  • 20

1 Answers1

1

I think the existence of the lock file means that spamassassin is running or that it was not shutdown correctly. I would make sure SA is completely shut down, delete the lock files, start SA back up and see if that fixes the problem.

hjonez
  • 11
  • 2
  • 1
    I restart the service and it works, but the problem reappears again – Ema Gonzalez Oct 23 '18 at 19:18
  • A proper shutdown of the service should remove the lock file. The purpose of the lock file is to signify a database is "open" or that it was not closed or shut down properly. It could be other things like a secure linux setting or App Armor – hjonez Oct 25 '18 at 23:45