SCIENTIFIC-LINUX-USERS Archives

November 2017

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
ToddAndMargo <[log in to unmask]>
Reply To:
ToddAndMargo <[log in to unmask]>
Date:
Tue, 21 Nov 2017 03:09:09 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (118 lines)
On 11/18/2017 02:45 AM, ToddAndMargo wrote:
> Hi All,
> 
> SL 7.4
> 
> 
> I can start /usr/sbin/saned from the command line:
> 
> /usr/sbin/saned -a saned -d128; echo $?; ps ax | grep -i [s]aned
> 0
> 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 not use the name saned\@.service due to
> a very long standing bug:
> 
> 'systemctl' does not properly run the 'start', 'restart' or 'status' for 
> a .service file containing an '@'
> https://bugzilla.redhat.com/show_bug.cgi?id=1142369
> 
> In my case it gives:
>      Failed to start [log in to unmask]: Unit name [log in to unmask] is
>      missing the instance name.
> 
> 
> So I called 'saned\@.service" "saned\@sane.service"
> 
> <code saned.socket>
> [Unit]
> Description=saned incoming socket
> 
> [Socket]
> ListenStream=6566
> Accept=yes
> MaxConnections=1
> 
> [Install]
> WantedBy=sockets.target
> </code>
> 
> 
> <code saned\@sane.service>
> [Unit]
> Description=Scanner Service
> Requires=saned.socket
> 
> [Service]
> RemainAfterExit=yes
> ExecStart=/usr/sbin/saned -a saned -s
> User=saned
> Group=saned
> # User=root
> # Group=root
> StandardInput=null
> StandardOutput=syslog
> StandardError=syslog
> Environment=SANE_CONFIG_DIR=/etc/sane.d
> # 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
> 
> [Install]
> Also=saned.socket
> <code>
> 
> 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
> ● [log in to unmask] - Scanner Service
>     Loaded: loaded ([log in to unmask]; 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[1]: Started Scanner Service.
> Nov 18 02:42:54 rn4.rent-a-nerd.local systemd[1]: Starting Scanner 
> Service...
> Nov 18 02:42:54 rn4.rent-a-nerd.local saned[31110]: 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?
> 
> 
> Many thanks,
> -T
> 
> 

Followup:

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ATOM RSS1 RSS2