Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th December 2012, 05:12 PM
tomservo Offline
Registered User
 
Join Date: Dec 2012
Location: Virginia
Posts: 5
windows_7firefox
Exclamation [SOLVED] Problem with saned on Fedora 17

Until recently, I was running Slackware server where I had CUPS and saned all set up and running. Now, I have decided to join the Fedora "club" and therefore I'm using Fedora 17 64-bit.

I was able to get CUPS set up and working with very little issue by duplicating some of the /etc files.

Now, I'm trying to get saned working and am having nothing but problems.

I'm working with an HP Color LaserJet 2840 All-in-one.

I have the following RPM's installed that I believe to be relevant to this issue:

hplip-libs-3.12.10-4.a.fc17.x86_64
hplip-3.12.10-4.a.fc17.x86_64
hplip-common-3.12.10-4.a.fc17.x86_64
sane-backends-1.0.23-4.fc17.x86_64
libsane-hpaio-3.12.10-4.a.fc17.x86_64
sane-backends-libs-1.0.23-4.fc17.x86_64
sane-backends-drivers-scanners-1.0.23-4.fc17.x86_64
cups-1.5.4-11.fc17.x86_64
cups-libs-1.5.4-11.fc17.x86_64
ghostscript-cups-9.05-4.fc17.x86_64

-----

Local tests work fine:

scanimage -L

device `hpaio:/net/HP_Color_LaserJet_2840?ip=172.31.69.98' is a Hewlett-Packard HP_Color_LaserJet_2840 all-in-one

---

hp-scan

HP Linux Imaging and Printing System (ver. 3.12.10a)
Scan Utility ver. 2.2

Copyright (c) 2001-14 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Using device: hpaio:/net/HP_Color_LaserJet_2840?ip=172.31.69.98

warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/HP_Color_LaserJet_2840?ip=172.31.69.98
Opening connection to device...

Resolution: 300dpi
Mode: gray
Compression: JPEG
Scan area (mm):
Top left (x,y): (0.000000mm, 0.000000mm)
Bottom right (x,y): (228.599991mm, 381.000000mm)
Width: 228.599991mm
Height: 381.000000mm
Destination(s): file
Output file:
error: Unable to set option source to value Flatbed
warning: File destination enabled with no output file specified.
Setting output format to PNG for greyscale mode.
warning: Defaulting to '/home/tomservo/hpscan001.png'.

Warming up...

Scanning...
Expecting to read 10.8 MB from scanner.
Reading data: [************************************************** ************************************************** ************************************************** ************************************************** *************************] 100% 10.8 MB
Read 10.8 MB from scanner.
Closing device.

Outputting to destination 'file':
Saving to file /home/tomservo/hpscan001.png

Done.

---

If I run saned in debug mode, here's what I get when I try to connect via sanetwain. sanetwain gets a message "No devices found on backend."

[saned] main: starting debug mode (level 128)
[saned] read_config: searching for config file
[saned] read_config: done reading config
[saned] saned (AF-indep+IPv6) from sane-backends 1.0.23 starting up
[saned] do_bindings: trying to get port for service "sane-port" (getaddrinfo)
[saned] do_bindings: [1] socket () using IPv6
[saned] do_bindings: [1] setsockopt ()
[saned] do_bindings: [1] bind () to port 6566
[saned] do_bindings: [1] listen ()
[saned] do_bindings: [0] socket () using IPv4
[saned] do_bindings: [0] setsockopt ()
[saned] do_bindings: [0] bind () to port 6566
[saned] do_bindings: [0] listen ()
[saned] run_standalone: waiting for control connection
[saned] handle_connection: processing client connection
[saned] check_host: access by remote host: 172.31.69.2
[saned] check_host: remote host is not IN_LOOPBACK nor IN6_LOOPBACK
[saned] check_host: local hostname: linuxbox.anime.net
[saned] check_host: local hostname(s) (from DNS): linuxbox.anime.net
[saned] check_host: local hostname(s) (from DNS): (null)
[saned] check_host: local hostname(s) (from DNS): (null)
[saned] check_host: remote host doesn't have same addr as local
[saned] check_host: opening config file: /etc/hosts.equiv
[saned] check_host: can't open config file: /etc/hosts.equiv (No such file or directory)
[saned] check_host: opening config file: saned.conf
[saned] check_host: config file line: `# saned.conf'
[saned] check_host: config file line: `# Configuration for the saned daemon'
[saned] check_host: config file line: `'
[saned] check_host: config file line: `## Daemon options'
[saned] check_host: config file line: `# Port range for the data connection. Choose a range inside [1024 - 65535].'
[saned] check_host: config file line: `# Avoid specifying too large a range, for performance reasons.'
[saned] check_host: config file line: `#'
[saned] check_host: config file line: `# ONLY use this if your saned server is sitting behind a firewall. If your'
[saned] check_host: config file line: `# firewall is a Linux machine, we strongly recommend using the'
[saned] check_host: config file line: `# Netfilter nf_conntrack_sane connection tracking module instead.'
[saned] check_host: config file line: `#'
[saned] check_host: config file line: `# data_portrange = 10000 - 10100'
[saned] check_host: config file line: `'
[saned] check_host: config file line: `'
[saned] check_host: config file line: `## Access list'
[saned] check_host: config file line: `# A list of host names, IP addresses or IP subnets (CIDR notation) that'
[saned] check_host: config file line: `# are permitted to use local SANE devices. IPv6 addresses must be enclosed'
[saned] check_host: config file line: `# in brackets, and should always be specified in their compressed form.'
[saned] check_host: config file line: `#'
[saned] check_host: config file line: `# The hostname matching is not case-sensitive.'
[saned] check_host: config file line: `'
[saned] check_host: config file line: `#scan-client.somedomain.firm'
[saned] check_host: config file line: `#192.168.0.1'
[saned] check_host: config file line: `#192.168.0.1/29'
[saned] check_host: config file line: `#[2001:db8:185e::42:12]'
[saned] check_host: config file line: `#[2001:db8:185e::42:12]/64'
[saned] check_host: config file line: `'
[saned] check_host: config file line: `# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and'
[saned] check_host: config file line: `# /etc/services must also be properly configured to start'
[saned] check_host: config file line: `# the saned daemon as documented in saned(8), services(4)'
[saned] check_host: config file line: `# and inetd.conf(4) (or xinetd.conf(5)).'
[saned] check_host: config file line: `172.31.69.0/24'
[saned] check_host: subnet with base IP = 172.31.69.0, CIDR netmask = 24
[saned] check_host: access granted from IP address 172.31.69.2 (in subnet 172.31.69.0/24)
[saned] init: access granted
[saned] init: access granted to PCUSER@172.31.69.2
[saned] process_request: waiting for request
[saned] process_request: got request 1
[sanei_debug] Setting debug level of net to 128.
[net] sane_init: authorize != null, version_code != null
[net] sane_init: SANE net backend version 1.0.14 (AF-indep+IPv6) from sane-backends 1.0.23
[net] sane_init: Client has little endian byte order
[net] sane_init: searching for config file
[net] sane_init: trying to add linuxbox
[net] add_device: adding backend linuxbox
[net] add_device: backend linuxbox added
[net] sane_init: done reading config
[net] sane_init: evaluating environment variable SANE_NET_HOSTS
[net] sane_init: evaluating environment variable SANE_NET_TIMEOUT
[net] sane_init: done
[net] sane_get_devices: local_only = 1
[saned] process_request: waiting for request
[saned] process_request: got request 10
[saned] bailing out, waiting for children...
[saned] bail_out: all children exited

---

I've been trying to search around Google and keep reading the same things over and over that I've already verified...so now I come here, and hope that someone has some idea of what I need to look at.

Thanks for reading!

Last edited by tomservo; 5th December 2012 at 04:22 AM. Reason: Changing title to SOLVED
Reply With Quote
  #2  
Old 4th December 2012, 05:28 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,976
linuxfirefox
Re: Problem with saned on Fedora 17

Might be SELinux or firewall or permissions. I would try

scanimage > scan.pcm

You can try as root, scanimage > scan.pcm (You don't need a GUI for that, you can run it in console and see if it scans.)

If that works, then try as user. If that works, then it indicates the scanner is working but one of the GUI programs isn't, but at least it will help track down the issue.





See if you get anything. If you do then the scanner is workin
Reply With Quote
  #3  
Old 4th December 2012, 07:37 PM
tomservo Offline
Registered User
 
Join Date: Dec 2012
Location: Virginia
Posts: 5
windows_7firefox
Re: Problem with saned on Fedora 17

Okay...tried those and they worked perfectly.

I've got selinux disabled, so that shouldn't be the problem.

It must be something with the firewall or the network settings in the sane setup.

It's just so weird...I have the iptables set identically to how they were set when I was running Slack.

I guess I'll take a look at that first, since I'm 99% sure I've got the saned.conf and net.conf set properly.

---------- Post added at 02:37 PM ---------- Previous post was at 01:53 PM ----------

I don't think it's iptables, since I even tried disabling it completely. I still get "No devices found on backend."

I've got 172.31.69.0/24 in /etc/sane.d/saned.conf (which covers my entire subnet)

I've got localhost in /etc/sane.d/net.conf

I've got 'net' and 'hpaio' uncommented in dll.conf

Everything works from localhost, but I can't get in from outside.

Any more ideas?

Last edited by tomservo; 4th December 2012 at 08:43 PM. Reason: Had the net.conf and saned.conf entries reversed
Reply With Quote
  #4  
Old 4th December 2012, 07:49 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,976
linuxfirefox
Re: Problem with saned on Fedora 17

It works as regular user as well?

However, sane doesn't work. Ok, sounds like a problem with sane--that is, if you can scan with the scanimage command.

Next, I would say try sane as root--it will give you various warnings, but it's safe to ignore them. See if that works. Not sure how I'd troubleshoot this one.
Reply With Quote
  #5  
Old 4th December 2012, 09:33 PM
tomservo Offline
Registered User
 
Join Date: Dec 2012
Location: Virginia
Posts: 5
windows_7firefox
Unhappy Re: Problem with saned on Fedora 17

This problem is maddening...It makes no sense! I can run scanimage on localhost and it works fine.

This would, then, point me to something with networking. But even if I get rid of my iptables rules, it still doesn't work. I've even disabled the firewall on my remote PC as well...no change. All I ever get is "No devices found on backend."

I'm at my wits end with this one...debug information from saned doesn't help, because I don't see any errors...it just doesn't work!

Any help from anyone who has experience with saned and can give me some pointers would be GREATLY appreciated!
Reply With Quote
  #6  
Old 4th December 2012, 11:55 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,101
linuxfirefox
Re: Problem with saned on Fedora 17

Does "netstat -a" show the listening socket? It should have either * or the local network you specified.
Reply With Quote
  #7  
Old 5th December 2012, 01:45 AM
tomservo Offline
Registered User
 
Join Date: Dec 2012
Location: Virginia
Posts: 5
windows_7firefox
Re: Problem with saned on Fedora 17

Thanks for the next test...

Ran that and yes, 'sane-port' does appear in netstat -a. However, I noticed this:

If I run saned manually in debug mode, I get both the ipv4 and ipv6 listeners.

If I run saned via xinetd, only the ipv6 listener is found.

I'm not sure this is the problem, since it isn't working even when I do run saned manually.

I'm seeing the following:

tcp 0 0 *:sane-port *:* LISTEN
tcp6 0 0 [::]:sane-port [::]:* LISTEN

or

tcp6 0 0 [::]:sane-port [::]:* LISTEN
Reply With Quote
  #8  
Old 5th December 2012, 02:48 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,101
linuxfirefox
Re: Problem with saned on Fedora 17

It definitely should not work unless the tcp4 socket is open. After that, it should depend on the firewall allowing that port to be seen.

going through localhost should work either way as long as tcpv6 is enabled (as local host via ipv6 would work if tcpv4 socket is missing).
Reply With Quote
  #9  
Old 5th December 2012, 04:21 AM
tomservo Offline
Registered User
 
Join Date: Dec 2012
Location: Virginia
Posts: 5
windows_7firefox
Re: Problem with saned on Fedora 17

Here's one thing I've found and I'm convinced it has SOMETHING to do with this...

Every time I run saned, it keeps telling me: [net] sane_get_devices: local_only = 1

However, this is a networked printer...not directly connected to the server...so from my research, this SHOULD be saying local_only = 0. Which is great...but I can't figure out WHERE or HOW to make that happen!

I did get saned to listen on the ipv4 connection...that did not help at all. I removed all of my iptables stuff so everything is open...nothing. So again, without knowing a ton about saned, I believe the above to be my issue.

Any help on this?

---------- Post added at 11:21 PM ---------- Previous post was at 10:42 PM ----------

I have solved my problem. I don't think it had much to do with saned under Fedora 17 at all.

After all the switching around of different options here there and everywhere and trying things probably at least a hundred times, I realized that:

a) There's an option in sanetwain for "Get list of devices on startup"

This is what was attempting to grab the names of the connected devices, which I did not need.

After fixing THAT issue, I found the following...

b) Typos are a b*tch. I had my device in as hpaio://net/HP_Color_LaserJet......

It *SHOULD* have been hpaio:/net/HP_Color_LaserJet...

It looks so much like a URL, I thought it needed two //'s

I put my firewall back into operation and retested everything. It's all working properly now.

Problem SOLVED. (Changing title)
Reply With Quote
  #10  
Old 5th December 2012, 04:24 AM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,976
linuxchrome
Re: Problem with saned on Fedora 17

I don't believe you can change the title, though you can ask a mod to do it for you. What you, as the originator of the thread, can do is click the thread tools and choose to mark the thread solved. (It's a bit different than some other forums, I know).
Reply With Quote
Reply

Tags
fedora, problem, saned, sanetwain

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing one package out of many! A Fedora problem or developer problem jakebpg Using Fedora 28 29th January 2011 12:49 PM
HD problem with fedora 12 installation (LVM partition problem?) warlus Hardware & Laptops 1 30th July 2010 11:01 AM
Fedora newbie, windows problem, network problem dustin0 Using Fedora 24 21st October 2007 06:47 AM
Fedora 7 install problem (nVidia SATA raid problem?) jdmclemore Installation and Live Media 12 23rd July 2007 04:03 PM


Current GMT-time: 22:38 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat