LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-26-2018, 06:21 AM   #1
wgroothand
LQ Newbie
 
Registered: Sep 2018
Posts: 3

Rep: Reputation: Disabled
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.

Has any of you had any similar experiences?

Hope you can help me.

Wilco
 
Old 09-27-2018, 03:06 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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)?
 
Old 09-28-2018, 01:20 AM   #3
wgroothand
LQ Newbie
 
Registered: Sep 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-28-2018, 09:07 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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".
 
Old 09-28-2018, 10:11 AM   #5
wgroothand
LQ Newbie
 
Registered: Sep 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
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.

Wilco
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Used to shutdown/reboot from CLI but since systemd replaced init "shutdown" cmnd broke? Beagleburt Debian 10 09-24-2019 07:49 PM
systemd service cannot recognize init.d service tankzeu Linux - Newbie 3 09-13-2018 01:47 PM
Unable to shutdown, reboot, halt, init 6, init 0 procfs Linux - Newbie 6 07-23-2012 02:58 AM
Service Shutdown and Init Setup g_goblin Solaris / OpenSolaris 1 10-29-2003 03:53 PM
Spontanious rebooting Streams Linux - Hardware 2 08-17-2002 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 08:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration