[sane-devel] saned only works in -d mode

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 28 Mar 2002 18:31:49 +0100


Hi,

On Thu, Mar 28, 2002 at 04:09:04PM +0000, Martyn Ranyard wrote:
>   I have found a wierd problem in saned - when the saned is run with saned 
> -d, I can connect and scan (from windows clients - sanetwain - great 
> client!) images from the server's devices (epson USB and also pnm device!) 
> trouble is - when run this way, it exits immediately.  I can attempt to run 
> it from inetd, but just as someone reported back in May of last year, I 
> cannot connect at all.

If you can't connect (no message in syslog) then maybe something is
wrong with your inetd.conf file or installation.

We had some bugs in saned that only occured in certain situations.
With debug messages they didn't show up because of different timing. I
hope they are fixed now (in 1.0.7) but you never know.

However, this shouldn't affect connecting but scanning itsself.
What does your syslog show about saned?

Maybe for some reason the backends aren't found when saned is started
by inetd? How does your saned line look in inetd.conf?

> I can (and do) use other services from inetd and 
> even tried the solution of piping the error messages to /dev/null - all to 
> no avail.  I have had to run sane with the -d switch as follows :

You can't run "saned -d" by inetd because in this standalone-mode
saned does the connection to its port himself and doesn't use
stdin/out as in inetd mode.

What you could try to get more information is something like that:

#!/bin/sh
export SANE_DEBUG_DLL=255
/usr/local/sbin/saned 2>/tmp/saned.log

Name this e.g. /usr/local/sbin/saned-debug and modify inetd.conf
appropriately. Check /tmp/saned.log if you see any errors. Maybe also
add the DEBUG variable of your backend if it's a backend problem.

> I probably could have put it in the inittab, but I was scared to do that!

You could also rund saned -d in an endless loop but in this case it
can only be used by one host at a time.

Bye,
  Henning