<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2020-09-05 22:57, Olaf Meeuwissen
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:877dt7xxa9.fsf@quark">
      <pre class="moz-quote-pre" wrap="">Hi,

C. Cook writes:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">On 2020-09-02 08:35, C. Cook wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">
Scanner is an Epson Perfection V370. I have IScan installed on server
and client.

Have saned running on the server, listening on ipv4 *:6566. scanimage
-L does see the scanner.

On the client in dll.conf I have all commented out except net. In
net.conf I have:

scan-server
10.1.1.4
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Does the scan-server hostname resolve?</pre>
    </blockquote>
    <p>It does.</p>
    <p><br>
    </p>
    <blockquote type="cite" cite="mid:877dt7xxa9.fsf@quark">
      <pre class="moz-quote-pre" wrap="">

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">In dll.d there is iscan which contains:

epkowa
net
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
This is on the server, right?  Because its the server that communicates
with the device via the epkowa backend.
</pre>
    </blockquote>
    <p>This is on the server.  So maybe I don't even need net on the
      server.</p>
    <p><br>
    </p>
    <blockquote type="cite" cite="mid:877dt7xxa9.fsf@quark"><br>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">On the client when I run scanimage -L it does not see the scanner.

When I run tcpdump on the client watching port 6566, and then do
scanimage -L, tcpdump never sees 6566 anywhere. So the client is
definitely not reaching out to the net for the server.
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
The 6566 port is the target port on the server.  You'd want to run
tcpdump there if at all.  Why don't you start saned in debug mode
on the server to see what's going on?

You can also enable debugging of the net backend on the client side
with

  SANE_DEBUG_NET=128 scanimage -L</pre>
    </blockquote>
    <p>Interesting:<br>
    </p>
    <p># SANE_DEBUG_NET=128 scanimage -L<br>
      [sanei_debug] Setting debug level of net to 128.<br>
      [net] sane_init: authorize != null, version_code != null<br>
      [net] sane_init: SANE net backend version 1.0.14 (AF-indep+IPv6)
      from sane-backends 1.0.27<br>
      [net] sane_init: Client has little endian byte order<br>
      [net] sane_init: searching for config file<br>
      [net] sane_init: connect timeout set to 30 seconds<br>
      [net] sane_init: trying to add scan-server<br>
      [net] add_device: adding backend scan-server<br>
      [net] add_device: error while getting address of host scan-server:
      Name or service not known<br>
      [net] sane_init: trying to add localhost<br>
      [net] add_device: adding backend localhost<br>
      [net] add_device: backend localhost added<br>
      [net] sane_init: done reading config<br>
      [net] sane_init: evaluating environment variable SANE_NET_HOSTS<br>
      [net] sane_init: evaluating environment variable SANE_NET_TIMEOUT<br>
      [net] sane_init: done<br>
      [net] sane_get_devices: local_only = 0<br>
      [net] connect_dev: trying to connect to localhost<br>
      [net] connect_dev: [0] connection succeeded (IPv4)<br>
      [net] connect_dev: sanei_w_init<br>
      [net] connect_dev: net_init (user=carl, local version=1.0.3)<br>
      <font color="#99000f"><font color="#99000f">[net] connect_dev:
          argument marshalling error (Invalid argument)</font><br>
      </font>[net] connect_dev: closing connection to localhost<br>
      [net] sane_get_devices: ignoring failure to connect to localhost<br>
      [net] sane_get_devices: finished (0 devices)<br>
      <br>
      No scanners were identified. If you were expecting something
      different,<br>
      check that the scanner is plugged in, turned on and detected by
      the<br>
      sane-find-scanner tool (if appropriate). Please read the
      documentation<br>
      which came with this software (README, FAQ, manpages).<br>
      [net] sane_exit: exiting<br>
      [net] sane_exit: closing dev 0x55c68f5c76d0, ctl=-1<br>
      [net] sane_exit: finished.<br>
    </p>
    <p>It should be connecting to localhost, but many years ago someone
      else found that setting:</p>
    <pre class="message">echo 0 > /proc/sys/net/ipv6/bindv6only</pre>
    <p>... and indeed sometimes the scanner does now show up on the
      client.  <br>
    </p>
    <p># scanimage -L<br>
      device `net:localhost:epkowa:interpreter:001:008' is a Epson
      (unknown model) flatbed scanner</p>
    <p># scanimage -L<br>
      device `net:localhost:epkowa:interpreter:001:008' is a Epson
      Perfection V370 Photo flatbed scanner<br>
      <br>
    </p>
    <p>But when I try to use it it says, "scanimage: open of device
      epkowa:interpreter:001:009 failed: Device busy"</p>
    <p>At one point on the server I did manage to get one scan with
      scanimage >test.png.</p>
    <p>But with this ipv6 problem still existing after so many years
      it's starting to look like this is so unstable I won't be able to
      hve a scanner.</p>
    <p><br>
    </p>
    <blockquote type="cite" cite="mid:877dt7xxa9.fsf@quark">
      <pre class="moz-quote-pre" wrap="">

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">In dll.conf I have enabled epkowa along with net, but no change.

No idea what I'm doing wrong.
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
No one has any idea?
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
A few more things to check:

 - Is there a firewall between the client and server programs that block
   traffic?</pre>
    </blockquote>
    <p>There is, but I'm using a reverse SSH tunnel for 6566 so it
      bypasses the firewalls with SSH.</p>
    <p>
    </p>
    <blockquote type="cite" cite="mid:877dt7xxa9.fsf@quark">
      <pre class="moz-quote-pre" wrap="">
 - Does the saned process on the server allow communication from your
   client (check /etc/hosts.allow and /etc/hosts.deny as well as your
   /etc/saned.conf).</pre>
    </blockquote>
    <p>Yes, all commented out in .allow and .deny, and in saned.conf:<br>
      127.0.0.1<br>
      10.2.1.0/24<br>
      <br>
      <br>
    </p>
    <blockquote type="cite" cite="mid:877dt7xxa9.fsf@quark">
      <pre class="moz-quote-pre" wrap="">

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        <a class="moz-txt-link-freetext" href="https://my.fsf.org/donate">https://my.fsf.org/donate</a>
 Join the Free Software Foundation              <a class="moz-txt-link-freetext" href="https://my.fsf.org/join">https://my.fsf.org/join</a>
</pre>
    </blockquote>
  </body>
</html>