HylaFAX The world's most advanced open source fax server

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

[hylafax-users] capi4hylafax: another "send incomplete" issue w/ error code 127



Hi everybody outside,

although I've just started using hylafax recently, I am trying to get capi4hylafax running. As it turned out, it's quite tricky. Right now, I am stuck at the point to get the hylafax send out the (converted) fax to c2sendfax. Please note: CAPI is running (I can create a ppp connection to my ISP) and sending faxes manually via

/usr/local/bin/c2sendfax -m faxCAPI sendq/q<whatever>

works. However, if I try to do so via hylafax which triggeres the same command, the fax does not get sent. Instead, the following log file is created (cropped a bit):

ctive dest +49xxxxxxxx pri 127 tts 0:00 killtime 2:59:00): CMD START /usr/local/bin/c2faxsend -m faxCAPI sendq/q12 (PID 11532)
ctive dest +49xxxxxxxx pri 127 tts 0:00 killtime 2:59:00): CMD DONE: exit status 0
eady dest +49xxxxxxxx pri 126 tts 0:00 killtime 2:59:00): SEND INCOMPLETE: retry immediately;
ctive dest +49xxxxxxxx pri 126 tts 0:00 killtime 2:59:00): CMD START /usr/local/bin/c2faxsend -m faxCAPI sendq/q12 (PID 11533)
ctive dest +49xxxxxxxx pri 126 tts 0:00 killtime 2:59:00): CMD DONE: exit status 0
eady dest +49xxxxxxxx pri 125 tts 0:00 killtime 2:59:00): SEND INCOMPLETE: retry immediately;
ctive dest +49xxxxxxxx pri 125 tts 0:00 killtime 2:59:00): CMD START /usr/local/bin/c2faxsend -m faxCAPI sendq/q12 (PID 11534)
ctive dest +49xxxxxxxx pri 125 tts 0:00 killtime 2:59:00): CMD DONE: exit status 0
eady dest +49xxxxxxxx pri 124 tts 0:00 killtime 2:59:00): SEND INCOMPLETE: retry immediately;
[and so on until]
(active dest +49xxxxxxxx pri 112 tts 0:00 killtime 2:58:59): CMD DONE: exit status 0
(sleeping dest +49xxxxxxxx pri 112 tts 0:00 killtime 2:58:59): SEND INCOMPLETE: requeue for 7:13;


Totally confused by this mess, I created a small wrapper script, which I put in turn for c2faxsend to see what's going wrong. Here's the script, I wrote:

--- cut ---
#!/bin/bash

logfile=/var/log/faxsend.switch

echo "triggered with command line parameters: $@" >>$logfile
echo local directory is `pwd` >>$logfile
echo I am `whoami` >>$logfile

ls -al /usr/local/bin/c2faxsend 2>&1 >>$logfile

ps auxwf >>$logfile

/usr/local/bin/c2faxsend -L -h
echo First answer $? >>$logfile
/usr/local/bin/c2faxsend -L -v $@ 2>&1 >>$logfile
echo Second answer $? >>$logfile
c2faxsend -L -v $* 2>&1 >>$logfile
echo Third answer $? >>$logfile

echo "back again" >>$logfile
--- cut ---

In any case: no big deal. Here's what I get in the logfile of this small script (if put in the etc/config file instead of c2faxsend):


triggered with command line parameters: -m ttyS0 sendq/q36
local directory is /var/spool/hylafax
I am root
-rwxrwxrwx 1 root root 243110 Nov 6 18:03 /usr/local/bin/c2faxsend
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
[other stuff]
uucp 14599 0.0 0.3 6116 1960 ? S 20:36 0:00 /usr/local/sbin/faxq
root 16857 0.0 0.2 4384 1064 ? S 21:32 0:00 \_ /bin/bash bin/faxsend.switch -m ttyS0 sendq/q36
root 16861 0.0 0.3 3588 1608 ? R 21:32 0:00 \_ ps auxwf
uucp 14603 0.0 0.3 3804 1572 ? S 20:36 0:00 /usr/local/sbin/hfaxd -i hylafax
First answer 127
Second answer 127
Third answer 127
back again


At the bottom, this means: c2faxsend can't be called in this environment. Therefore, the bash triggeres an error code of 127. Additionally, I've already checked the following:

   * Hylafax does send via normal analogue modem (if setup is being
     done in such way, that Hylafax does not know anything about
     capi4hylafax).
   * I am really root in the script: I made a "mkdir /test" which then
     created the directory as root.root
   * Pathing is no problem, also I am not chroot()ed: I copied
     c2faxsend to /var/spool/hylafax/bin and adjusted my wrapper script
     accordingly, but that did not made any difference.
   * ls -al /dev/capi20 says:
     crw-rw-rw-    1 uucp     uucp      68,   0 Nov  6 16:00 /dev/capi20

I also tried to check, if this would be a dynamic library issue. I issued "ldd /usr/local/bin/c2faxsend" which says:

   libpthread.so.0 => /usr/local/lib/libpthread.so.0 (0x40017000)
   libtiff.so.3 => /usr/local/lib/libtiff.so.3 (0x40069000)
   libcapi20.so.3 => /usr/lib/libcapi20.so.3 (0x400a9000)
   libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 (0x400b6000)
   libm.so.6 => /usr/local/lib/libm.so.6 (0x4016c000)
   libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x40190000)
   libc.so.6 => /usr/local/lib/libc.so.6 (0x40198000)
   /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

For me, this looks fine. To be sure, I had already inserted an

export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/lib

in the wrapper script, but that didn't succeeded either.

Well, I am quite frustrated about this right now, because I can't find any reason why this happens. To me, it seems that bash can't load c2sendfax - but the reason is unknown to me. As it is a bash error message, I can't dump the error stream to a logfile. The error stream of the bash is directed to Hylafax which does not evaluate this data.

Does anyone have an idea, how to deal with that issue? Does someone experience the same problem?

Thanks for your help!


73 Nico


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions