All services stopped - signal TERM received

roblin

Verified User
Joined
Oct 22, 2009
Messages
20
In some occasions, all the services of the server (including ssh) stop.

It happens arbitrarily and when checking the logs, the only suspicious thing I find is located in the log DirectAdmin (/var/log/directadmin/system.log), where I find the following message:

...
2014:06:20-10:42:01: httpd reloaded
2014:06:20-10:42:05: signal TERM received. Waiting for children to exit
2014:06:20-10:42:05: Clean shutdown successful
...

It happens when restarting Apache, but not always.

Any ideas?
 
That basically means that a SIGTERM (default signal from kill) was used to terminate the parent Apache process. That is normally how Unix/Linux would stop a process.
 
For clarificaiton, the TERM signal is sent to all running processes when the server is shut down, and then any processes still running are forced to stop with the SIGKILL signal.

On many systems this is controlled by the contents of the files in the /etc/rc.d/* directory paths.

Either signal can be sent to a running process this way:

To send the TERM signal, from the command line:
Code:
kill 1234
where 1234 is replaced by the PID of the process you want to receive the TERM signal.

To send the KILL signal from the command line:
Code:
kill -9 1234
where 1234 is replaced by the PID of the process you want to receive the KILL signal.

If you want to kill all proceses of a given daemon, you can instead use:
Code:
killall DAEMONNAME
or
Code:
killall -9 DAEMONNAME
Jeff
 
If it's a VPS then you might need to check it with your hosting company. They might have issues on their master node. Normally your services should run OK, unless they are stopped from inside (vps) or outside (master node).
 
Back
Top