What am I doing wrong?
# sv status sane-runit
fail: sane-runit: unable to change to service directory: file does not exist
# ln -s /etc/runit/sv/sane-runit /run/runit/service/
ln: failed to create symbolic link '/run/runit/service/sane-runit': File exists
# sv status sane-runit
fail: sane-runit: unable to change to service directory: file does not exist
# sv start sane-runit
fail: sane-runit: unable to change to service directory: file does not exist
#
sane-runit-20180226-3 is installed according to pacman.
$ LC_ALL=C pacman -Fl sane-runit # (list files owned by package sane-runit)
sane-runit etc/
sane-runit etc/runit/
sane-runit etc/runit/sv/
sane-runit etc/runit/sv/saned/ # <-- this looks like a service directory
sane-runit etc/runit/sv/saned/run # <-- with a "run" script
So instead do
sv status saned
# ^^^^^
Usually the package name for services is related to the package it provides service for (here sane so sane-utils) while the name of the service is related to the name of the actual executable used (here saned).
You obviously also have to remove the wrong link and create a new one. If you really prefer this name, nothing blocks you from creating a link to the good directory but with a different name.
Also strajder when it is an installed package you can use pacman -Ql instead which will lookup in the smaller local database.
Using 66 here, so had to use
-Fl. :P
Great, thanks.
$ pacman -Ql sane-runit
sane-runit /etc/
sane-runit /etc/runit/
sane-runit /etc/runit/sv/
sane-runit /etc/runit/sv/saned/
sane-runit /etc/runit/sv/saned/run
$ ls -l /run/runit/service/sane-runit
lrwxrwxrwx 1 root root 24 Apr 28 15:57 /run/runit/service/sane-runit -> /etc/runit/sv/sane-runit
so
# rm /run/runit/service/sane-runit
and again
# ln -s /etc/runit/sv/saned /run/runit/service/
# sv status saned
down: saned: 0s, normally up, want up
# sv start saned
timeout: down: saned: 0s, normally up, want up
# sv status saned
down: saned: 1s, normally up, want up
# sv up saned
# sv status saned
run: saned: (pid 6099) 0s
# sv status saned
down: saned: 0s, normally up, want up
and the last status is the same after reboot. Does it mean the service running is correctly now?
No (the output from sv is almost a natural language sentence). Check logs for clues on why saned refuses to start.
Also see:
https://wiki.archlinux.org/title/SANE#Troubleshooting
https://wiki.archlinux.org/title/SANE/Scanner-specific_problems
Which log do you mean I shold look into? Among these
$ ls /var/log
acpid daemon.log gssproxy pacman.PackageKit.log Xorg.0.log.old
audit daemon.log.1 kernel.log sddm.log Xorg.1.log
auth.log dbus kernel.log.1 syslog.log Xorg.1.log.old
auth.log.1 dmesg.log lastlog syslog.log.1 Xorg.2.log
btmp errors.log messages.log user.log Xorg.2.log.old
crond.log errors.log.1 messages.log.1 user.log.1
crond.log.1 everything.log old wtmp
cups everything.log.1 pacman.log Xorg.0.log
I found no current entries after attempts to start saned. The only ones I found were from recent days in
auth.log.1:
Apr 28 13:20:34 x360 polkitd[1104]: Operator of unix-session:1 FAILED to authenticate to gain authorization for action org.kde.ktexteditor.katetextbuffer.savefile for system-bus-name::1.6553 [/usr/bin/kwrite /etc/sane.d/net.conf] (owned by unix-user:art)
Apr 28 13:20:34 x360 elogind[25542]: elogind is already running as PID 1127
Apr 28 13:20:35 x360 elogind[25545]: elogind is already running as PID 1127
Apr 28 13:20:36 x360 elogind[25548]: elogind is already running as PID 1127
Apr 28 13:20:37 x360 elogind[25551]: elogind is already running as PID 1127
Apr 28 13:20:38 x360 elogind[25554]: elogind is already running as PID 1127
Apr 28 13:20:39 x360 elogind[25562]: elogind is already running as PID 1127
Apr 28 13:20:40 x360 elogind[25580]: elogind is already running as PID 1127
Apr 28 13:20:42 x360 elogind[25583]: elogind is already running as PID 1127
Apr 28 13:20:43 x360 elogind[25586]: elogind is already running as PID 1127
Apr 28 13:20:44 x360 elogind[25589]: elogind is already running as PID 1127
Apr 28 13:20:45 x360 elogind[25592]: elogind is already running as PID 1127
Apr 28 13:20:46 x360 elogind[25595]: elogind is already running as PID 1127
Apr 28 13:20:47 x360 elogind[25599]: elogind is already running as PID 1127
Apr 28 13:20:48 x360 elogind[25602]: elogind is already running as PID 1127
Apr 28 13:20:49 x360 elogind[25606]: elogind is already running as PID 1127
Apr 28 13:20:50 x360 elogind[25609]: elogind is already running as PID 1127
Apr 28 13:20:51 x360 elogind[25612]: elogind is already running as PID 1127
Apr 28 13:20:52 x360 elogind[25615]: elogind is already running as PID 1127
Apr 28 13:20:53 x360 elogind[25618]: elogind is already running as PID 1127
Apr 28 13:20:54 x360 elogind[25621]: elogind is already running as PID 1127
Apr 28 13:20:55 x360 elogind[25624]: elogind is already running as PID 1127
Apr 28 13:20:56 x360 elogind[25627]: elogind is already running as PID 1127
Apr 28 13:20:57 x360 elogind[25630]: elogind is already running as PID 1127
Apr 28 13:20:58 x360 elogind[25633]: elogind is already running as PID 1127
Apr 28 13:20:59 x360 elogind[25645]: elogind is already running as PID 1127
Apr 28 13:21:00 x360 elogind[25648]: elogind is already running as PID 1127
Apr 28 13:21:01 x360 elogind[25651]: elogind is already running as PID 1127
Apr 28 13:21:02 x360 polkitd[1104]: Operator of unix-session:1 successfully authenticated as unix-user:root to gain ONE-SHOT authorization for action org.kde.ktexteditor.katetextbuffer.savefile for system-bus-name::1.6585 [/usr/bin/kwrite /etc/sane.d/xerox_mfp.conf] (owned by unix-user:art)
Have you read the troubleshooting articles?
What does this command yield? (As root.)
egrep -lri '(sane|scanner)' /var/log 2>/dev/null
Yes. Any reason they should be helpful in problems with starting a service in artix-runit (https://wiki.artixlinux.org/Main/Runit#Basic_usage)?
# egrep -lri '(sane|scanner)' /var/log 2>/dev/null
/var/log/daemon.log.1
/var/log/everything.log.1
/var/log/auth.log.1
/var/log/messages.log.1
/var/log/pacman.log
Within these above I found only confirmations of the installation. Sending zips privately.
The issue is not with runit, we have gotten past that. The issue is with SANE itself, and, more specifically, likely with the driver for your scanner.
I also updated my previous message with the command to grep for some related terms in all the log files.
Update: Please upload the log files to some paste service, so others who might have more insight can also help.
I see your point. So you mean that saned's down status is caused by a scanner driver?
If yes, I am ready to install the driver (https://forum.manjaro.org/t/xerox-workcentre-3025-problem-with-scanner/89183/5), but postponed it till I have sorted out the problem with the service. Should I install it?
SANE needs the driver installed to work, obviously, so yes.
So if it a service is properly started but not working properly for its own reasons, I consider this part solved.