Discussion:
[Ltsp-discuss] Fat client scanning with server-connected scanner
John Hupp
2015-05-05 21:28:52 UTC
Permalink
For ease of deployment, I have the LTSP server getting its IP address by
DHCP, and so far I have been able to avoid referring to it by IP address
in various configurations.

But trying to set up fat client scanning with a server-connected
scanner, I have been following this simple tutorial for Ubuntu 14.04:
https://help.ubuntu.com/community/SaneDaemonTutorial

The last step is configuring /etc/sane.d/net.conf for sane clients,
identifying saned hosts by hostname or IP address. I find that using
the hostname works on another standalone machine on the LAN, but it
fails with fat clients. So far I can only make fat client scanning work
by entering an IP address.

Does anyone know how to make the hostname work for the fat client? Or is
there another method altogether, perhaps something LTSP-specific?
(Before I started following the above tutorial, I had previously simply
entered SCANNER=true in lts.conf, but that did not enable fat client
scanning, so I deleted that.)


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net
John Hupp
2015-05-06 17:40:32 UTC
Permalink
Post by John Hupp
For ease of deployment, I have the LTSP server getting its IP address
by DHCP, and so far I have been able to avoid referring to it by IP
address in various configurations.
But trying to set up fat client scanning with a server-connected
https://help.ubuntu.com/community/SaneDaemonTutorial
The last step is configuring /etc/sane.d/net.conf for sane clients,
identifying saned hosts by hostname or IP address. I find that using
the hostname works on another standalone machine on the LAN, but it
fails with fat clients. So far I can only make fat client scanning
work by entering an IP address.
Does anyone know how to make the hostname work for the fat client? Or
is there another method altogether, perhaps something LTSP-specific?
(Before I started following the above tutorial, I had previously
simply entered SCANNER=true in lts.conf, but that did not enable fat
client scanning, so I deleted that.)
Trying to dig into this question, I find that the fat client can
successfully ping the server hostname, so it's not a name resolution issue.

One interesting fact: Even on the server, sane-find-scanner (even if run
as root) reports "could not open USB device <id info>: Access denied
(insufficient permissions)." And on the fat client, sane-find-scanner
reports the same even when net.conf identifies the saned host by IP
address and Simple Scan successfully scans.

Then sane-find-scanner is broken?

Some exercises with 'scanimage -L":

On the server 'sudo scanimage -L' reports:
device hp:libusb:004:002 is a Hewlett Packard Scanjet 5200C flatbed scanner
device net:192.168.1.8:hp:libusb:004:002 is a Hewlett Packard Scanjet
5200C flatbed scanner

If in lts.conf I enable SCREEN=02 to get root access on the fat client,
then run 'scanimage -L' on the fat client in screen 2 when net.conf uses
an IP address, it reports:
device net:192.168.1.8:hp:libusb:004:002 is a Hewlett Packard Scanjet
5200C flatbed scanner

Those devices presumably refer to /dev/bus/usb/004/002, which exists on
the server.

If I run 'scanimage -L' on the fat client in screen 2 when net.conf uses
a hostname, it reports no devices found.

I added back SCANNER=True to lts.conf, but this made no difference. I
imagine this configuration only enables scanners connected to thin clients.

While of some interest, I don't see that any of the above tells me much.

Any ideas?

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net
John Hupp
2015-05-07 15:53:46 UTC
Permalink
Post by John Hupp
Post by John Hupp
For ease of deployment, I have the LTSP server getting its IP address
by DHCP, and so far I have been able to avoid referring to it by IP
address in various configurations.
But trying to set up fat client scanning with a server-connected
https://help.ubuntu.com/community/SaneDaemonTutorial
The last step is configuring /etc/sane.d/net.conf for sane clients,
identifying saned hosts by hostname or IP address. I find that using
the hostname works on another standalone machine on the LAN, but it
fails with fat clients. So far I can only make fat client scanning
work by entering an IP address.
Does anyone know how to make the hostname work for the fat client? Or
is there another method altogether, perhaps something LTSP-specific?
(Before I started following the above tutorial, I had previously
simply entered SCANNER=true in lts.conf, but that did not enable fat
client scanning, so I deleted that.)
Trying to dig into this question, I find that the fat client can
successfully ping the server hostname, so it's not a name resolution issue.
One interesting fact: Even on the server, sane-find-scanner (even if
run as root) reports "could not open USB device <id info>: Access
denied (insufficient permissions)." And on the fat client,
sane-find-scanner reports the same even when net.conf identifies the
saned host by IP address and Simple Scan successfully scans.
Then sane-find-scanner is broken?
device hp:libusb:004:002 is a Hewlett Packard Scanjet 5200C flatbed scanner
device net:192.168.1.8:hp:libusb:004:002 is a Hewlett Packard Scanjet
5200C flatbed scanner
If in lts.conf I enable SCREEN=02 to get root access on the fat
client, then run 'scanimage -L' on the fat client in screen 2 when
device net:192.168.1.8:hp:libusb:004:002 is a Hewlett Packard Scanjet
5200C flatbed scanner
Those devices presumably refer to /dev/bus/usb/004/002, which exists
on the server.
If I run 'scanimage -L' on the fat client in screen 2 when net.conf
uses a hostname, it reports no devices found.
I added back SCANNER=True to lts.conf, but this made no difference. I
imagine this configuration only enables scanners connected to thin clients.
While of some interest, I don't see that any of the above tells me much.
Any ideas?
I noted in the original post that a fat client can ping the server
hostname successfully, and also that a standalone on the network with a
net.conf configured with the server hostname successfully scans with the
scanner server.

I thought those were very solid indicators that this is not a name
resolution issue, but I do get some indicators of that very issue from
host and resolv.conf output:
_server_ _fat client_ _standalone_
$ host <ltsp-servername> 127.0.1.1 127.0.1.1
<ltspserverIP>
$ /etc/resolv.conf 127.0.0.1
<ltspserverIP> 127.0.0.1

So indeed, the fat client and standalone are handling those differently
and I need to look at that. Credit to Michael Shigorin from the sane
list for pointing me in that direction.
John Hupp
2015-05-07 21:02:55 UTC
Permalink
Post by John Hupp
Post by John Hupp
Post by John Hupp
For ease of deployment, I have the LTSP server getting its IP
address by DHCP, and so far I have been able to avoid referring to
it by IP address in various configurations.
But trying to set up fat client scanning with a server-connected
scanner, I have been following this simple tutorial for Ubuntu
14.04: https://help.ubuntu.com/community/SaneDaemonTutorial
The last step is configuring /etc/sane.d/net.conf for sane clients,
identifying saned hosts by hostname or IP address. I find that
using the hostname works on another standalone machine on the LAN,
but it fails with fat clients. So far I can only make fat client
scanning work by entering an IP address.
Does anyone know how to make the hostname work for the fat client?
Or is there another method altogether, perhaps something
LTSP-specific? (Before I started following the above tutorial, I
had previously simply entered SCANNER=true in lts.conf, but that did
not enable fat client scanning, so I deleted that.)
Trying to dig into this question, I find that the fat client can
successfully ping the server hostname, so it's not a name resolution issue.
One interesting fact: Even on the server, sane-find-scanner (even if
run as root) reports "could not open USB device <id info>: Access
denied (insufficient permissions)." And on the fat client,
sane-find-scanner reports the same even when net.conf identifies the
saned host by IP address and Simple Scan successfully scans.
Then sane-find-scanner is broken?
device hp:libusb:004:002 is a Hewlett Packard Scanjet 5200C flatbed scanner
device net:192.168.1.8:hp:libusb:004:002 is a Hewlett Packard Scanjet
5200C flatbed scanner
If in lts.conf I enable SCREEN=02 to get root access on the fat
client, then run 'scanimage -L' on the fat client in screen 2 when
device net:192.168.1.8:hp:libusb:004:002 is a Hewlett Packard Scanjet
5200C flatbed scanner
Those devices presumably refer to /dev/bus/usb/004/002, which exists
on the server.
If I run 'scanimage -L' on the fat client in screen 2 when net.conf
uses a hostname, it reports no devices found.
I added back SCANNER=True to lts.conf, but this made no difference. I
imagine this configuration only enables scanners connected to thin clients.
While of some interest, I don't see that any of the above tells me much.
Any ideas?
I noted in the original post that a fat client can ping the server
hostname successfully, and also that a standalone on the network with
a net.conf configured with the server hostname successfully scans with
the scanner server.
I thought those were very solid indicators that this is not a name
resolution issue, but I do get some indicators of that very issue from
_server_ _fat client_ _standalone_
$ host <ltsp-servername> 127.0.1.1 127.0.1.1
<ltspserverIP>
$ /etc/resolv.conf 127.0.0.1
<ltspserverIP> 127.0.0.1
So indeed, the fat client and standalone are handling those
differently and I need to look at that. Credit to Michael Shigorin
from the sane list for pointing me in that direction.
I find that /etc/hosts in the fat client filesystem does not match the
/etc/hosts found in the image. It seems that LTSP must be
auto-generating one at client boot. In any case /etc/hosts in the fat
client filesystem has an alias line that resolves "server" to my host's
current IP address.

Can anyone confirm that this is the case? Documented anywhere?

If I use the literal scan server hostname for the image's sane net.conf,
the scanner is not detected. But the scanner is detected if I use the
alias "server."

Victory!
Vagrant Cascadian
2015-05-07 21:59:49 UTC
Permalink
Post by John Hupp
I find that /etc/hosts in the fat client filesystem does not match the
/etc/hosts found in the image. It seems that LTSP must be
auto-generating one at client boot. In any case /etc/hosts in the fat
client filesystem has an alias line that resolves "server" to my host's
current IP address.
Can anyone confirm that this is the case?
Yes, /etc/hosts is generated on boot of the thin client. See
/usr/share/ltsp/init-ltsp.d/09-hostname for the code that does this.

You can change the "server" alias using the SERVER_NAME variable and add
arbitrary entries using HOSTS_XX in lts.conf.

The code dates from when the standard LTSP environment didn't typically
have name resolution, which is an assumption we should re-think in
modern LTSP environments.
Post by John Hupp
Documented anywhere?
Apparently not.
Post by John Hupp
If I use the literal scan server hostname for the image's sane net.conf,
the scanner is not detected. But the scanner is detected if I use the
alias "server."
Victory!
Congrats!


live well,
vagrant
John Hupp
2015-05-07 22:21:06 UTC
Permalink
Post by Vagrant Cascadian
Post by John Hupp
I find that /etc/hosts in the fat client filesystem does not match the
/etc/hosts found in the image. It seems that LTSP must be
auto-generating one at client boot. In any case /etc/hosts in the fat
client filesystem has an alias line that resolves "server" to my host's
current IP address.
Can anyone confirm that this is the case?
Yes, /etc/hosts is generated on boot of the thin client. See
/usr/share/ltsp/init-ltsp.d/09-hostname for the code that does this.
You can change the "server" alias using the SERVER_NAME variable and add
arbitrary entries using HOSTS_XX in lts.conf.
The code dates from when the standard LTSP environment didn't typically
have name resolution, which is an assumption we should re-think in
modern LTSP environments.
Post by John Hupp
Documented anywhere?
Apparently not.
Post by John Hupp
If I use the literal scan server hostname for the image's sane net.conf,
the scanner is not detected. But the scanner is detected if I use the
alias "server."
Victory!
Congrats!
live well,
vagrant
Thanks for filling in with helpful information!

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net
Loading...