[systemd-devel] Started process not attach to its related service.
Benoit SCHMID
Benoit.Schmid at unige.ch
Tue Nov 22 10:55:48 UTC 2016
Hello,
I have tried with
"User=oracle","Environment=ORACLE_HOME=/oracle/XXX/12102" and removing
the "su -".
You are right.
Now I have:
# systemctl status ora_lsnr_XXX.service
● ora_lsnr_XXX.service - Oracle Listener XXX
Loaded: loaded (/etc/systemd/system/ora_lsnr_XXX.service; disabled;
vendor preset: disabled)
Active: active (running) since Tue 2016-11-22 11:49:13 CET; 5min ago
Process: 22841 ExecStart=/oracle/XXX/12102/bin/lsnrctl start
LISTENER_XXX (code=exited, status=0/SUCCESS)
Main PID: 22843 (tnslsnr)
CGroup: /system.slice/ora_lsnr_XXX.service
└─22843 /oracle/XXX/12102/bin/tnslsnr LISTENER_XXX -inherit
Thanks for you help on this point.
On 11/22/2016 10:29 AM, Andrei Borzenkov wrote:
> On Tue, Nov 22, 2016 at 11:39 AM, Benoit SCHMID <Benoit.Schmid at unige.ch> wrote:
> ...
>> 2. This service starts /etc/rc.d/init.d/sap start.
>> % cat /etc/rc.d/init.d/sap
>> #!/bin/bash
>> ...
>> case "$1" in
>> start)
>> # Oracle listener and instance startup
>> echo -n "Starting Oracle Listener: "
>> su - $ORA_OWNR -c "env ORACLE_HOME=/oracle/XXX/12102
>> /oracle/XXX/12102/bin/lsnrctl start LISTENER_XXX"
> ...
>> Why is the processed attached to user-xxxx.slice instead of sap?
> Because "su" opens new session with logind, so everything it does
> belongs to this user session. You should really use proper systemd
> unit and set User and Group for it instead.
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Benoit Schmid Tel: (+41-22) 379-7209
University of Geneva - Information Technology Division
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
More information about the systemd-devel
mailing list