Spontanious shutdown of init.d service on CentOS 6/7
CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Spontanious shutdown of init.d service on CentOS 6/7
Dear members...
I run a java application on my CentOS Server. We run this via a YAJSW wrapper and we start this one up as a service.
All things look ok, but at 2 sites this service is shut down. There are no errors in the log, just a normal shutdown message in the /var/log/messages file. It looks like somebody has typed the shutdown command for this service, only the site administrator said that it was impossible.
Some applications provide their own start/stop utilities. Often because you want them to start/stop automatically on reboot you create init scripts (RHEL6) or systemd units (RHEL7) that use the app's provided utilities. This means anyone who has access to the app's provided utilities can stop the app even if it was started originally by init.d (or systemd).
What "user" runs the application in question? Who has access to become that user (e.g. in same group as that user or sudo access to su to that user)?
I know, we wrote the application ourself and also the startup and stop script. So no suprises in here.
I know that there is something like a OOM trap in Linux, but I cannot find any automated kill commands in the logfiles, which should be there if the OOM progam shuts it down.
By the way, the program has root access.
Last edited by wgroothand; 09-28-2018 at 01:21 AM.
OOM would not just "shutdown" processes. It attempts to more aggressively reclaim memory not in active use at the moment. If you're having OOM issues the main symptom would be extreme performance degradation as it steals the memory then the process that was using it claims it again ("memory flapping").
Can you post what you see in the log when this "shutdown" occurs?
When the shutdown occurs on RHEL6 in your init script are you creating a file under /var/lock/subsys at start for this service as you should? If so when you see the "shutdown" occurring is that file gone? If not then it likely isn't the init script being used to do the shutdown.
Of course there are reasons why a process might be "killed" rather than "shutdown".
Yes, I read about OOM killing processes. They also write there should be a KILL message somewhere in the logging. I cannot find a KILL message, so I do not thing an OOM is the issue. It is one server that has this issue, Other servers (customers) don't have this issue. It must be something network related or even site related. We keep monitoring. Thx for your responses by the way. Helps a lot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.