Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] start service (sane-runit) (Read 1105 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] start service (sane-runit)

What am I doing wrong?

Code: [Select]
# 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.
Operating System: Artix Linux x86_64

Re: start service (sane-runit)

Reply #1
Code: [Select]
$ 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
Code: [Select]
sv status saned
#         ^^^^^

Re: start service (sane-runit)

Reply #2
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.


Re: start service (sane-runit)

Reply #4
Great, thanks.

Code: [Select]
$ 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

Code: [Select]
# rm /run/runit/service/sane-runit
and again
 
Code: [Select]
# 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?
Operating System: Artix Linux x86_64

Re: start service (sane-runit)

Reply #5
Code: [Select]
# 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

Re: start service (sane-runit)

Reply #6
Which log do you mean I shold look into? Among these
Code: [Select]
$ 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:
Code: [Select]
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)
Operating System: Artix Linux x86_64


Re: start service (sane-runit)

Reply #8
Yes. Any reason they should be helpful in problems with starting a service in artix-runit?

Code: [Select]
# 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.
Operating System: Artix Linux x86_64

Re: start service (sane-runit)

Reply #9
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.

Re: start service (sane-runit)

Reply #10
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, but postponed it till I have sorted out the problem with the service. Should I install it?
Operating System: Artix Linux x86_64


 

Re: start service (sane-runit)

Reply #12
So if it a service is properly started but not working properly for its own reasons, I consider this part solved.
Operating System: Artix Linux x86_64