[sane-devel] Saned systemd issues
ToddAndMargo at zoho.com
Tue Nov 21 11:07:33 UTC 2017
On 11/18/2017 02:48 AM, ToddAndMargo wrote:
> Hi All,
> Scientific Linux 7.4 (RHEL Clone based on CentOS)
> # rpm -qa sane-backends
> I can start /usr/sbin/saned from the command line:
> /usr/sbin/saned -a saned -d128; echo $?; ps ax | grep -i [s]aned
> 29857 ? Ss 0:00 /usr/sbin/saned -a saned -d128
> But not from my systemd scripts, which I picked up from
> "man saned".
> Note that I can use the name saned\@.service name due to
> a very long standing bug:
> 'systemctl' does not not properly run the 'start', 'restart' or 'status' for
> a .service file containing an '@'
> In my case it gives:
> Failed to start saned at .service: Unit name saned at .service is
> missing the instance name.
> So I called 'saned\@.service" "saned\@sane.service"
> <code saned.socket>
> Description=saned incoming socket
> <code saned\@sane.service>
> Description=Scanner Service
> ExecStart=/usr/sbin/saned -a saned -s
> # User=root
> # Group=root
> # If you need to debug your configuration uncomment the next line and
> # change it as appropriate to set the desired debug options
> Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5
> Error message is
> # systemctl daemon-reload; systemctl stop saned.socket; systemctl stop
> saned\@sane.service; systemctl start saned.socket; systemctl start
> saned\@sane.service; systemctl -l status saned\@sane.service; ps ax |
> grep [s]aned
> ● saned at sane.service - Scanner Service
> Loaded: loaded (/etc/systemd/system/saned at sane.service; indirect;
> vendor preset: disabled)
> Active: active (exited) since Sat 2017-11-18 02:42:54 PST; 46ms ago
> Process: 31110 ExecStart=/usr/sbin/saned (code=exited, status=0/SUCCESS)
> Main PID: 31110 (code=exited, status=0/SUCCESS)
> Nov 18 02:42:54 rn4.rent-a-nerd.local systemd: Started Scanner Service.
> Nov 18 02:42:54 rn4.rent-a-nerd.local systemd: Starting Scanner
> Nov 18 02:42:54 rn4.rent-a-nerd.local saned: saned
> (AF-indep+IPv6) from sane-backends 1.0.24 starting up
> ps command is empty
> How do I troubleshoot this?
> Why did it succeed and exit?
> And were are the logs for 'Environment=SANE_DEBUG_DLL=255
> Many thanks,
saned\@.service was the correct name
I was starting the wrong service. I should have started:
# systemctl enable saned.socket (one time only)
# systemctl -l start saned.socket
Plus, my version of sane-backends, does not have systemd
support compiled in.
Computers are like air conditioners.
They malfunction when you open windows
More information about the sane-devel