Re: cannot open bayes databases /var/sabayes/bayes_* R/W: lock failed
On Tue, 25 Mar 2008, Mike Fahey wrote: Every 24 hours, the following message scrolls in the log sa stop processing and I have to stop sa, remove bayes* and restart it. 18804736 bayes_toks.expire55880 10989568 bayes_toks.expire56051 19247104 bayes_toks.expire56167 18370560 bayes_toks.expire56194 20787200 bayes_toks.expire56201 17412096 bayes_toks.expire56217 Turn off automatic bayes expiry and expire using a cron job. See the list archives for discussions of this topic. You can get rid of the bayes_toks.expire* files. -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ [EMAIL PROTECTED]FALaholic #11174 pgpk -a [EMAIL PROTECTED] key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 --- False is the idea of utility that sacrifices a thousand real advantages for one imaginary or trifling inconvenience; that would take fire from men because it burns, and water because one may drown in it; that has no remedy for evils except destruction. The laws that forbid the carrying of arms are laws of such a nature. They disarm only those who are neither inclined nor determined to commit crime. -- Cesare Beccaria, quoted by Thomas Jefferson --- 19 days until Thomas Jefferson's 265th Birthday
Re: cannot open bayes databases Interrupted system call
I'll give this a shot. thanks Matt Kettler wrote: Mike Fahey wrote: This page specifically uses /etc/mail/spamassassin. Yeah, I read that the first time. It is wrong. In fact, I'd say it's stupid. I'll go edit the wiki article when I get a chance, but I want to have some time to really sit down and do an extensive rewrite there. There's a lot of facts that should be there, which aren't. If nothing else, there needs to be NO OTHER FILES starting with "bayes" in your /etc/mail/spamassassin for that to work! If you've got a bayes_rescore.cf in there, you're going to break. Also, /etc/ isn't intended to store data that changes constantly. It is completely contrary to the Unix philosophy to store a database here. Therefore, using all possible strength, and all possible expertise that my position as a member of the SpamAssassin Project Management Committee conveys, I strongly advise not following the advice of that wiki article. At least as far as using "bayes_path /etc/mail/spamassassin/bayes". I believe its hardware related, as other machines work fine. It could be rights related.. what are the permissions on /etc/mail/spamassassin/? Is it world rwx (dangerous!)? It could also be related to a file starting with bayes in there that's not a part of the bayes DB.. ls /etc/mail/spamassassin/bayes* Is there anything but bayes_seen, bayes_toks and bayes_journal? Does anyone else have any tweaks for global bayes ? Yeah, put it in its own directory, and not in /etc/.
Re: cannot open bayes databases Interrupted system call
Mike Fahey wrote: This page specifically uses /etc/mail/spamassassin. Yeah, I read that the first time. It is wrong. In fact, I'd say it's stupid. I'll go edit the wiki article when I get a chance, but I want to have some time to really sit down and do an extensive rewrite there. There's a lot of facts that should be there, which aren't. If nothing else, there needs to be NO OTHER FILES starting with "bayes" in your /etc/mail/spamassassin for that to work! If you've got a bayes_rescore.cf in there, you're going to break. Also, /etc/ isn't intended to store data that changes constantly. It is completely contrary to the Unix philosophy to store a database here. Therefore, using all possible strength, and all possible expertise that my position as a member of the SpamAssassin Project Management Committee conveys, I strongly advise not following the advice of that wiki article. At least as far as using "bayes_path /etc/mail/spamassassin/bayes". I believe its hardware related, as other machines work fine. It could be rights related.. what are the permissions on /etc/mail/spamassassin/? Is it world rwx (dangerous!)? It could also be related to a file starting with bayes in there that's not a part of the bayes DB.. ls /etc/mail/spamassassin/bayes* Is there anything but bayes_seen, bayes_toks and bayes_journal? Does anyone else have any tweaks for global bayes ? Yeah, put it in its own directory, and not in /etc/.
Re: cannot open bayes databases Interrupted system call
This page specifically uses /etc/mail/spamassassin. I believe its hardware related, as other machines work fine. Does anyone else have any tweaks for global bayes ? Matt Kettler wrote: Mike Fahey wrote: I'm using site wide Bayesian Filtering. These files can become very large anywhere from 200mb to 2gb. Looking at http://wiki.apache.org/spamassassin/SiteWideBayesSetup?highlight=%28bayes%29 it says to set the bayes_path to /etc/mail/spamassassin/bayes What do you suggest? I'd suggest something in /var. Preferably not a subdirectory of your rule directories.. ie: /var/spamassassin/bayes/bayes Make sure said directory is world rwx. (this part is why you don't want it in your /etc/mail/spamassassin.
Re: cannot open bayes databases Interrupted system call
Mike Fahey wrote: Every 24 hours I see the following errors and spamassassin has to be restarted. Other machines running SA are fine. SA 3.2.4_1 freebsd 6.2 perl5.8.8 spamd[19777]: bayes: cannot open bayes databases /usr/local/share/spamassassin/bayes_* R/W: lock failed: Interrupted system call Um, why's it trying to create a bayes database in /usr/local/share/spamassassin/ ?? That's *DANGEROUS*. DO NOT point bayes_path there.. DO NOT set any user's home directory to /usr/share/spamassassin. This *WHOLE* directory gets obliterated without prompts or warning when you upgrade. It should contain nothing but the distribution provided rulesets. Nothing else.
Re: cannot open bayes databases R/W:,lock failed: Interrupted system call
Mike Fahey wrote: > spamassassin server - 3gb ram, intel quad core 2.4 cpu,freebsd 6.2 > > Every day the bayesian database gets corrupted. We see the following > in the log file. We only use sqlite for scores. > > bayes: cannot open bayes databases > /usr/local/share/spamassassin/bayes_* R/W: > lock failed: Interrupted system call > > When we see the following in the logfile memory is at 1gig +. However > after restarting spamassassin there are memory usage goes right back > to 400mb. Something is corrupting the database. > I have to stop spamassassin, rm bayes* and restart spamassassin. > > Thanks. Suggestion: move away from sqlite towards mysql. You have a big system (intel quad), and a better database will use that hardware better. Email-> jarif No @ Spamiki.fi
Re: cannot open bayes databases R/W:,lock failed: Interrupted system call
Mike Fahey writes: > spamassassin server - 3gb ram, intel quad core 2.4 cpu,freebsd 6.2 > > Every day the bayesian database gets corrupted. We see the following in > the log file. We only use sqlite for scores. > > bayes: cannot open bayes databases /usr/local/share/spamassassin/bayes_* > R/W: > lock failed: Interrupted system call This is normal; the error message means that there is contention for the lock, and one spamd process cannot get the lock. It's fine. > When we see the following in the logfile memory is at 1gig +. However > after restarting spamassassin there are memory usage goes right back to > 400mb. Something is corrupting the database. > I have to stop spamassassin, rm bayes* and restart spamassassin. Could you check for extremely large bayes db files? --j.
Re: cannot open bayes databases
FYI, I just saw this message after upgrading to Sarge. The solution is to use db4.2_upgrade on your bayes and AWL dbs.
Re: cannot open bayes databases
> Bruno Delbono wrote: > > I've found that recovering bayes berkeley db databases can be a > > very big chore and would suggest that you move to a proper SQL > > datbase (MySQL, PostgreSQL, SQLite) as soon as possible. > > BerkeleyDB is horrible! Both in performance and reliability. Michael Parker replied: > 1) This is bordering on FUD. Berkeley DB has it's uses, and as such > it is good to recognize those uses and use the right DB for the right > job. Indeed. For the record, in the time I've been using SA with Bayes (almost since it was introduced - I've been using SA since ~v2.2 or 2.3), I've *NEVER* had Bayes corruption, and I'm still using the "same" databases as I started with. I've had *other* problems related to how (auto)learning was implemented, and how expiry works, but that didn't corrupt the DB, just made the rest of the system bog down occasionally. The closest thing to a BerkeleyDB-related issue that I've had was transferring a Bayes DB from a RH7.3 system to a Debian Woody system, where I had to do some magic to get the right version of the BDB library linked into Perl's DB_File module. (It didn't help that I'd added db4 to the RH system, when db3 was the "real" version of BDB shipping with the OS, and Debian shipped with (IIRC) db2 linked to DB_File.) -kgd -- Get your mouse off of there! You don't know where that email has been!
Re: cannot open bayes databases
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Delbono wrote: > I've found that recovering bayes berkeley db databases can be a > very big chore and would suggest that you move to a proper SQL > datbase (MySQL, PostgreSQL, SQLite) as soon as possible. > BerkeleyDB is horrible! Both in performance and reliability. > 1) This is bordering on FUD. Berkeley DB has it's uses, and as such it is good to recognize those uses and use the right DB for the right job. For those interested, here is a benchmark of the various bayes backend storage methods: http://wiki.apache.org/spamassassin/BayesBenchmarkResults You can judge for yourself how well each database performs. 2) I'm sorry, but I simply can not recommend SQLite as a backend store for the bayes data. Unless someone can prove me wrong, it's simply not up to the task. Michael -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCm/dfG4km+uS4gOIRAoVpAJsFBwzF3bhIkXrqsBG3BjAS0ZqX1QCfRS6i nfJwLAYz7C9ILdw/mcP568s= =1ZEA -END PGP SIGNATURE-
Re: cannot open bayes databases
On Monday 30 May 2005 05:58 pm, Bruno Delbono wrote: > On Mon, 30 May 2005 15:47:01 -0700, Chris <[EMAIL PROTECTED]> wrote: > > The problem appears to be that database is corrupted. I renamed the old > > ~/.spamassassin, ran my reporter script an all was well. Luckily I have > > a > > good 1000 or so spams saved up, hams are another matter. Is there any > > way to save the database or is it just 'gone'? > > This is vital in Bayes database maintenance. Over time a lot of valuable > information will be stored in the Bayes database. Should the database > become corrupted for some reason you don't want to start all over with > seeding it and then having to wait the time it takes to accumulate the > number of tokens that make up a mature system again. Create a daily backup > for ~/.spamassassin (this is where the database files live) and do daily > full backups. > > I've found that recovering bayes berkeley db databases can be a very big > chore and would suggest that you move to a proper SQL datbase (MySQL, > PostgreSQL, SQLite) as soon as possible. BerkeleyDB is horrible! Both in > performance and reliability. > > http://spamassassin.apache.org/full/3.0.x/dist/sql/README.bayes > > -Bruno Thanks Bruno, I'll give that at look through this coming weekend when I've got more time. For now I ran sa-learn --backup > backup.txt as you suggested. Looking at the backup file I see there was one line, the last one, that wasn't complete. I deleted that line, ran sa-learn --restore backup.txt and the database appears to have been mostly recreated. The number of spam and ham are the same, and, running the reporter script gave no errors this time. Maybe I got lucky, maybe not. Only time will tell over the rest of this week. I know where the corruption came from, I had some bad ram that was causing lockups and reboots during the day when I was at work. That appears to have been fixed now. Chris -- Chris Registered Linux User 283774 http://counter.li.org 19:05:34 up 1 day, 6:46, 2 users, load average: 1.31, 1.37, 0.99 Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk "Bite off, dirtball." Richard Sexton, [EMAIL PROTECTED]
RE: cannot open bayes databases
M>-Original Message- M>From: Chris [mailto:[EMAIL PROTECTED] M>Sent: 30 May 2005 04:00 M>To: users@spamassassin.apache.org M>Subject: cannot open bayes databases M> M>While running my sa-learn script I'm suddenly getting the below: M> M>debug: lock: 26313 M>created M>/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.26313 M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with 0 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>1 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>2 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>3 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>4 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>5 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>6 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>7 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>8 retries M>debug: lock: 26313 trying to get lock on M>/home/chris/.spamassassin/bayes with M>9 retries M>Cannot open bayes databases /home/chris/.spamassassin/bayes_* M>R/W: lock M>failed: File exists M> M>Looking in my ~.SpamAssassin folder I see a bayes.lock file M>is still there after running sa-learn. I've deleted it and M>the error persists. I'm sure there is an easy fix for this. M> M>Thanks M>Chris M> M>-- M>Chris Hi Chris I had the same and deleted the .lock file then ran sa-learn --sync or you could use --force-expire, worth a go. If that don't work then post back and someone else may have more ideas. Martin
Re: cannot open bayes databases
On Mon, 30 May 2005 15:47:01 -0700, Chris <[EMAIL PROTECTED]> wrote: The problem appears to be that database is corrupted. I renamed the old ~/.spamassassin, ran my reporter script an all was well. Luckily I have a good 1000 or so spams saved up, hams are another matter. Is there any way to save the database or is it just 'gone'? This is vital in Bayes database maintenance. Over time a lot of valuable information will be stored in the Bayes database. Should the database become corrupted for some reason you don't want to start all over with seeding it and then having to wait the time it takes to accumulate the number of tokens that make up a mature system again. Create a daily backup for ~/.spamassassin (this is where the database files live) and do daily full backups. I've found that recovering bayes berkeley db databases can be a very big chore and would suggest that you move to a proper SQL datbase (MySQL, PostgreSQL, SQLite) as soon as possible. BerkeleyDB is horrible! Both in performance and reliability. http://spamassassin.apache.org/full/3.0.x/dist/sql/README.bayes -Bruno
Re: cannot open bayes databases
On Monday 30 May 2005 05:24 pm, Bruno Delbono wrote: > > Ah. It could be number of things - corrupt database, bad berkley db > install, missing libdb_deadlock (usually libdb3/4_deadlock), permissions. > I would suggest > > 1) Make sure that ~/.spamassassin is owned by you chris (both uid:gid) > 2) If 1), then remove ~/.spamassassin (or mv it) and re-run sa-learn with > the message and see if this problem is reproducable > 3) Make sure that spamassassin is linked/compiled with the proper libdb > (Berkley DB) > > DEBUG follows: The problem appears to be that database is corrupted. I renamed the old ~/.spamassassin, ran my reporter script an all was well. Luckily I have a good 1000 or so spams saved up, hams are another matter. Is there any way to save the database or is it just 'gone'? -- Chris Registered Linux User 283774 http://counter.li.org 17:44:57 up 1 day, 5:25, 2 users, load average: 1.86, 1.03, 0.67 Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk I tripped over a hole that was sticking up out of the ground.
Re: cannot open bayes databases
CC'g the list as you sent the message only to me. On Mon, 30 May 2005 15:10:16 -0700, Chris <[EMAIL PROTECTED]> wrote: On Monday 30 May 2005 11:05 am, Bruno Delbono wrote: Chris wrote: > No joy Martin. Tried both --sync and --force-expire. Anyone else with > ideas? strace sa-learn --sync and see what exactly is it doing -Bruno Ok, here is what happens. If there is no lockfile present in the ~/.spamassassin folder strace sa-learn --sync seems to run ok. If I run sa-learn --spam [msg] it learns ok, but, leaves the lockfiles in the folder instead of removing them as I believe it is supposed to. Ah. It could be number of things - corrupt database, bad berkley db install, missing libdb_deadlock (usually libdb3/4_deadlock), permissions. I would suggest 1) Make sure that ~/.spamassassin is owned by you chris (both uid:gid) 2) If 1), then remove ~/.spamassassin (or mv it) and re-run sa-learn with the message and see if this problem is reproducable 3) Make sure that spamassassin is linked/compiled with the proper libdb (Berkley DB) DEBUG follows: debug: lock: 300 created /home/chris/.spamassassin/bayes.lock.cpollock.localdomain.300 debug: lock: 300 trying to get lock on /home/chris/.spamassassin/bayes with 0 retries Here is the ending output of the strace. When on the "select(0,NULL lines, it will continue until I stop it. Thats with a lockfile in the folder. I have no idea what I'm looking at so bear with me and if you need any more let me know. I tried to capture the whole strace to a file "strace sa-learn --sync > chrissync, however that created an empty file. link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {0, 652268}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=52, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {1, 160488}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=78, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {1, 39738}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=104, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {0, 848799}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=130, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {1, 345979}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=156, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {0, 570221}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", {st_mode=S_IFREG|0600, st_size=182, ...}) = 0 lstat64("/home/chris/.spamassassin/bayes.lock", {st_mode=S_IFREG|0600, st_size=25, ...}) = 0 select(0, NULL, NULL, NULL, {1, 307284}) = 0 (Timeout) write(5, "cpollock.localdomain.1163\n", 26) = 26 link("/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.1163", "/home/chris/.spamassassin/bayes.lock") = -1 EEXIST (File exists) lstat64("/home/chris/.spamassassin/bayes.lock.cpollock
Re: cannot open bayes databases
Chris wrote: No joy Martin. Tried both --sync and --force-expire. Anyone else with ideas? strace sa-learn --sync and see what exactly is it doing -Bruno
Re: cannot open bayes databases
On Monday 30 May 2005 05:02 am, martin smith wrote: > M>-Original Message- > M>From: Chris [mailto:[EMAIL PROTECTED] > M>Sent: 30 May 2005 04:00 > M>To: users@spamassassin.apache.org > M>Subject: cannot open bayes databases > M> > M>While running my sa-learn script I'm suddenly getting the below: > M> > M>debug: lock: 26313 > M>created > M>/home/chris/.spamassassin/bayes.lock.cpollock.localdomain.26313 > M>debug: lock: 26313 trying to get lock on > M>/home/chris/.spamassassin/bayes with 0 retries > M>debug: lock: 26313 trying to get lock on > M>/home/chris/.spamassassin/bayes with > M>1 retries > > Hi Chris I had the same and deleted the .lock file then ran sa-learn --sync > or you could use --force-expire, worth a go. If that don't work then post > back and someone else may have more ideas. > > Martin No joy Martin. Tried both --sync and --force-expire. Anyone else with ideas? -- Chris Registered Linux User 283774 http://counter.li.org 05:50:37 up 17:31, 2 users, load average: 0.47, 0.43, 0.39 Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk BOFH excuse #340: Well fix that in the next (upgrade, update, patch release, service pack).
Re: Cannot open bayes databases
It wasn't non-existent files because I know they existed. As I said, I got the same error with root. Apparently, when the update ran it screwed up something. I found some posts via google that pointed to a new Bayes db needed. What I did was, first turn off user_prefs. Something I kinda wanted to do anyway. Then I moved root's bayes files to /etc/mail/spamassassin/bayes and set the perms 775. That worked. I don't know which did or if it was the combination. -- <> -- <> -- Original Message --- From: Matt Kettler <[EMAIL PROTECTED]> To: "Joe Polk" <[EMAIL PROTECTED]>, users@spamassassin.apache.org Sent: Sat, 22 Jan 2005 23:18:55 -0500 Subject: Re: Cannot open bayes databases > At 03:08 PM 1/22/2005, Joe Polk wrote: > >Cannot open bayes databases /home/jav/.spamassassin/bayes_* R/O: tie failed: > >Inappropriate ioctl for device > > Hmm, without more info it's tough to answer why you got that > error... It could be a non-existant directory issue, or a non-file > matching the * (ie: a subdirectory named bayes_toks instead of a file) > > Could you run this command and post the results: > > ls -l /home/jav/.spamassassin/ --- End of Original Message ---
Re: Cannot open bayes databases
At 03:08 PM 1/22/2005, Joe Polk wrote: Cannot open bayes databases /home/jav/.spamassassin/bayes_* R/O: tie failed: Inappropriate ioctl for device Hmm, without more info it's tough to answer why you got that error... It could be a non-existant directory issue, or a non-file matching the * (ie: a subdirectory named bayes_toks instead of a file) Could you run this command and post the results: ls -l /home/jav/.spamassassin/
Re: Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
Matt Kettler wrote: At 12:55 AM 10/13/2004 -0700, Chris Weiss wrote: debug: config: SpamAssassin failed to parse line, skipping: rewrite_subject 1 debug: config: SpamAssassin failed to parse line, skipping: use_terse_report 0 debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1 debug: config: SpamAssassin failed to parse line, skipping: dcc_add_header 1 Fix the above errors. Those lines are invalid. the rewrite_subject bit has been replaced, see UPGRADE rewrite_subject 1 subject_tag SPAM(_SCORE_) becomes rewrite_header Subject SPAM(_SCORE_) auto_learn should be bayes_auto_learn. I don't think it's ever not had bayes in it's name Will do, I'm just trying to figure out how to implement them in my environment (IE - some of the directives are fed via AmavisD). They should not be the cause of my problem either way -ya? debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) inhibited further callbacks debug: bayes: 7110 tie-ing to DB file R/O /var/amavisd/.spamassassin/bayes_toks Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format debug: bayes: 7110 untie-ing DB file toks debug: Score set 0 chosen. debug: bayes: 7110 tie-ing to DB file R/O /var/amavisd/.spamassassin/bayes_toks Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format debug: bayes: 7110 untie-ing DB file toks ERROR: Bayes dump returned an error, please re-run with -D for more information Note that after running sa_learn --ham on all of my inboxes and sa-learn --spam on my junk folder, I end up with these files in my .spamassassin folder (during the install, I tried several gymnastics with sa-learn --import and --upgrade or something to that effect, hence the old_* files): Um.. what are sa-learn --import and sa-learn --upgrade? This is SA 3.0 man.. Those arguments no longer exist. Sorry, meant import and sync. Try running sa-learn -D --sync and see what happens. Thats the bayes DB upgrade command for SA 3.0. When you ran sa-learn --clear, did it actually work and remove the files or reduce them to 0 bytes? Yes. It removed the files entirely. Running SA after with no bayes files gave the same error - I suppose that would point to it not being an actual file compatibility issue, but something inside SA failing (missing library or something)? If the sync above doesn't work, and --clear doesn't truly wipe the files, use rm -f bayes_* and retrain.
Re: Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
At 12:55 AM 10/13/2004 -0700, Chris Weiss wrote: debug: config: SpamAssassin failed to parse line, skipping: rewrite_subject 1 debug: config: SpamAssassin failed to parse line, skipping: use_terse_report 0 debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1 debug: config: SpamAssassin failed to parse line, skipping: dcc_add_header 1 Fix the above errors. Those lines are invalid. the rewrite_subject bit has been replaced, see UPGRADE rewrite_subject 1 subject_tag SPAM(_SCORE_) becomes rewrite_header Subject SPAM(_SCORE_) auto_learn should be bayes_auto_learn. I don't think it's ever not had bayes in it's name debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) inhibited further callbacks debug: bayes: 7110 tie-ing to DB file R/O /var/amavisd/.spamassassin/bayes_toks Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format debug: bayes: 7110 untie-ing DB file toks debug: Score set 0 chosen. debug: bayes: 7110 tie-ing to DB file R/O /var/amavisd/.spamassassin/bayes_toks Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format debug: bayes: 7110 untie-ing DB file toks ERROR: Bayes dump returned an error, please re-run with -D for more information Note that after running sa_learn --ham on all of my inboxes and sa-learn --spam on my junk folder, I end up with these files in my .spamassassin folder (during the install, I tried several gymnastics with sa-learn --import and --upgrade or something to that effect, hence the old_* files): Um.. what are sa-learn --import and sa-learn --upgrade? This is SA 3.0 man.. Those arguments no longer exist. Try running sa-learn -D --sync and see what happens. Thats the bayes DB upgrade command for SA 3.0. When you ran sa-learn --clear, did it actually work and remove the files or reduce them to 0 bytes? If the sync above doesn't work, and --clear doesn't truly wipe the files, use rm -f bayes_* and retrain.
Re: Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
Matt Kettler wrote: At 12:25 AM 10/13/2004 -0700, Chris Weiss wrote: I've tried completely deleting and re-creating the bayes databases (using sa-learn clear followed by sa-learn on my various mailboxes), but am still getting the errors. I also made sure I'd installed DB_file (I'd read somewhere it was needed). Any idea where to look for the solution to this problem? Highly strange.. anything useful from running the following command: sa-learn -D --dump magic Here's the full spit - not much more info there (other than I'm still using some outdated config directives)... debug: SpamAssassin version 3.0.0 debug: Score set 0 chosen. debug: running in taint mode? yes debug: Running in taint mode, removing unsafe env vars, and resetting PATH debug: PATH included '/sbin', keeping. debug: PATH included '/usr/sbin', keeping. debug: PATH included '/bin', keeping. debug: PATH included '/usr/bin', keeping. debug: PATH included '/usr/local/bin', keeping. debug: Final PATH set to: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin debug: using "/etc/mail/spamassassin/init.pre" for site rules init.pre debug: config: read file /etc/mail/spamassassin/init.pre debug: using "/usr/local/share/spamassassin" for default rules dir debug: config: read file /usr/local/share/spamassassin/10_misc.cf debug: config: read file /usr/local/share/spamassassin/20_anti_ratware.cf debug: config: read file /usr/local/share/spamassassin/20_body_tests.cf debug: config: read file /usr/local/share/spamassassin/20_compensate.cf debug: config: read file /usr/local/share/spamassassin/20_dnsbl_tests.cf debug: config: read file /usr/local/share/spamassassin/20_drugs.cf debug: config: read file /usr/local/share/spamassassin/20_fake_helo_tests.cf debug: config: read file /usr/local/share/spamassassin/20_head_tests.cf debug: config: read file /usr/local/share/spamassassin/20_html_tests.cf debug: config: read file /usr/local/share/spamassassin/20_meta_tests.cf debug: config: read file /usr/local/share/spamassassin/20_phrases.cf debug: config: read file /usr/local/share/spamassassin/20_porn.cf debug: config: read file /usr/local/share/spamassassin/20_ratware.cf debug: config: read file /usr/local/share/spamassassin/20_uri_tests.cf debug: config: read file /usr/local/share/spamassassin/23_bayes.cf debug: config: read file /usr/local/share/spamassassin/25_body_tests_es.cf debug: config: read file /usr/local/share/spamassassin/25_hashcash.cf debug: config: read file /usr/local/share/spamassassin/25_spf.cf debug: config: read file /usr/local/share/spamassassin/25_uribl.cf debug: config: read file /usr/local/share/spamassassin/30_text_de.cf debug: config: read file /usr/local/share/spamassassin/30_text_fr.cf debug: config: read file /usr/local/share/spamassassin/30_text_nl.cf debug: config: read file /usr/local/share/spamassassin/30_text_pl.cf debug: config: read file /usr/local/share/spamassassin/50_scores.cf debug: config: read file /usr/local/share/spamassassin/60_whitelist.cf debug: using "/etc/mail/spamassassin" for site rules dir debug: config: read file /etc/mail/spamassassin/70_sare_adult.cf debug: config: read file /etc/mail/spamassassin/70_sare_random.cf debug: config: read file /etc/mail/spamassassin/70_sare_ratware.cf debug: config: read file /etc/mail/spamassassin/72_sare_bml_post25x.cf debug: config: read file /etc/mail/spamassassin/99_sare_fraud_post25x.cf debug: config: read file /etc/mail/spamassassin/antidrug.cf debug: config: read file /etc/mail/spamassassin/backhair.cf debug: config: read file /etc/mail/spamassassin/bogus-virus-warnings.cf debug: config: read file /etc/mail/spamassassin/chickenpox.cf debug: config: read file /etc/mail/spamassassin/evilnumbers.cf debug: config: read file /etc/mail/spamassassin/local.cf debug: config: read file /etc/mail/spamassassin/random.current.cf debug: config: read file /etc/mail/spamassassin/tripwire.cf debug: config: read file /etc/mail/spamassassin/uribl.cf debug: using "/root/.spamassassin/user_prefs" for user prefs file debug: config: read file /root/.spamassassin/user_prefs debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH(0x3cb65a2c) debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0x3cb3c92c) debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) implements 'parse_config' debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x3cb65a2c) implements 'parse_config' debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) inhibited further callbacks debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) inhibited further callbacks debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) inhibited further callbacks deb
Re: Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format
At 12:25 AM 10/13/2004 -0700, Chris Weiss wrote: I've tried completely deleting and re-creating the bayes databases (using sa-learn clear followed by sa-learn on my various mailboxes), but am still getting the errors. I also made sure I'd installed DB_file (I'd read somewhere it was needed). Any idea where to look for the solution to this problem? Highly strange.. anything useful from running the following command: sa-learn -D --dump magic I'm also getting the following error regarding URIBL, but I'm fairly sure I dont have it set up correctly... Failed to run URIBL_PH_SURBL SpamAssassin test, skipping: (Can't locate object method "check_uridnsbl" via package "Mail::SpamAssassin::PerMsgStatus" at /usr/local/libdata/perl5/site_perl/Mail/SpamAssassin/PerMsgStatus.pm line 2296, line 377. ) First, check to make sure that the following file exists: /usr/local/libdata/perl5/site_perl/Mail/SpamAssassin/Plugin/URIDNSBL.pm If it doesn't, your install is borked. Next make sure one of your .cf files has the loadplugin statement for that module loadplugin Mail::SpamAssassin::Plugin::URIDNSBL