LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2019, 12:30 PM   #1
mark9117
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Rep: Reputation: 0
Saned port shows good but not connecting over network


Greetings. If this question is not in the appropriate location, please move it. Thanks.

I recently upgraded my file server to a current Mageia version. In doing so, I have lost some things despite restoring good backups. One of the things I'm missing is my network scanner. The scanner (details below) is connected to the server via USB and has been working just fine for years. It still works on the server locally, but I can no longer get my Mageia 7 desktop to connect to it. Again, it all worked just fine prior to the upgrade. I see this as network trouble rather than an issue with saned specifically. I may be wrong.

Here are some details.

Linux shuttle 5.4.2-desktop-1.mga7 #1 SMP Thu Dec 5 17:40:00 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

(from "scanimage -L" on the server) device `genesys:libusb:002:002' is a Canon LiDE 110 flatbed scanner

scanimage (sane-backends) 1.0.27; backend version 1.0.28

Scanner works locally on server (192.168.1.105), but does not work from a desktop on the LAN (192.168.1.106). I am unable to connect to port 6566 on the server via telnet. Connection closes immediately:

# telnet shuttle 6566
Trying 192.168.1.105...
Connected to shuttle.
Escape character is '^]'.
Connection closed by foreign host.


scanimage -L on the desktop fails to see the scanner


saned is running:


# systemctl status saned.socket
● saned.socket - saned incoming socket
Loaded: loaded (/etc/systemd/system/saned.socket; enabled; vendor preset: disabled)
Active: active (listening) since Sun 2019-12-15 20:41:33 MST; 13h ago
Listen: [::]:6566 (Stream)
Accepted: 36; Connected: 0;
Memory: 128.0K
CGroup: /system.slice/saned.socket

Dec 15 20:41:33 shuttle systemd[1]: Listening on saned incoming socket.



saned.socket shows open and listening per other tools as well:

nmap -sV shuttle -p 6566
Starting Nmap 7.70 ( https://nmap.org ) at 2019-12-16 10:34 MST
Nmap scan report for shuttle (192.168.1.105)
Host is up (0.00015s latency).

PORT STATE SERVICE VERSION
6566/tcp open tcpwrapped


# netstat -l |grep sane-port
tcp6 0 0 [::]:sane-port [::]:*


my user is in the server's "scanner" group
saned is in "lp" group
Firewalls are down


/etc/saned/net.conf
## saned hosts
::1
localhost
192.168.1.106
192.168.1.105



/etc/hosts.allow is set for ALL:ALL


Does anybody have any ideas?

Thanks.

Mark
 
Old 12-16-2019, 03:05 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 15,447

Rep: Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173Reputation: 2173
Are you saying sane is looking for the scanner on 192.168.1.106 but it's living on 192.168.1.105? Can't you fix that on the network, or on /etc/sane.d/saned.conf?
 
Old 12-16-2019, 04:07 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I would do two things:

Shut down the systemd socket and run saned -d (debug mode; saned listens on 6566 rather than getting started by systemd). Try connecting.

Trace packets on port 6566 on both client and server and try to make sense of the result. Wireshark is most comfortable, or use tcpdump, e.g.
Code:
tcpdump port 6566
Third: Your telnet test indicates that server's systemd accepts the connection request. It should then start saned and hand the connection over to it, which fails. Is that logged somewhere? Perhaps journalctl -u saned.socket, but I am not certain.
 
Old 12-16-2019, 04:41 PM   #4
mark9117
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
Are you saying sane is looking for the scanner on 192.168.1.106 but it's living on 192.168.1.105? Can't you fix that on the network, or on /etc/sane.d/saned.conf?
No, that's not what I'm saying at all. 192.168.1.105 is the host. All is well there.

192.168.1.106 is my desktop. The desktop can't see the sane port.
 
Old 12-16-2019, 05:01 PM   #5
mark9117
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berndbausch View Post
I would do two things:

Shut down the systemd socket and run saned -d (debug mode; saned listens on 6566 rather than getting started by systemd). Try connecting.

Trace packets on port 6566 on both client and server and try to make sense of the result. Wireshark is most comfortable, or use tcpdump, e.g.
Code:
tcpdump port 6566
Third: Your telnet test indicates that server's systemd accepts the connection request. It should then start saned and hand the connection over to it, which fails. Is that logged somewhere? Perhaps journalctl -u saned.socket, but I am not certain.

Okay, I shut down the socket:

Code:
# systemctl status saned.socket
● saned.socket - saned incoming socket
   Loaded: loaded (/etc/systemd/system/saned.socket; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2019-12-16 15:42:21 MST; 2s ago
   Listen: [::]:6566 (Stream)
 Accepted: 71; Connected: 0;

Dec 16 12:23:22 shuttle systemd[1]: Closed saned incoming socket.
Dec 16 12:23:22 shuttle systemd[1]: Stopping saned incoming socket.
Dec 16 12:23:22 shuttle systemd[1]: Listening on saned incoming socket.
Dec 16 15:42:21 shuttle systemd[1]: saned.socket: Succeeded.
Dec 16 15:42:21 shuttle systemd[1]: Closed saned incoming socket.

Attempted to start saned in debug mode and failed:

Code:
# saned -d
saned: symbol lookup error: saned: undefined symbol: sanei_w_init
Not sure what that's about. If you know anything, please do tell.

Restarted saned.socket.
Here is the tail from journalctl

Quote:
Dec 16 15:47:41 shuttle systemd[1]: Listening on saned incoming socket.
-- Subject: A start job for unit saned.socket has finished successfully
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailma.../systemd-devel
--
-- A start job for unit saned.socket has finished successfully.

Here is the tail from journalctl after I tried to telnet into port 6566 on the server:

Code:
Dec 16 15:49:00 shuttle saned[24912]: /usr/sbin/saned: symbol lookup error: /usr/sbin/saned: undefined symbol: sanei_w_init
Dec 16 15:49:00 shuttle systemd[1]: saned@71-192.168.1.105:6566-192.168.1.106:36174.service: Main process exited, code=exited, status=127/n/a
Dec 16 15:49:00 shuttle systemd[1]: saned@71-192.168.1.105:6566-192.168.1.106:36174.service: Failed with result 'exit-code'.
I really don't know what to make of the sanei_w_init issue.
Uninstalling and reinstalling and editing config files doesn't fix it and there's nothing determinative on the internet. Again, I'd be interested in hearing anything anyone else knows about it.

And thanks for the assist.

Mark
 
Old 12-16-2019, 06:51 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by mark9117 View Post
Attempted to start saned in debug mode and failed:

Code:
# saned -d
saned: symbol lookup error: saned: undefined symbol: sanei_w_init
...
I really don't know what to make of the sanei_w_init issue.
Uninstalling and reinstalling and editing config files doesn't fix it and there's nothing determinative on the internet. Again, I'd be interested in hearing anything anyone else knows about it.
Well, you found the reason why you can connect to the socket (no network problems), but the connection is closed immediately. systemd fails launching saned.

saned doesn't run because of some version mismatch on your system, no doubt introduced by the recent update. It expects a library to define a symbol (probably a function) named sanei_w_init. This symbol is not defined. According to this question on the ask.ubuntu site, this could be related to having sane (the client) installed on the server.

Even if you need the sane client on the server, I would try to get rid of it for the sake of testing. In the long run, you need to ensure that all sane-related libraries on 192.168.1.105 are compatible. I don't have a magic recipe for that unfortunately, and I know very little about sane in the first place. But this is the direction you need to take.
 
Old 12-16-2019, 06:55 PM   #7
mark9117
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Original Poster
Rep: Reputation: 0
made a pass at sniffing packets with Wireshark. I don't really know what to make of all this, but I see packets moving between a port on the desktop and port 6566 on the server. I'm not good at pcap analysis or anything else in this realm, but here is an excerpt from a capture taken while I was opening Xsane on the desktop and it was failing to find the scanner on the server:


Code:
No.     Time           Source                Destination           Protocol Length Info
    854 14.291901815   192.168.1.106         192.168.1.105         TCP      74     37484 → 6566 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=3148581135 TSecr=0 WS=128

Frame 854: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Ethernet II, Src: 40:16:7e:22:a1:ca, Dst: 00:19:d1:71:dd:e7
Internet Protocol Version 4, Src: 192.168.1.106, Dst: 192.168.1.105
Transmission Control Protocol, Src Port: 37484, Dst Port: 6566, Seq: 0, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    855 14.292019270   192.168.1.105         192.168.1.106         TCP      74     6566 → 37484 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM=1 TSval=1310428134 TSecr=3148581135 WS=128

Frame 855: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Ethernet II, Src: 00:19:d1:71:dd:e7, Dst: 40:16:7e:22:a1:ca
Internet Protocol Version 4, Src: 192.168.1.105, Dst: 192.168.1.106
Transmission Control Protocol, Src Port: 6566, Dst Port: 37484, Seq: 0, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    856 14.292031015   192.168.1.106         192.168.1.105         TCP      66     37484 → 6566 [ACK] Seq=1 Ack=1 Win=64256 Len=0 TSval=3148581135 TSecr=1310428134

Frame 856: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: 40:16:7e:22:a1:ca, Dst: 00:19:d1:71:dd:e7
Internet Protocol Version 4, Src: 192.168.1.106, Dst: 192.168.1.105
Transmission Control Protocol, Src Port: 37484, Dst Port: 6566, Seq: 1, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    857 14.292089210   192.168.1.106         192.168.1.105         TCP      85     37484 → 6566 [PSH, ACK] Seq=1 Ack=1 Win=64256 Len=19 TSval=3148581135 TSecr=1310428134

Frame 857: 85 bytes on wire (680 bits), 85 bytes captured (680 bits)
Ethernet II, Src: 40:16:7e:22:a1:ca, Dst: 00:19:d1:71:dd:e7
Internet Protocol Version 4, Src: 192.168.1.106, Dst: 192.168.1.105
Transmission Control Protocol, Src Port: 37484, Dst Port: 6566, Seq: 1, Ack: 1, Len: 19
Data (19 bytes)

0000  00 00 00 00 01 00 00 03 00 00 00 07 6d 61 64 61   ............mada
0010  6d 73 00                                          ms.

No.     Time           Source                Destination           Protocol Length Info
    858 14.292154830   192.168.1.105         192.168.1.106         TCP      66     6566 → 37484 [ACK] Seq=1 Ack=20 Win=65152 Len=0 TSval=1310428134 TSecr=3148581135

Frame 858: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: 00:19:d1:71:dd:e7, Dst: 40:16:7e:22:a1:ca
Internet Protocol Version 4, Src: 192.168.1.105, Dst: 192.168.1.106
Transmission Control Protocol, Src Port: 6566, Dst Port: 37484, Seq: 1, Ack: 20, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    859 14.305389777   192.168.1.105         192.168.1.106         TCP      66     6566 → 37484 [RST, ACK] Seq=1 Ack=20 Win=65152 Len=0 TSval=1310428147 TSecr=3148581135

Frame 859: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: 00:19:d1:71:dd:e7, Dst: 40:16:7e:22:a1:ca
Internet Protocol Version 4, Src: 192.168.1.105, Dst: 192.168.1.106
Transmission Control Protocol, Src Port: 6566, Dst Port: 37484, Seq: 1, Ack: 20, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    860 14.305506307   192.168.1.106         192.168.1.105         TCP      74     37486 → 6566 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=3148581149 TSecr=0 WS=128

Frame 860: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Ethernet II, Src: 40:16:7e:22:a1:ca, Dst: 00:19:d1:71:dd:e7
Internet Protocol Version 4, Src: 192.168.1.106, Dst: 192.168.1.105
Transmission Control Protocol, Src Port: 37486, Dst Port: 6566, Seq: 0, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    861 14.305642205   192.168.1.105         192.168.1.106         TCP      74     6566 → 37486 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM=1 TSval=1310428147 TSecr=3148581149 WS=128

Frame 861: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Ethernet II, Src: 00:19:d1:71:dd:e7, Dst: 40:16:7e:22:a1:ca
Internet Protocol Version 4, Src: 192.168.1.105, Dst: 192.168.1.106
Transmission Control Protocol, Src Port: 6566, Dst Port: 37486, Seq: 0, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    862 14.305657535   192.168.1.106         192.168.1.105         TCP      66     37486 → 6566 [ACK] Seq=1 Ack=1 Win=64256 Len=0 TSval=3148581149 TSecr=1310428147

Frame 862: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: 40:16:7e:22:a1:ca, Dst: 00:19:d1:71:dd:e7
Internet Protocol Version 4, Src: 192.168.1.106, Dst: 192.168.1.105
Transmission Control Protocol, Src Port: 37486, Dst Port: 6566, Seq: 1, Ack: 1, Len: 0

No.     Time           Source                Destination           Protocol Length Info
    863 14.305754215   192.168.1.106         192.168.1.105         TCP      85     37486 → 6566 [PSH, ACK] Seq=1 Ack=1 Win=64256 Len=19 TSval=3148581149 TSecr=1310428147

Frame 863: 85 bytes on wire (680 bits), 85 bytes captured (680 bits)
Ethernet II, Src: 40:16:7e:22:a1:ca, Dst: 00:19:d1:71:dd:e7
Internet Protocol Version 4, Src: 192.168.1.106, Dst: 192.168.1.105
Transmission Control Protocol, Src Port: 37486, Dst Port: 6566, Seq: 1, Ack: 1, Len: 19
Data (19 bytes)

0000  00 00 00 00 01 00 00 03 00 00 00 07 6d 61 64 61   ............mada
0010  6d 73 00                                          ms.

No.     Time           Source                Destination           Protocol Length Info
    864 14.305865650   192.168.1.105         192.168.1.106         TCP      66     6566 → 37486 [ACK] Seq=1 Ack=20 Win=65152 Len=0 TSval=1310428148 TSecr=3148581149

Frame 864: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: 00:19:d1:71:dd:e7, Dst: 40:16:7e:22:a1:ca
Internet Protocol Version 4, Src: 192.168.1.105, Dst: 192.168.1.106
Transmission Control Protocol, Src Port: 6566, Dst Port: 37486, Seq: 1, Ack: 20, Len: 0


No.     Time           Source                Destination           Protocol Length Info
    867 14.316032407   192.168.1.105         192.168.1.106         TCP      66     6566 → 37486 [RST, ACK] Seq=1 Ack=20 Win=65152 Len=0 TSval=1310428158 TSecr=3148581149

Frame 867: 66 bytes on wire (528 bits), 66 bytes captured (528 bits)
Ethernet II, Src: 00:19:d1:71:dd:e7, Dst: 40:16:7e:22:a1:ca
Internet Protocol Version 4, Src: 192.168.1.105, Dst: 192.168.1.106
Transmission Control Protocol, Src Port: 6566, Dst Port: 37486, Seq: 1, Ack: 20, Len: 0

I saved another capture while running scanimage -L from the desktop. No idea what it means.

Just wanted to get it out there.

Mark

Last edited by mark9117; 12-16-2019 at 07:06 PM.
 
Old 12-16-2019, 07:05 PM   #8
mark9117
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berndbausch View Post
Even if you need the sane client on the server, I would try to get rid of it for the sake of testing. In the long run, you need to ensure that all sane-related libraries on 192.168.1.105 are compatible. I don't have a magic recipe for that unfortunately, and I know very little about sane in the first place. But this is the direction you need to take.
Okay, so I ditched (x)sane on the server:

Code:
[root@shuttle /etc/sane.d]# rpm -qa sane
[root@shuttle /etc/sane.d]#
[root@shuttle /etc/sane.d]# rpm -qa saned
saned-1.0.27-4.mga7

I restarted the saned.socket and ran scanimage -L on the desktop. Here is the excerpt from journalctl:

Code:
Dec 16 18:00:36 shuttle systemd[1]: Started Scanner Service (192.168.1.106:37670).
Dec 16 18:00:36 shuttle saned[26138]: /usr/sbin/saned: symbol lookup error: /usr/sbin/saned: undefined symbol: sanei_w_init
Dec 16 18:00:36 shuttle systemd[1]: saned@85-192.168.1.105:6566-192.168.1.106:37670.service: Main process exited, code=exited, status=127/n/a
Dec 16 18:00:36 shuttle systemd[1]: saned@85-192.168.1.105:6566-192.168.1.106:37670.service: Failed with result 'exit-code'.
Dec 16 18:00:36 shuttle systemd[1]: Started Scanner Service (192.168.1.106:37672).
Dec 16 18:00:36 shuttle saned[26141]: /usr/sbin/saned: symbol lookup error: /usr/sbin/saned: undefined symbol: sanei_w_init
Dec 16 18:00:36 shuttle systemd[1]: saned@86-192.168.1.105:6566-192.168.1.106:37672.service: Main process exited, code=exited, status=127/n/a
Dec 16 18:00:36 shuttle systemd[1]: saned@86-192.168.1.105:6566-192.168.1.106:37672.service: Failed with result 'exit-code'.
I see no difference.

And I've seen that info from the ubuntu questions site. I don't really think it applies. I would also add that I have installed all this code from the Mageia 7 64-bit repositories.

I don't know.
 
Old 12-16-2019, 07:12 PM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Have you tried deinstalling everything sane-related, and installing it again?

If this doesn't solve the problem of the missing symbol, perhaps the good people at the Mageia project didn't package the sane backend correctly. You may want to reach out to them.
 
Old 12-16-2019, 07:17 PM   #10
mark9117
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by berndbausch View Post
Have you tried deinstalling everything sane-related, and installing it again?

If this doesn't solve the problem of the missing symbol, perhaps the good people at the Mageia project didn't package the sane backend correctly. You may want to reach out to them.
I have. Just tried it again. Didn't see any change.

I'll head over to the Mageia forums, but I'm disinclined to believe it will be worthwhile and there's always the possibility of a beatdown. At any rate, thanks for the help. I really do appreciate your time and attention. You have a happy holidays, whatever those holidays may be.

Mark
 
Old 12-16-2019, 07:26 PM   #11
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The missing symbol sanei_w_init is declared in a section of sane named sanei, which seems to be some internal API. My guess is that sanei is somehow missing on your computer, or the saned program doesn't know how to find the corresponding library. In the latter case, it could be a matter of correctly setting the LD_LIBRARY_PATH variable for saned.

Perhaps the above information helps you get the attention of Mageia.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP Tables shows port open, nmap shows port closed tkinsella Linux - Security 4 09-12-2014 02:43 AM
LXer: A script for auto-configuring saned network connections LXer Syndicated Linux News 0 10-08-2010 06:10 AM
[SOLVED] Can't Network Scanner (Epson 1250) Using SANED (In Slackware 12.2) Ignotum Per Ignotius Linux - Networking 1 09-27-2009 03:59 PM
unable to start saned using xinetd butchman Linux - Networking 0 07-11-2004 09:44 AM
saned carpman Linux - Networking 0 02-11-2003 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration