HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Error message '-e' ?



Darren Nickerson typed (on Tue, Jan 10, 2006 at 04:33:02PM -0500):
| "Jean-Pierre Radley" <jpr@xxxxxxx> wrote:
| 
| 
| >hylafax-4.2.5rc1
| >
| >
| >In this failure message, what is the meaning of the '-e' ?
| >
| >Your facsimile job to 12128770440 failed because:
| >    -e No carrier detected
| 
| Fascinating!
| 
| Please grep your syslog for the exact notify command that got executed, 
| then su to uucp, cd to /var/spool/hylafax and run the command manually. If 
| it does not error, and sends an email with the same flaw, please re-run the 
| notify command using 'sh -x ./bin/notify etc..', capture the stdout to a 
| file, and send that along as an attachment to the list.

Ah, I see in the notify script that there's a command "echo -e ...".
../bin/notify runs using /bin/sh, and nether the built-in echo in
/bin/sh nor /bin/echo on this machine know about any -e flag.  I think
GNU's echo does have such a flag but you can't assume that's what I'm
running.

I'm appending the typescript of running that notify command with sh -x.
Nothing obvious to me about where the printf error occurs.

BTW: why does the configure script detect the presense of bash or ksh,
then decide to use it for those scripts which go into /usr/local/sbin,
but not those in /usr/local/spool/hylafax/bin?

-- 
JP
	==> http://www.frappr.com/cusm <==
Script started on Tue Jan 10 17:26:36 2006
$ sh -x ./bin/notify "doneq/q1119" "failed" "1:15"
+ [ 3 != 3 -a 3 != 4 ] 
+ test -f etc/setup.cache 
QFILE=doneq/q1119
WHY=failed
JTIME=1:15
NEXT=??:??
ENCODING=base64
MIMENCODE=mimencode
TIFF2PDF=bin/tiff2pdf
TTYCMD=tty
+ . etc/setup.cache 
AWK=/usr/local/bin/mawk
BIN=/usr/local/bin
CAT=/bin/cat
CHGRP=/bin/chgrp
CHMOD=/bin/chmod
CHOWN=/bin/chown
CP=/bin/cp
DPSRIP=/usr/local/sbin/ps2fax.exe
ECHO=/bin/echo
ENCODING=base64
FAXQ_SERVER=yes
FONTPATH=/usr/local/share/ghostscript/8.51/lib:/usr/local/share/ghostscript/8.51/Resource:/usr/local/share/ghostscript/fonts
FUSER=/etc/fuser
GREP=/bin/grep
GSRIP=/usr/local/bin/gs
HFAXD_OLD_PROTOCOL=no
HFAXD_SERVER=yes
HFAXD_SNPP_SERVER=no
IMPRIP=/usr/lib/print/psrip
LIBDATA=/usr/local/lib/hylafax
LIBEXEC=/usr/local/sbin
LN=/bin/ln
MANDIR=/usr/local/man
MIMENCODE=/usr/local/bin/mimencode
MKFIFO=/bin/mkfifo
MV=/bin/mv
PATHEGETTY=/bin/egetty
PATHGETTY=/etc/getty
PATHVGETTY=/bin/vgetty
PATH=/usr/sbin:/bin:/usr/bin:/etc:/usr/local/bin
PSPACKAGE=gs
RM=/bin/rm
SBIN=/usr/local/sbin
SCRIPT_SH=/bin/ksh
SED=/bin/sed
SENDMAIL=/usr/lib/sendmail
SPOOL=/usr/local/spool/hylafax
SYSVINIT=
TARGET=i686-pc-sco3.2v5.0.6
TIFFBIN=/usr/bin
TIFF2PDF=/usr/local/bin/tiff2pdf
TTYCMD=/bin/tty
UUCP_LOCKDIR=/var/spool/uucp
UUCP_LOCKTYPE=+ascii
UUENCODE=/usr/bin/uuencode
FILE=file
INFO=/usr/local/sbin/faxinfo
TIFFINFO=tiffinfo
FAX2PS=/usr/bin/fax2ps
TIFF2PS=tiff2ps
PS2PDF=ps2pdf
PDF2PS=pdf2ps
PS2FAX=bin/ps2fax
PDF2FAX=bin/pdf2fax
TOADDR=FaxMaster
FROMADDR=fax
NOTIFY_FAXMASTER=never
RETURNFILETYPE=
MIMEBOUNDARY=NextPart23432
RETURNTECHINFO=yes
RETURNTRANSCRIPT=yes
+ /bin/tty 
+ /bin/tty 
ERRORSTO=/dev/ttyp13
+ parseQfile 
+ /usr/local/bin/mawk -F:  
    function p(varname,val)
    {
        gsub(/\047/, "\047\\\047\047", val);
        gsub(/\n/, "\047\042\\n\042\047", val);
        printf "%s=\047%s\047\n",varname,val
    }
    BEGIN {
        nfiles = 0;
        npins = 0;
        pagewidth = 0;
        pagelength = 0;
        resolution = 0;
        jobtype = "facsimile";
        signalrate = "unknown";
        dataformat = "unknown";
        doneop = "default";
        pagernum = "unknown";
        commid = "";
	csi = "";
	equipment = "";
	station = "";
    }
    /^csi/	{ p("csi",$2); }
    /^nsf/	{ p("equipment",$3); }
    /^nsf/	{ p("station",$5); }
    /^jobid/    { p("jobid",$2); }
    /^groupid/    { p("groupid", $2); }
    /^state/    { p("state", $2+0); }  
    /^doneop/    { p("doneop", $2); }
    /^number/    { p("number", $2); }
    /^external/    { p("number", $2); }        # override unprocessed number
    /^sender/    { p("sender", $2); }
    /^mailaddr/    { p("mailaddr", $2); }
    /^owner/    { p("owner", $2); }
    /^jobtag/    { jobtag = $0; sub("jobtag:", "", jobtag); p("jobtag", jobtag)}
    /^jobtype/    { p("jobtype", $2); }
    # status needs to be used in the shell as faxstatus since status is reserved word
    /^status/    { status = $0; sub("status:", "", status);
              while ($0 ~ /\\$/ && getline > 0) {
                  sub(/\\$/, "\n", status);
                  status = status $0;
              } p("faxstatus", status);
            }
    /^resolution/    { p("resolution", $2); }
    /^npages/    { p("npages", $2); }
    /^totpages/    { p("totpages", $2); }
    /^dirnum/    { p("dirnum", $2); }
    /^commid/    { p("commid", $2); }
    /^ntries/    { p("ntries", $2); }
    /^ndials/    { p("ndials", $2); }
    /^pagewidth/    { p("pagewidth", $2); }
    /^pagelength/    { p("pagelength", $2); }
    /^signalrate/    { p("signalrate", $2); }
    /^dataformat/    { p("dataformat", $2); }
    /^modem/    { p("modem", $2); }
    /^totdials/    { p("totdials", $2); }
    /^tottries/    { p("tottries", $2); }
    /^client/    { p("client", $2); }
    /^[!]*post/    { p("files_"++nfiles, $4); }
    /^[!]*tiff/    { p("files_"++nfiles, $4); }
    /^[!]*pdf/    { p("files_"++nfiles, $4); }
    /^[!]*pcl/    { p("files_"++nfiles, $4); }
    /^page:/    { p("pins_"++npins, $4); }
    /^data:/    { p("files_"++nfiles, $4); }
    /^poll/        { p("poll", " -p"); }
    END { p("nfiles", nfiles); p("npins", npins) }  doneq/q1119 
+ eval state='8' npages='0' totpages='3' ntries='0' ndials='2' totdials='2' tottries='0' pagewidth='215' resolution='98' pagelength='279' number='1212877' number='1212877' mailaddr='root@jpradley' sender='JPR-root' jobid='1119' jobtag='' modem='any' client='localhost' owner='root' groupid='1119' signalrate='14400 bit/s' dataformat='2-D MMR' jobtype='facsimile' doneop='default' commid='000002668' csi='' equipment='' station='' faxstatus='No carrier detected' files_1='docq/cover1119' files_2='docq/doc1417.ps' nfiles='2' npins='0' 
npins=0 nfiles=2 files_2=docq/doc1417.ps files_1=docq/cover1119 faxstatus=No carrier detected station= equipment= csi= commid=000002668 doneop=default jobtype=facsimile dataformat=2-D MMR signalrate=14400 bit/s groupid=1119 owner=root client=localhost modem=any jobtag= jobid=1119 sender=JPR-root mailaddr=root@jpradley number=1212877 number=1212877 pagelength=279 resolution=98 pagewidth=215 tottries=0 totdials=2 ndials=2 ntries=0 totpages=3 npages=0 state=8
+ setCustomValues 
+ [ -f etc/FaxNotify ] 
+ . etc/FaxNotify 
RETURNTRANSCRIPT=no
RETURNTECHINFO=no
RETURNFILETYPE=original
+ adjustNotifyFaxMaster 
NOTIFY_FAXMASTER=no
+ /usr/lib/sendmail -ffax -oi -t 
+ [ -z  ] 
jobtag=facsimile job 1119
+ [ default = default ] 
doneop=remove
+ [ facsimile = pager ] 
+ [ failed = done ] 
+ [ failed = failed ] 
+ putHeaders facsimile job 1119 to 1212877 failed 
+ putMimeSetup 
+ echo MIME-Version: 1.0 
+ echo Content-Type: Multipart/Mixed; Boundary="NextPart23432" 
+ echo Content-Transfer-Encoding: 7bit 
+ echo To: root@jpradley 
+ echo Subject: facsimile job 1119 to 1212877 failed 
+ putMimeTextHeader 
+ echo  
+ echo This is a multi-part message in MIME format. 
+ echo  
+ echo --NextPart23432 
+ echo Content-Type: text/plain; charset=us-ascii 
+ echo Content-Transfer-Encoding: 7bit 
+ echo  
+ printf Your facsimile job to 1212877 
+ printf  failed because:\n     
+ printStatus No carrier detected 
+ [ -z No carrier detected ] 
+ echo -e No carrier detected 
+ returnTranscript 
+ [ no = yes ] 
+ returnToSender 
+ printBanner Unsent job status 
+ echo  
+ echo     ---- Unsent job status ---- 
+ echo  
+ printItem %s Destination 1212877 
FMT=%s
TAG=Destination
VALUE=1212877
+ printf %16s: %s\n Destination 1212877 
+ printItem %s JobID 1119 
FMT=%s
TAG=JobID
VALUE=1119
+ printf %16s: %s\n JobID 1119 
+ printItem %s GroupID 1119 
FMT=%s
TAG=GroupID
VALUE=1119
+ printf %16s: %s\n GroupID 1119 
+ printItem %s Sender JPR-root 
FMT=%s
TAG=Sender
VALUE=JPR-root
+ printf %16s: %s\n Sender JPR-root 
+ printItem %s Mailaddr root@jpradley 
FMT=%s
TAG=Mailaddr
VALUE=root@jpradley
+ printf %16s: %s\n Mailaddr root@jpradley 
+ [ -n 000002668 ] 
+ printItem %s CommID 000002668 
FMT=%s
TAG=CommID
VALUE=000002668
+ printf %16s: %s\n CommID 000002668 
+ [ any != any -a no = yes ] 
+ printItem %s Submitted From localhost 
FMT=%s
TAG=Submitted From
VALUE=localhost
+ printf %16s: %s\n Submitted From localhost 
+ [ facsimile = facsimile -a no = yes ] 
+ [ -z No carrier detected ] 
+ printItem %b Status No carrier detected 
FMT=%b
TAG=Status
VALUE=No carrier detected
+ printf %16s: %b\n Status No carrier detected 
+ printItem %u (exchanges with remote device) Dialogs 0 
FMT=%u (exchanges with remote device)
TAG=Dialogs
VALUE=0
+ printf %16s: %u (exchanges with remote device)\n Dialogs 0 
+ printItem %u (consecutive failed calls to destination) Dials 2 
FMT=%u (consecutive failed calls to destination)
TAG=Dials
VALUE=2
+ printf %16s: %u (consecutive failed calls to destination)\n Dials 2 
+ printItem %u (total phone calls placed) Calls 2 
FMT=%u (total phone calls placed)
TAG=Calls
VALUE=2
+ printf %16s: %u (total phone calls placed)\n Calls 2 
+ [ facsimile = facsimile ] 
+ printItem %u (pages transmitted) Pages 0 
FMT=%u (pages transmitted)
TAG=Pages
VALUE=0
+ printf %16s: %u (pages transmitted)\n Pages 0 
+ printItem %u (total pages to transmit) TotPages 3 
FMT=%u (total pages to transmit)
TAG=TotPages
VALUE=3
+ printf %16s: %u (total pages to transmit)\n TotPages 3 
+ printItem %u (attempts to send current page) Attempts 0 
FMT=%u (attempts to send current page)
TAG=Attempts
VALUE=0
+ printf %16s: %u (attempts to send current page)\n Attempts 0 
+ printItem %u (directory of next page to send) Dirnum  
FMT=%u (directory of next page to send)
TAG=Dirnum
VALUE=
+ printf %16s: %u (directory of next page to send)\n Dirnum  
printf: : Invalid argument (error 22)
+ [ 2 -gt 0 -a no = yes ] 
+ [ -n original ] 
+ returnFaxImage original 
RETURNFORMAT=original
+ [ 2 -gt 0 ] 
+ local_seq 1 2 
+ [ 1 -gt 2 ] 
COUNT=1
+ [ 1 -le 2 ] 
+ echo 1 
+ expr 1 + 1 
COUNT=2
+ [ 2 -le 2 ] 
+ echo 2 
+ expr 2 + 1 
COUNT=3
+ [ 3 -le 2 ] 
name=files_1
+ echo $files_1 
+ eval filename=$files_1 
filename=docq/cover1119
+ [ -s docq/cover1119 ] 
+ fileType docq/cover1119 
FILENAME=docq/cover1119
+ [ -f docq/cover1119 ] 
+ file docq/cover1119 
FILETYPE=docq/cover1119:	PostScript document
+ match docq/cover1119:	PostScript document postscript 
FULLSTR=docq/cover1119:	PostScript document
SUBSTR=postscript
+ /bin/grep -i postscript 
+ echo docq/cover1119:	PostScript document 
+ [ 0 -eq 0 ] 
+ return 0 
+ echo ps 
FROMFMT=ps
+ [ original = tif ] 
+ [ original = pdf ] 
+ [ original = ps ] 
+ [ original = original ] 
ENCODEDFILENAME=1212877-1.ps
+ putMimeAppPSHeader 1212877-1.ps 
+ echo  
+ echo --NextPart23432 
+ echo Content-Type: application/postscript; name="1212877-1.ps" 
+ echo Content-Description: FAX document 
+ echo Content-Transfer-Encoding: base64 
+ echo Content-Disposition: attachment; filename="1212877-1.ps" 
+ echo  
+ putPsEncodedImage docq/cover1119 ps 
SOURCEFILE=docq/cover1119
CONVERTFROM=ps
OUTFILE=tmp/conv2ps23432.out
+ [ ps = ps ] 
+ mimeEncode docq/cover1119 
FILENAME=docq/cover1119
+ [ ! -f docq/cover1119 ] 
+ [ -x /usr/local/bin/mimencode ] 
+ /usr/local/bin/mimencode 
+ return 
name=files_2
+ echo $files_2 
+ eval filename=$files_2 
filename=docq/doc1417.ps
+ [ -s docq/doc1417.ps ] 
+ fileType docq/doc1417.ps 
FILENAME=docq/doc1417.ps
+ [ -f docq/doc1417.ps ] 
+ file docq/doc1417.ps 
FILETYPE=docq/doc1417.ps:	PostScript document
+ match docq/doc1417.ps:	PostScript document postscript 
FULLSTR=docq/doc1417.ps:	PostScript document
SUBSTR=postscript
+ /bin/grep -i postscript 
+ echo docq/doc1417.ps:	PostScript document 
+ [ 0 -eq 0 ] 
+ return 0 
+ echo ps 
FROMFMT=ps
+ [ original = tif ] 
+ [ original = pdf ] 
+ [ original = ps ] 
+ [ original = original ] 
ENCODEDFILENAME=1212877-2.ps
+ putMimeAppPSHeader 1212877-2.ps 
+ echo  
+ echo --NextPart23432 
+ echo Content-Type: application/postscript; name="1212877-2.ps" 
+ echo Content-Description: FAX document 
+ echo Content-Transfer-Encoding: base64 
+ echo Content-Disposition: attachment; filename="1212877-2.ps" 
+ echo  
+ putPsEncodedImage docq/doc1417.ps ps 
SOURCEFILE=docq/doc1417.ps
CONVERTFROM=ps
OUTFILE=tmp/conv2ps23432.out
+ [ ps = ps ] 
+ mimeEncode docq/doc1417.ps 
FILENAME=docq/doc1417.ps
+ [ ! -f docq/doc1417.ps ] 
+ [ -x /usr/local/bin/mimencode ] 
+ /usr/local/bin/mimencode 
+ return 
+ echo  
+ echo --NextPart23432-- 
+ [ no = yes ] 
$ exit

script done on Tue Jan 10 17:27:07 2006



Project hosted by iFAX Solutions