HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
[hylafax-users] Audit hook not getting all Job events
Hi everyone,
We have found what we think might be a bug but are not sure if the fax scheduler is behaving like this by design. First some background:
We are running Hylafax version 6.0.3-1 on Red Hat EL5 with a 30 Channel Dialogic PRI modem and the system works exceptionally well most of the time, delivering over 12000 pages of fax a day. Some time ago we had a problem with handling landscape pages and as a solution we created an auto-rotating script that uses ImageMagik's identify and convert tools to find and rotate landscape pages in Tiff files. Additionally we have created an Audit Hook that is registered to receive notification on all Job, Send and Receive events. These events are evaluated and logged into a database where our processing application is notified of the fax job's status.
Our auto-rotate script is symlinked to etc/FaxModify and is called for each fax job that's submitted to the server. The script checks for Tiff files, determines if there are any landscape pages and then rotates them using ImageMagik's convert tool. This all works really well most of the time but every so often we get a massive file submitted which causes this auto-rotation to time out. When this happens the server load increases dramatically and the job fails; all this is perfectly fine because the user gets notified of the failure with bin/notify being called like this: "bin/notify "doneq/q129182" "format_failed" "" ".
The problem that we have found is that our audit hook is not getting all the JOB events and because of this we are recording the job as completed successfully instead of failed. And this causes all kinds of problems in our processing system.
Here is the listing of events (from /var/log/messages) for a failed job where this happened:
Jul 13 09:39:49 hylafax01 FaxQueuer[9000]: SUBMIT JOB 129182
Jul 13 09:39:49
hylafax01 FaxQueuer[9000]: HOOK CMD /usr/local/bin/ooba_aud_hook.sh JOB 0x0001
"129182"
Jul 13 09:39:49 hylafax01 FaxQueuer[9000]: HOOK CMD
/usr/local/bin/ooba_aud_hook.sh JOB 0x0004 "129182"
Jul 13 09:39:50 hylafax01
FaxQueuer[9000]: HOOK CMD /usr/local/bin/ooba_aud_hook.sh JOB 0x0020
"129182"
Jul 13 09:39:50 hylafax01 FaxQueuer[9000]: HOOK CMD
/usr/local/bin/ooba_aud_hook.sh JOB 0x0080 "129182"
Jul 13 09:39:50 hylafax01
FaxQueuer[9000]: HOOK CMD /usr/local/bin/ooba_aud_hook.sh JOB 0x4000
"129182"
Jul 13 09:44:36 hylafax01 FaxQueuer[9835]: JOB 129182: CONVERT
DOCUMENT: job time limit exceeded
Jul 13 09:44:58 hylafax01 FaxQueuer[9000]:
HOOK CMD /usr/local/bin/ooba_aud_hook.sh JOB 0x8000 "129182"
Jul 13 09:44:58
hylafax01 FaxQueuer[9000]: NOTIFY: bin/notify "doneq/q129182" "format_failed"
""
Jul 13 09:44:58 hylafax01 FaxQueuer[9000]: HOOK CMD
/usr/local/bin/ooba_aud_hook.sh JOB 0x0010 "129182"
Jul 13 09:44:58 hylafax01
FaxQueuer[9000]: HOOK CMD /usr/local/bin/ooba_aud_hook.sh JOB 0x0040 "129182"
So my question here is: is there a bug somewhere that is causing this "JOB 129182: CONVERT DOCUMENT: job time limit exceeded" not be passed to the Audit Hook or is this right?
If this is working properly then how can the Audit Hook script that we have get notified that the job preparation phase has actually failed with the failure reason being "CONVERT DOCUMENT: job time limit exceeded"
Thanks in advance.