[] Debian 12 - Scanner wird nicht gefunden

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 16:49:45

Wenn Du, wie im Bugreport beschrieben, die fehlende Zeile nachgetragen hast, sollte Dein Scanner von der Gruppe "scanner" benutzbar sein.

Code: Alles auswählen

getfacl /dev/sg2
sollte anzeigen: group rw-, group scanner.
Dann musst Du nur noch Deinen Benutzer in die Gruppe scanner aufnehmen:

Code: Alles auswählen

usermod -a -G scanner <benutzer>
.

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 17:02:39

Hallo mellinger,

welchen Bug Report meinst Du konkret, hast Du bitte den Link?

Was meinst Du mit?

Code: Alles auswählen

getfacl /dev/sg2
Mein Debian 10 ist gebootet.
Zuletzt geändert von AxelMD am 23.12.2020 19:17:14, insgesamt 1-mal geändert.

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 17:07:56

Ich meine den Bugreport, den ich selbst verlinkt habe. Du hast die entscheidende Stelle hier zitiert:
viewtopic.php?f=30&t=176958&start=135#p1259177
Was meinst Du mit?

Code: Alles auswählen

getfacl /dev/sg2
Du sollst das in Dein Terminal eingeben, was sonst?

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 17:27:43

Hallo,

das habe ich wieder mal getan:

Code: Alles auswählen

 
scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner

Fehlende Zeile:
# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

Sieht dann so aus:
cat /lib/udev/rules.d/60-libsane.rules 

# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.27
#
# udev rules file for supported USB and SCSI devices
#
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"

# The following rule will disable USB autosuspend for the device
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"

SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_rules_end"

LABEL="libsane_scsi_rules_begin"
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"

# Generic: SCSI device type 6 indicates a scanner
ATTRS{type}=="6", ENV{libsane_matched}="yes"

# Some scanners advertise themselves as SCSI device type 3

# Wildcard: for some Epson SCSI scanners
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"

# Epson Expression 800 | Epson Expression 800
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"

# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"

# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"

# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"

# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"

# Epson Perfection 636 | Epson Perfection 636S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIc
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIp
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIcx
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4c
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 5p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6200C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6300C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"

# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

LABEL="libsane_rules_end"



usermod -a -G scanner axel

Ein Reboot von Debian 10

dann wieder 
 scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner





Auf dem Client Auf dem Client Auf dem Client


sudo scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


dann noch mal

Code: Alles auswählen

getfacl /dev/sg2
getfacl: Entferne führende '/' von absoluten Pfadnamen
# file: dev/sg2
# owner: root
# group: root
user::rw-
user:sddm:rw-
group::---
group:scanner:rw-
mask::rw-
other::---
dann korrigiert

Code: Alles auswählen

 getfacl dev/sg2
getfacl: dev/sg2: Datei oder Verzeichnis nicht gefunden

Für den Debian 10 Server mit Scanner [scanimage (sane-backends) 1.0.27; backend version 1.0.27]:

https://help.ubuntu.com/community/sane_Troubleshooting

https://help.ubuntu.com/community/sane_ ... dev_tricks

Fehlt irgendwie ein Symlink?

Wie überprüfe ich die udev Regel?
Zuletzt geändert von AxelMD am 23.12.2020 17:57:43, insgesamt 1-mal geändert.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 17:54:39

Debian 9 gebootet und auf dem Client
sudo scanimage -L
device `net:192.168.178.21:snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner

Taja, und nun, wie weiter mit Debian 10?

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 18:16:37

Auf dem Server folgendes eingeben:

Code: Alles auswählen

 systemctl status saned

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 18:36:19

Code: Alles auswählen

Debian 10 Buster


root@p5:~# scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner

root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# 
root@p5:~# 
root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# 

Kleinproblemlösung:

Code: Alles auswählen


root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service   
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# systemctl start saned.socket
root@p5:~#  systemctl status saned.service 
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~# systemctl start saned.socket   
root@p5:~# systemctl statis saned.socket  
Unknown operation statis.
root@p5:~# systemctl statuss saned.socket 
Unknown operation statuss.
root@p5:~# systemctl status saned.socket 
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Wed 2020-12-23 19:31:57 CET; 53min left
   Listen: [::]:6566 (Stream)
 Accepted: 0; Connected: 0;
    Tasks: 0 (limit: 4678)
   Memory: 28.0K
   CGroup: /system.slice/saned.socket

Dez 23 19:31:57 p5 systemd[1]: Listening on saned incoming socket.
root@p5:~# systemctl enable saned.socket
root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# systemctl start saned.socket
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# systemctl start saned.socket
root@p5:~# systemctl status saned.socket
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Wed 2020-12-23 19:31:57 CET; 49min left
   Listen: [::]:6566 (Stream)
 Accepted: 1; Connected: 0;
    Tasks: 0 (limit: 4678)
   Memory: 68.0K
   CGroup: /system.slice/saned.socket

Dez 23 19:31:57 p5 systemd[1]: Listening on saned incoming socket.
root@p5:~# systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~# 

Auf dem Client:

Code: Alles auswählen

sudo scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


https://askubuntu.com/questions/1122426 ... needed-for

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 19:35:09

Code: Alles auswählen

sudo systemctl unmask saned.socket
sudo systemctl enable saned.socket
systemctl enable saned.service

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 08:32:30

Hallo Mellinger,

eine frohes Fest wünsche ich.

Auf dem Debian 10 Server:

Code: Alles auswählen

axel@p5:~$ su -
Passwort: 
root@p5:~# scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner

root@p5:~# uname -r
4.19.0-13-amd64

root@p5:~# systemctl unmask saned.socket
root@p5:~# systemctl enable saned.socket
root@p5:~# systemctl enable saned.service
Synchronizing state of saned.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable saned
Failed to enable unit: Unit file /lib/systemd/system/saned.service is masked.

root@p5:~# scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner
root@p5:~# 
Jetzt /dev/sg2 in /dev/sg3 geändert, aktiv habe ich nichts geändert.

Auf dem Client (funktioniert ansonsten mit Debian 9, IP-Adressen identisch)

Code: Alles auswählen

sudo scanimage -L
[sudo] Passwort für axel: 

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

MfG
AxelMD
Zuletzt geändert von AxelMD am 24.12.2020 09:29:20, insgesamt 1-mal geändert.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 08:44:23

Debian 10 Image vom 21. Dezember 2020 eingespielt.

Code: Alles auswählen

scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
Jetzt ist der Scanner wieder /dev/sg2

Die /lib/udev/rules.d/60-libsane.rules ist wieder auf dem Originalzustand von Debian 10.
Es fehlt der Eintrag:

Code: Alles auswählen

# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
Wo setze ich jetzt wieder an?

Ist meine selbst ermittelt udev Regel (AxelMD udevregel) richtig? --> viewtopic.php?f=30&t=176958&start=135#p1258897

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 11:01:16

Frohe Weihnachten ebenfalls.

Du musst jetzt den saned zum Laufen bekommen. Was ist die Ausgabe von

Code: Alles auswählen

ls -l /lib/systemd/system/sane*
?

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 11:46:18

ohne Anpassung der /lib/udev/rules.d/60-libsane.rules :

Code: Alles auswählen

root@p5:~# ls -l /lib/systemd/system/sane*
lrwxrwxrwx 1 root root   9 Mär 23  2019 /lib/systemd/system/saned.service -> /dev/null
-rw-r--r-- 1 root root 309 Aug 15  2018 /lib/systemd/system/saned@.service
-rw-r--r-- 1 root root 133 Aug 15  2018 /lib/systemd/system/saned.socket
root@p5:~# 

Zusatzinfos:
systemctl status saned.socket
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; disabled; vendor preset: enabled)
   Active: inactive (dead)
   Listen: [::]:6566 (Stream)
 Accepted: 0; Connected: 0;
root@p5:~# systemctl start saned.socket
root@p5:~# systemctl status saned.socket
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; disabled; vendor preset: enabled)
   Active: active (listening) since Thu 2020-12-24 11:48:02 CET; 3s ago
   Listen: [::]:6566 (Stream)
 Accepted: 0; Connected: 0;
    Tasks: 0 (limit: 4678)
   Memory: 28.0K
   CGroup: /system.slice/saned.socket

Dez 24 11:48:02 p5 systemd[1]: Listening on saned incoming socket.




mit Anpassung der /lib/udev/rules.d/60-libsane.rules :

https://nopaste.linux-dev.org/?1326436

Zeile 85 und 86 hinzugefügt.

Reboot vom Gesamtsystem

Scannerprüfung:

Code: Alles auswählen

 scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
Frage vom User mellinger:

Code: Alles auswählen

ls -l /lib/systemd/system/sane*
lrwxrwxrwx 1 root root   9 Mär 23  2019 /lib/systemd/system/saned.service -> /dev/null
-rw-r--r-- 1 root root 309 Aug 15  2018 /lib/systemd/system/saned@.service
-rw-r--r-- 1 root root 133 Aug 15  2018 /lib/systemd/system/saned.socket
Weitere Infos:

Code: Alles auswählen

root@p5:~# systemctl start saned.service
root@p5:~# Failed to start saned.service: Unit saned.service is masked.

root@p5:~# systemctl unmask saned.socket
root@p5:~# systemctl enable saned.socket
Created symlink /etc/systemd/system/sockets.target.wants/saned.socket → /lib/systemd/system/saned.socket.
root@p5:~# systemctl enable saned.service
Synchronizing state of saned.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable saned
Failed to enable unit: Unit file /lib/systemd/system/saned.service is masked.
root@p5:~# 
Auf dem Client:
Der Scanner wird nicht gefunden.



Was sollte ich nun tun?
Zuletzt geändert von AxelMD am 24.12.2020 15:02:26, insgesamt 3-mal geändert.

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 12:44:58

Code: Alles auswählen

sudo rm /lib/systemd/system/saned.service
sudo systemctl stop saned.socket
sudo systemctl enable saned
sudo systemctl start saned
sudo systemctl status saned
Viel Erfolg,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 13:10:09

Code: Alles auswählen


 su -
Passwort: 
root@p5:~# scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner

root@p5:~# rm /lib/systemd/system/saned.service
root@p5:~# systemctl stop saned.socket
root@p5:~# systemctl enable saned
saned.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable saned
root@p5:~# systemctl start saned
root@p5:~# systemctl status saned
● saned.service - LSB: SANE network scanner server
   Loaded: loaded (/etc/init.d/saned; generated)
   Active: active (running) since Thu 2020-12-24 12:59:53 CET; 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 723 ExecStart=/etc/init.d/saned start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 4678)
   Memory: 1.5M
   CGroup: /system.slice/saned.service
           ├─731 /usr/sbin/saned -a saned
           └─732 /usr/sbin/saned -a saned

Dez 24 12:59:53 p5 systemd[1]: Starting LSB: SANE network scanner server...
Dez 24 12:59:53 p5 saned[730]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up
Dez 24 12:59:53 p5 saned[730]: do_bindings: [0] bind failed: Address already in use
Dez 24 12:59:53 p5 saned[731]: Now daemonized
Dez 24 12:59:53 p5 saned[723]: Starting SANE network scanner server: saned.
Dez 24 12:59:53 p5 systemd[1]: Started LSB: SANE network scanner server.
root@p5:~# 
 

Auf dem Client aus dem Netzwerk:

Code: Alles auswählen

sudo scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
Leider kein Erfolg. :-(

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 13:47:08

Jetzt musst Du noch die fehlende Regel wieder eintragen, in eine Datei /etc/udev/rules.d/65-libsane.rules

Code: Alles auswählen

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
Wenn Du die Regel unter /lib/udev einträgst, wird sie beim nächsten Update überschrieben.
Dann den Server neu starten.

Viel Erfolg,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 13:54:59

https://nopaste.linux-dev.org/?1326436

Das habe ich doch schon in der 60-libsane.rules getan.

Siehe nopaste, Zeile 86.

Hast Du das überlesen?

Warum jetzt in der 65-libsane.rules eintragen?

Jetzt nochmals eintragen?

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 14:38:25

Du hast geschrieben, Du hättest es wieder entfernt.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 14:43:53

viewtopic.php?f=30&t=176958&start=150#p1259236
mit Anpassung der /lib/udev/rules.d/60-libsane.rules :

https://nopaste.linux-dev.org/?1326436

Zeile 85 und 86 hinzugefügt.

Reboot vom Gesamtsystem
Das habe ich vermutlich nicht deutlich genug herausgestellt.

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 16:05:46

Code: Alles auswählen

cat /etc/sane.d/saned.conf
Sind Zugriffe aus dem lokalen Netzwerk erlaubt?

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 16:13:29

Auf dem Server Debian 10:

Code: Alles auswählen

root@p5:~# scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner


root@p5:~# cat /etc/sane.d/saned.conf
# saned.conf
# Configuration for the saned daemon

## Daemon options
# Port range for the data connection. Choose a range inside [1024 - 65535].
# Avoid specifying too large a range, for performance reasons.
#
# ONLY use this if your saned server is sitting behind a firewall. If your
# firewall is a Linux machine, we strongly recommend using the
# Netfilter nf_conntrack_sane connection tracking module instead.
#
# data_portrange = 10000 - 10100


## Access list
# A list of host names, IP addresses or IP subnets (CIDR notation) that
# are permitted to use local SANE devices. IPv6 addresses must be enclosed
# in brackets, and should always be specified in their compressed form.
#
# The hostname matching is not case-sensitive.

#scan-client.somedomain.firm
#192.168.0.1
#192.168.0.1/29
#[2001:db8:185e::42:12]
#[2001:db8:185e::42:12]/64

# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and
# /etc/services must also be properly configured to start
# the saned daemon as documented in saned(8), services(4)
# and inetd.conf(4) (or xinetd.conf(5)).
root@p5:~# 
Da scheint doch was zu fehlen.

https://wiki.ubuntuusers.de/SANE-Scanse ... _Netzwerk/
Netzwerkzugriff für Clients auf dem Host (Server) freigeben

Hinweis:

Häufige Fehlerquelle - die Rechner, die den Scanner auf dem Server verwenden wollen, müssen explizit freigegeben werden.

In der Datei /etc/sane.d/saned.conf werden mit einem Texteditor die Hostnamen eingetragen, die auf den Scanserver zugreifen dürfen.
Fehler korrigert:

Code: Alles auswählen

cat /etc/sane.d/saned.conf
# saned.conf
# Configuration for the saned daemon

## Daemon options
# Port range for the data connection. Choose a range inside [1024 - 65535].
# Avoid specifying too large a range, for performance reasons.
#
# ONLY use this if your saned server is sitting behind a firewall. If your
# firewall is a Linux machine, we strongly recommend using the
# Netfilter nf_conntrack_sane connection tracking module instead.
#
# data_portrange = 10000 - 10100


## Access list
# A list of host names, IP addresses or IP subnets (CIDR notation) that
# are permitted to use local SANE devices. IPv6 addresses must be enclosed
# in brackets, and should always be specified in their compressed form.
#
# The hostname matching is not case-sensitive.

#scan-client.somedomain.firm
#192.168.0.1
#192.168.0.1/29
#[2001:db8:185e::42:12]
#[2001:db8:185e::42:12]/64

# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and
# /etc/services must also be properly configured to start
# the saned daemon as documented in saned(8), services(4)
# and inetd.conf(4) (or xinetd.conf(5)).
192.168.178,42  # client der auf scanserver zugreifen darf 
Jetzt ein Reboot

Auf dem Client:

Code: Alles auswählen

 sudo scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
Soll ich noch mal irgendwas beim Debian 9 Stretch Server versuchen abzuschauen viewtopic.php?f=30&t=179650 ?

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 17:28:53

Da müsste eine Zeile

Code: Alles auswählen

192.168.0.0/16
vorkommen, sonst gibt es keinen Zugriff.
In beiden Versionen ist die Zeile nicht vorhanden.

Edit: Ich sehe jetzt, dass in der zweiten Version hinten folgendes steht:

Code: Alles auswählen

192.168.178,42 # ...
Das ist fast richtig, nur das Komma vor der 42 ist falsch. Da muss ein Punkt hin.
Die 192.168.0.0/16-Variante ist besser, weil sie auch noch funktioniert, wenn der Client eine andere IP-Adresse bekommt.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 18:11:26

Hallo mellinger, vielen vielen Dank.

korrigierte /etc/sane.d/saned.conf

Code: Alles auswählen

cat /etc/sane.d/saned.conf    
# saned.conf
# Configuration for the saned daemon

## Daemon options
# Port range for the data connection. Choose a range inside [1024 - 65535].
# Avoid specifying too large a range, for performance reasons.
#
# ONLY use this if your saned server is sitting behind a firewall. If your
# firewall is a Linux machine, we strongly recommend using the
# Netfilter nf_conntrack_sane connection tracking module instead.
#
# data_portrange = 10000 - 10100


## Access list
# A list of host names, IP addresses or IP subnets (CIDR notation) that
# are permitted to use local SANE devices. IPv6 addresses must be enclosed
# in brackets, and should always be specified in their compressed form.
#
# The hostname matching is not case-sensitive.

#scan-client.somedomain.firm
#192.168.0.1
#192.168.0.1/29
#[2001:db8:185e::42:12]
#[2001:db8:185e::42:12]/64

# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and
# /etc/services must also be properly configured to start
# the saned daemon as documented in saned(8), services(4)
# and inetd.conf(4) (or xinetd.conf(5)).
192.168.178.42  # client der auf Scanserver zugreifen darf 
192.168.0.0/16  # mellinger Empfehlung
Der Scanner kann am Server (LXQt Desktop) mit xsane vom User genutzt werden.

Das Scanner wird vom Client nicht gefunden.

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 24.12.2020 22:36:28

Hast Du den saned neu gestartet, nachdem Du die Datei verändert hast?

Code: Alles auswählen

sudo systemctl restart saned
Hat eventuell das Serversystem mit Debian 10 eine andere IP-Adresse als mit Debian 9? Falls ja, muss die zweite Adresse auf dem Clientsystem in die /etc/sane.d/net.conf eingetragen werden.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 25.12.2020 10:11:42

Hall mellinger,

Antwort Frage1: neu gebootet habe ich.

Antwort Frage2: Der Debian 10 Server hat die gleiche IP-Adresse wieder Debian 9 Server.

Der 1.-Weihachtsfesttest auf dem Debian 10 Server

Code: Alles auswählen

scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner

systemctl status saned.service
● saned.service - LSB: SANE network scanner server
   Loaded: loaded (/etc/init.d/saned; generated)
   Active: failed (Result: exit-code) since Fri 2020-12-25 10:01:40 CET; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 510 ExecStart=/etc/init.d/saned start (code=exited, status=1/FAILURE)

Dez 25 10:01:40 p5 saned[549]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up
Dez 25 10:01:40 p5 saned[549]: do_bindings: [1] bind failed: Address already in use
Dez 25 10:01:40 p5 saned[549]: do_bindings: [0] bind failed: Address already in use
Dez 25 10:01:40 p5 saned[549]: do_bindings: couldn't bind an address. Exiting.
Dez 25 10:01:40 p5 saned[549]: FATAL ERROR; bailing out, waiting for children...
Dez 25 10:01:40 p5 saned[549]: bail_out: all children exited
Dez 25 10:01:40 p5 saned[510]: Starting SANE network scanner server: saned
Dez 25 10:01:40 p5 systemd[1]: saned.service: Control process exited, code=exited, status=1/FAILURE
Dez 25 10:01:40 p5 systemd[1]: saned.service: Failed with result 'exit-code'.
Dez 25 10:01:40 p5 systemd[1]: Failed to start LSB: SANE network scanner server.

systemctl restart saned.service
Job for saned.service failed because the control process exited with error code.
See "systemctl status saned.service" and "journalctl -xe" for details.
journalctl -xe

Code: Alles auswählen

root@p5:~# journalctl -xe
Dez 25 10:17:05 p5 systemd[1]: saned.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit saned.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Dez 25 10:17:05 p5 systemd[1]: saned.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit saned.service has entered the 'failed' state with result 'exit-code'.
Dez 25 10:17:05 p5 systemd[1]: Failed to start LSB: SANE network scanner server.
-- Subject: A start job for unit saned.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit saned.service has finished with a failure.
-- 
-- The job identifier is 1297 and the job result is failed.
Dez 25 10:17:42 p5 wpa_supplicant[469]: wlan0: WPA: Group rekeying completed with 44:4e:6d:59:dd:6b [GT
lines 2552-2574/2574 (END)
Aus Scanner /dev/sg2 ist /dev/sg3 geworden.
Ist jetzt ein gutes Zeichen, beim funktionierenden Debian 9 Stretch System ist der Scanner auch /dev/sg3 ?

Code: Alles auswählen

getfacl /dev/sg2
getfacl: /dev/sg2: Datei oder Verzeichnis nicht gefunden

root@p5:~# getfacl /dev/sg3
getfacl: Entferne führende '/' von absoluten Pfadnamen
# file: dev/sg3
# owner: root
# group: root
user::rw-
user:sddm:rw-
group::---
group:scanner:rw-
mask::rw-
other::---

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 25.12.2020 10:33:25

Problem: Der saned.service läuft nicht.

Versuch der Problembehebung viewtopic.php?f=30&t=176958&start=150#p1259242

Code: Alles auswählen

root@p5:~# rm /lib/systemd/system/saned.service
rm: das Entfernen von '/lib/systemd/system/saned.service' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
root@p5:~# systemctl stop saned.socket
root@p5:~# systemctl enable saned
saned.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable saned
root@p5:~# systemctl start saned
root@p5:~# systemctl status saned
● saned.service - LSB: SANE network scanner server
   Loaded: loaded (/etc/init.d/saned; generated)
   Active: active (running) since Fri 2020-12-25 10:36:01 CET; 10s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 963 ExecStart=/etc/init.d/saned start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 4678)
   Memory: 1.4M
   CGroup: /system.slice/saned.service
           ├─971 /usr/sbin/saned -a saned
           └─972 /usr/sbin/saned -a saned

Dez 25 10:36:01 p5 systemd[1]: Starting LSB: SANE network scanner server...
Dez 25 10:36:01 p5 saned[970]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up
Dez 25 10:36:01 p5 saned[970]: do_bindings: [0] bind failed: Address already in use
Dez 25 10:36:01 p5 saned[971]: Now daemonized
Dez 25 10:36:01 p5 saned[963]: Starting SANE network scanner server: saned.
Dez 25 10:36:01 p5 systemd[1]: Started LSB: SANE network scanner server.

Antworten