Page 1 of 1

killall of a service process triggers service stop in Centos 7 ?

Posted: 2018/05/17 13:17:10
by bkannadassan
Hi All!

We have a service abc which starts a process x. We have a scenario where x process crashes, which we generate via killall. In centos 6 service abc stop was not triggered when x process was killed and we see start triggered. But in Centos 7 with the same monitrc file we see service stop is initiated and then start, which causes issue for us. Any help on the same ?.

rgds
Balaji Kamal Kannadassan

Re: killall of a service process triggers service stop in Centos 7 ?

Posted: 2018/05/17 13:20:36
by TrevorH
Are you sure you even need to use monit with CentOS 7? CentOS 7 uses systemd instead of the old style initscripts and part of systemd can restart failing services automatically.

Re: killall of a service process triggers service stop in Centos 7 ?

Posted: 2018/05/17 13:50:42
by bkannadassan
TrevorH wrote:Are you sure you even need to use monit with CentOS 7? CentOS 7 uses systemd instead of the old style initscripts and part of systemd can restart failing services automatically.
Thanks for the response, even without monit I see service stop is triggered and then start is triggered..

Re: killall of a service process triggers service stop in Centos 7 ?

Posted: 2018/05/17 16:01:12
by bkannadassan
To add some more observation if I remove ExecStop from the abc.service file. I don't see service getting stopped and started, I see service is only started.

Re: killall of a service process triggers service stop in Centos 7 ?

Posted: 2018/05/21 12:45:27
by bkannadassan
Apparently looks like even service stop is not entertained when stop is removed. Any help on this ?

Re: killall of a service process triggers service stop in Centos 7 ?

Posted: 2018/05/21 14:28:14
by bkannadassan
So in short..

I am killing a process which is the only one associated to this service. I don't want systemd to call stop and instead I want it to detect and just start. I tried below option

remove ExecStop from .service file..

But this causes issue, since I am not able to do service abc stop.

Any help on the same ?..

rgds
Balaji Kamal Kannadassan