AJAX-Failure: Internal Server Error

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

AJAX-Failure: Internal Server Error

barney
Hi,

I get this error when I check a mail for Bayesian Learn.

Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
I have made changes in updatesarules.py like https://github.com/akissa/baruwa2/blob/master/baruwa/commands/updatesarules.py

but yet I get:

learn : ERROR: the Bayes learn function returned an error, please re-run with -D for more information at /usr/bin/sa-learn line 493.
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

jeremymcs
Check Baruwa logs. In /var/log/baruwa ... More than likely a task id error. 

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955

On Aug 27, 2013, at 6:29 AM, "barney" <[hidden email]> wrote:

I have made changes in updatesarules.py like
https://github.com/akissa/baruwa2/blob/master/baruwa/commands/updatesarules.py

but yet I get:

learn : ERROR: the Bayes learn function returned an error, please re-run
with -D for more information at /usr/bin/sa-learn line 493.



--
View this message in context: http://baruwa-users-list.963389.n3.nabble.com/AJAX-Failure-Internal-Server-Error-tp4026958p4026960.html
Sent from the Baruwa users list mailing list archive at Nabble.com.

_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
here are the logs

2013-08-27 13:35:25,760 Baruwa[1623]: Got task from broker: process-quarantined-msg[ffab7431-6c6b-429b-bc34-3495f9f527a9]
2013-08-27 13:35:25,766 Baruwa[1623]: Processing quarantined message: 1VEHJ4-0001a8-Bn
2013-08-27 13:35:26,929 Baruwa[1623]: Message: 1VEHJ4-0001a8-Bn learning failed with error: ERROR: the Bayes learn function returned an error, please re-run with -D for more information at /usr/bin/sa-learn line 493.
2013-08-27 13:35:26,931 Baruwa[1623]: Task process-quarantined-msg[ffab7431-6c6b-429b-bc34-3495f9f527a9] succeeded in 1.16564297676s: {'errors': [('learn', 'ERROR: the Bayes learn...
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

jeremymcs
Message: 1VEHJ4-0001a8-Bn learning
failed with error: ERROR: the Bayes learn function returned an error, please
re-run with -D for more information at /usr/bin/sa-learn

what does that output ? 
--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955

On Aug 27, 2013, at 6:39 AM, "barney" <[hidden email]> wrote:

Message: 1VEHJ4-0001a8-Bn learning
failed with error: ERROR: the Bayes learn function returned an error, please
re-run with -D for more information at /usr/bin/sa-learn

_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
 spamassassin -D and check message to learn and commit show nothing in debug mode
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
with sa-learn --dump I get "Bayes dump returned an error, please re-run with -D for more information
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

jeremymcs
Pastebin a full output of -D

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955

On Aug 27, 2013, at 7:22 AM, "barney" <[hidden email]> wrote:

with sa-learn --dump I get "Bayes dump returned an error, please re-run with
-D for more information



--
View this message in context: http://baruwa-users-list.963389.n3.nabble.com/AJAX-Failure-Internal-Server-Error-tp4026958p4026965.html
Sent from the Baruwa users list mailing list archive at Nabble.com.

_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

jeremymcs
Aug 27 14:39:42.828 [9155] info: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mailscanner.cf": auto_whitelist_distinguish_signed 1
Aug 27 14:39:42.828 [9155] info: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mailscanner.cf": auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
Aug 27 14:39:42.828 [9155] info: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mailscanner.cf": user_awl_dsn DBI:Pg:dbname=baruwa;host=127.0.0.1;port=6432
Aug 27 14:39:42.828 [9155] info: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mailscanner.cf": user_awl_sql_username bayes
Aug 27 14:39:42.828 [9155] info: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mailscanner.cf": user_awl_sql_password CHANGE
Aug 27 14:39:42.829 [9155] info: config: failed to parse line, skipping, in "/etc/mail/spamassassin/mailscanner.cf": user_awl_sql_table awl

Looks like you did not AWL .. Check your .pre files in /etc/mailscanner .. Cannot remember odd the top of my head. 

g 27 14:39:43.326 [9155] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x3c74de8) implements 'learner_is_scan_available', priority 0
Aug 27 14:39:43.327 [9155] dbg: bayes: unable to connect to database: konnte nicht mit dem Server verbinden: Verbindungsaufbau abgelehnt
Aug 27 14:39:43.327 [9155] dbg: bayes: [...] Läuft der Server auf dem Host »127.0.0.1« und akzeptiert er
Aug 27 14:39:43.327 [9155] dbg: bayes: [...] TCP/IP-Verbindungen auf Port 6432?

Also having issues with that. 
--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : <a href="tel:850-250-5590;101" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="2">850-250-5590x101 | Cell : <a href="tel:850-890-2543" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">850-890-2543 | Fax : <a href="tel:850-254-2955" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">850-254-2955

On Aug 27, 2013, at 7:54 AM, "barney" <[hidden email]> wrote:

http://pastebin.com/0yce6uhq



--
View this message in context: http://baruwa-users-list.963389.n3.nabble.com/AJAX-Failure-Internal-Server-Error-tp4026958p4026967.html
Sent from the Baruwa users list mailing list archive at Nabble.com.

_______________________________________________
http://pledgie.com/campaigns/12056


_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
after copy content from /etc/MailScanner/spam.assassin.prefs.conf to /etc/mail/spamassassin/mailscanner.cf
with the right username and password still the same.

but is ist right that both files are the same?

spam.assassin.prefs.conf
mailscanner.cf

thanks
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

jeremymcs
Spamasssin.prefs.conf should be symlinked to /etc/spamasassin/mailscanner.cf

May be correct in the files, but you need to make sure that's the correct user/pass with postgres

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : 850-250-5590x101 | Cell : 850-890-2543 | Fax : 850-254-2955

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of barney
Sent: Tuesday, August 27, 2013 8:44 AM
To: [hidden email]
Subject: Re: [Baruwa] AJAX-Failure: Internal Server Error

after copy content from /etc/MailScanner/spam.assassin.prefs.conf to /etc/mail/spamassassin/mailscanner.cf
with the right username and password still the same.

but is ist right that both files are the same?

spam.assassin.prefs.conf
mailscanner.cf

thanks



--
View this message in context: http://baruwa-users-list.963389.n3.nabble.com/AJAX-Failure-Internal-Server-Error-tp4026958p4026969.html
Sent from the Baruwa users list mailing list archive at Nabble.com.

_______________________________________________
http://pledgie.com/campaigns/12056



_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
the should be ok. But I get the same error.

Could it be that the awl plugin is not loaded? I can't find the right entry in your script.

I have read following:

http://wiki.apache.org/spamassassin/AutoWhitelist

In 3.3, the plugin is not loaded by default.

thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

barney
spamassassing is now working without any failures.

Changend in "/etc/mail/spamassassin/v310.pre"
uncomment loadplugin Mail::SpamAssassin::Plugin::AWL

and in "/mail/spamassassin/mailscanner.cf" +  "/etc/MailScanner/spam.assassin.prefs.conf"
DB-Port from 6432 to 5432

Jeremy please can you tell me what I have done wrong with the script?

BUT the Bayes learn didn't work it ends with the same error. But I can't see any errors in debug mode of spamassassin.
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

jeremymcs
What error are you seeing in baruwa's log when you try to learn an email?

Are you referring to my installer ?

--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net | Endless Solutions
Office : 850-250-5590x101 | Cell : 850-890-2543 | Fax : 850-254-2955

On Aug 27, 2013, at 11:06 AM, barney <[hidden email]>
 wrote:

spamassassing is now working without any failures.

Changend in "/etc/mail/spamassassin/v310.pre"
uncomment loadplugin Mail::SpamAssassin::Plugin::AWL

and in "/mail/spamassassin/mailscanner.cf" +
"/etc/MailScanner/spam.assassin.prefs.conf"
DB-Port from 6432 to 5432

Jeremy please can you tell me what I have done wrong with the script?

BUT the Bayes learn didn't work it ends with the same error. But I can't see
any errors in debug mode of spamassassin.



--
View this message in context: http://baruwa-users-list.963389.n3.nabble.com/AJAX-Failure-Internal-Server-Error-tp4026958p4026973.html
Sent from the Baruwa users list mailing list archive at Nabble.com.

_______________________________________________
http://pledgie.com/campaigns/12056




_______________________________________________
http://pledgie.com/campaigns/12056
Reply | Threaded
Open this post in threaded view
|

Re: AJAX-Failure: Internal Server Error

tahnan
Helo, message are getting quarantine but also getting delivered to destination server. When trying to submit or process from quarantine, getting above error. Below is the baruwa log

Traceback (most recent call last):
  File "/home/baruwa/px/lib/python2.6/site-packages/celery/task/trace.py", line 233, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/baruwa/px/lib/python2.6/site-packages/celery/task/trace.py", line 420, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/baruwa/px/lib/python2.6/site-packages/baruwa/tasks/messages.py", line 140, in process_quarantined_msg
    return process_message(job, logger)
  File "/home/baruwa/px/lib/python2.6/site-packages/baruwa/tasks/messages.py", line 107, in process_message
    task=task.id, error=str(exception)))
AttributeError: 'function' object has no attribute 'id'