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

General support questions
Post Reply
bkannadassan
Posts: 12
Joined: 2018/05/17 10:26:35

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

Post by bkannadassan » 2018/05/17 13:17:10

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

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2018/05/17 13:20:36

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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

bkannadassan
Posts: 12
Joined: 2018/05/17 10:26:35

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

Post by bkannadassan » 2018/05/17 13:50:42

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

bkannadassan
Posts: 12
Joined: 2018/05/17 10:26:35

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

Post by bkannadassan » 2018/05/17 16:01:12

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.

bkannadassan
Posts: 12
Joined: 2018/05/17 10:26:35

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

Post by bkannadassan » 2018/05/21 12:45:27

Apparently looks like even service stop is not entertained when stop is removed. Any help on this ?

bkannadassan
Posts: 12
Joined: 2018/05/17 10:26:35

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

Post by bkannadassan » 2018/05/21 14:28:14

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

Post Reply