Does anyone know what the following output means?
saneuser@e3d5c83d3c5d:/xsane$ systemctl list-unit-files --type service -all
UNIT FILE STATE
apt-daily-upgrade.service static
........
saned.service masked
saned@.service indirect
.........
I am inside a docker container, running Debian buster
I want to know is saned
running, or what do I need to do to get it running.
It would seem it is not running from this
saneuser@e3d5c83d3c5d:/xsane$ ps ax | grep saned
12 pts/0 S+ 0:00 grep saned
I have the following installed
saneuser@e3d5c83d3c5d:/xsane$ dpkg -l | grep sane
ii libsane:amd64 1.0.27-3.2 amd64 API library for scanners
ii libsane-common 1.0.27-3.2 all API library for scanners -- documentation and support files
ii libsane-dev:amd64 1.0.27-3.2 amd64 API development library for scanners [development files]
ii libsane-hpaio:amd64 3.18.12+dfsg0-2 amd64 HP SANE backend for multi-function peripherals
ii sane-utils 1.0.27-3.2 amd64 API library for scanners -- utilities
ii xsane 0.999-6+b1 amd64 featureful graphical frontend for SANE (Scanner Access Now Easy)
ii xsane-common 0.999-6 all xsane architecture independent files
Normally in Debian, if I install xsane
the daemon would be started?
Why not in the container?
I feel that maybe saned
is still under sysVinit rather than systemd.
In /etc/init.d there is
saneuser@e3d5c83d3c5d:/etc/init.d$ ls
avahi-daemon cups-browsed hwclock.sh saned x11-common
cups dbus procps udev
and there is a link in /etc/rc6.d
saneuser@e3d5c83d3c5d:/etc$ ls -l rc6.d
total 0
lrwxrwxrwx 1 root root 22 Jan 8 16:01 K01avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 22 Jan 8 16:01 K01cups-browsed -> ../init.d/cups-browsed
lrwxrwxrwx 1 root root 20 Dec 18 11:00 K01hwclock.sh -> ../init.d/hwclock.sh
lrwxrwxrwx 1 root root 15 Jan 8 15:59 K01saned -> ../init.d/saned
lrwxrwxrwx 1 root root 14 Jan 8 15:59 K01udev -> ../init.d/udev
So does that mean saned
is being started by sysVinit?
If so, why is it not running?
I think it is sysVinit , because I get this
saneuser@e3d5c83d3c5d:~$ systemctl start saned
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
OK so lets try and start it with sysVinit
saneuser@e3d5c83d3c5d:~$ service saned start
[....] Starting SANE network scanner server: sanedsaned[38]: saned (AF-indep+IPv6) from sane-backends 1.0.27 starting up
saned[38]: do_bindings: [0] bind failed: Address already in use
saned[39]: Now daemonized
saned[39]: Could not write PID file: Permission denied
saned[40]: saned_avahi: failed to create client: Daemon not running
. ok
There are some problems because I am not root in the container, but it seemed to something
saneuser@e3d5c83d3c5d:~$ ps ax | grep sane
39 ? Ss 0:00 /usr/sbin/saned -a saned
59 pts/0 S+ 0:00 grep sane
``
Lets see if it helps.... I am trying to drive the scanner
saneuser@e3d5c83d3c5d:~$ scanimage -L
dbus[60]: arguments to dbus_connection_send() were incorrect, assertion āconnection != NULLā failed in file ā¦/ā¦/ā¦/dbus/dbus-connection.c line 3316.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
That is more than scanimage normally says
Here is the normal response when it cant connect
$ 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).
So there is progress, but I think startind saned as a normal user only did half a job.
So why would Debian in a docker container not use systemd?
The Debian base image I am using is
`FROM debian:buster-slim`
so it is a cut down Debian.
Maybe they removed systemd?
It would seem there are no daemons at all running
saneuser@e3d5c83d3c5d:/etc$ ps ax
PID TTY STAT TIME COMMAND
1 pts/0 Ss 0:00 /bin/bash
39 ? Ss 0:00 /usr/sbin/saned -a saned
109 pts/0 R+ 0:00 ps ax
Only the saned that I started by hand.
So maybe I learnt something..... docker base images do
not start any services.