[sane-devel] Mysterious saned and xinetd problem

Leon Miller-Out sane at leonout.com
Sun Apr 1 19:52:54 UTC 2007


Hi! I'm using sane-backends 1.0.18. I have the scanner part of my
Brother DCP-1000 multifunction working in Ubuntu 6.10. It works fine
as sane device "brother:bus1;dev1". However, I can't scan over the
network if I'm running saned via xinetd. The error I always get is:

$ scanimage -d "net:violet:brother:bus1;dev1" -T
[sanei_debug] Setting debug level of net to 255.
[net] sane_init: authorize = 0x1c3c, version_code = 0xbffff0dc
[net] sane_init: SANE net backend version 1.0.13 (AF-indep+IPv6) from
sane-backends 1.0.18-cvs
[net] sane_init: Client has little endian byte order
[net] sane_init: searching for config file
[net] sane_init: trying to add violet
[net] add_device: adding backend violet
[net] add_device: backend violet added
[net] sane_init: done reading config
[net] sane_init: evaluating environment variable SANE_NET_HOSTS
[net] sane_init: done
[net] sane_open("violet:brother:bus1;dev1")
[net] sane_open: host = violet, device = brother:bus1;dev1
[net] sane_open: device found in list
[net] sane_open: device not connected yet...
[net] connect_dev: trying to connect to violet
[net] connect_dev: [0] connection succeeded (IPv4)
[net] connect_dev: sanei_w_init
[net] connect_dev: net_init (user=leon, local version=1.0.3)
[net] connect_dev: freeing init reply (status=Success, remote version=1.0.3)
[net] connect_dev: done
[net] sane_open: net_open
[net] sane_open: remote open failed
scanimage: open of device net:violet:brother:bus1;dev1 failed: Error
during device I/O


This happens both locally and remotely. xinetd is definitely firing
saned up, though, because "scanimage -L" from a client machine
reports:

device `brother:bus1;dev1' is a Brother DCP-1000 USB scanner
device `net:localhost:brother:bus1;dev1' is a Brother DCP-1000 USB scanner

The strange part (to me) is that if I run "sudo -u saned saned -d", I
*can* connect and scan over the net backend, both from the server and
from a client. It's hard to tell what's going wrong with the xinetd
setup because you can't get debug info out of saned in that mode,
AFAIK.

Here's my xinetd.d/sane-port file:

service sane-port
{
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = saned
wait = no
disable = no
flags = IPV6
}

I've tried without the "flags" line as well, so I'm pretty sure it's
not an IPV4 vs IPV6 issue.

The saned user is part of the scanner group.

The troubleshooting guide at http://penguin-breeder.org/sane/saned/
seems to indicate that everything is set up correctly, though for some
reason, when I rename saned to saned.bin and use the wrapper script:
        #!/bin/sh
        SANE_DEBUG_NET=128
        export SANE_DEBUG_NET

        cd /tmp
        exec $0.bin 2> saned.$$.stderr
I get 0-byte .stderr files in my /tmp.

Can anyone suggest a method for me to get some more debugging info
from saned via xinetd, or point out any other configs I should check?

Thanks!



More information about the sane-devel mailing list