[sane-devel] Failing to scan over network
Henning Meier-Geinitz
henning at meier-geinitz.de
Sat Nov 16 11:05:39 GMT 2002
Hi,
On Sat, Nov 16, 2002 at 12:16:19AM +0100, Steven Lowette wrote:
> If I run saned as a daemon from inetd or xinetd, with full debug output,
What do you mean by ""with full debug output"? If you set options -d
or -s you can't run saned from inetd or xinetd, that's for manual
start only.
> I
> get in my /var/log/syslog after a remote scanimage -L:
>
> Nov 7 12:06:26 igor saned[3704]: main: starting debug mode (level 128)
> Nov 7 12:06:27 igor saned[3704]: main: trying to get port for service
> `sane' (getservbyname)
> Nov 7 12:06:30 igor saned[3704]: main: port is 6566
> Nov 7 12:06:30 igor saned[3704]: main: socket ()
> Nov 7 12:06:30 igor saned[3704]: main: setsockopt ()
> Nov 7 12:06:30 igor saned[3704]: main: bind ()
> Nov 7 12:06:30 igor saned[3704]: main: bind failed: Address already in
> use
Well, the address is already in use :-) Explanation: xinetd binds to
port 6566 and starts saned, if a request comes in. The communication
between saned and xinetd uses stdin and out.
However, if you run saned -d from xinetd, saned will try to open port
6566. Bang! That one is already opened by xinetd.
So remove "-d" from saned in xinetd.conf.
> If I run manually saned -d128 on the command line, the same
> remote 'scanimage -L' works. However, issuing 'scanimage hp:/dev/scanner'
> starts and finishes a scan, but yields an IO-error after some time (with
> no image output on the scanimage side):
>
> sane_start: Error during device I/O
scanimage hp:/dev/scanner can't work. First, the option for setting
the device is -d. Second, you want to scan over the net, so the
command would be e.g.:
scanimage -d net:hostname:hp:/dev/scanner
But I don't think that's the real problem.
What's the debug output when you run saned -d128?
> I have iptables running on the machine with the scanner, but that's ok.
Sure? You need port 6566 and a data port. The data port is selected
by the system running saned. It can be any port > 1024.
> With the filters disabled, the problem remains. The computer with the
> scanner is very slow, but as the local scanning works, I guess this is
> neither an issue.
Try local network scanning first. On the computer with the scanner,
add "localhost" to net.conf. Try scanning with:
scanimage -d net:localhost:hp:/dev/scanner
No errors? Then it's either a problem with your filters or the second
computer.
To get more debugging on the client:
SANE_DEBUG_NET=255 scanimage -L
Bye,
Henning
More information about the sane-devel
mailing list