caught SIGTERM, shutting down

Guillermo

Verified User
Joined
May 20, 2006
Messages
95
Location
The Netherlands
Hello,

This morning i couldn't acces my server, after looking at the services i found httpd shut down. When i looked in the error file i found this: caught SIGTERM, shutting down
How is that possible?
Also, httpd restarts every night around 00:10am, why is that?

[Wed Aug 09 00:10:02 2006] [notice] SIGHUP received. Attempting to restart
Warning: DocumentRoot [/home/xxx/domains/xxx.com/public_html/xxx] does not exist
[Wed Aug 09 00:10:03 2006] [warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts
[Wed Aug 09 00:10:03 2006] [warn] NameVirtualHost xxx.xxx.xxx.xxx:443 has no VirtualHosts
[Wed Aug 09 00:10:03 2006] [warn] NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts
[Wed Aug 09 00:10:03 2006] [warn] NameVirtualHost xxx.xxx.xxx.xxx:443 has no VirtualHosts
[Wed Aug 09 00:10:03 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Wed Aug 09 00:10:03 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Wed Aug 09 00:10:03 2006] [notice] http server configured -- resuming normal operations
[31761] EACCELERATOR: PHP unclean shutdown on opline 405 of print_output() at /home/xxx/domains/xxx.com/public_html/xxx/xxx/xxx.php:4771

[Wed Aug 09 00:11:01 2006] [notice] caught SIGTERM, shutting down
[Wed Aug 09 00:11:02 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Wed Aug 09 00:11:02 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Wed Aug 09 00:11:02 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Aug 09 00:11:02 2006] [notice] mod_security/1.9.4 configured - Apache/2.0.58 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 mod_ssl/2.0.58 OpenSSL/0.9.7a
[Wed Aug 09 00:11:02 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Wed Aug 09 00:11:02 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Wed Aug 09 00:11:02 2006] [notice] http server configured -- resuming normal operations


Also, i get a lot of this:
[Wed Aug 09 22:44:01 2006] [warn] [client xxx.xxx.241.247] mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Wed Aug 09 22:44:01 2006] [error] [client xxx.xxx.241.247] mod_security: Warning. Pattern match "^$" at HEADER("Host") [severity "EMERGENCY"] [uri "/xmlsrv/xmlrpc.php"]
[Wed Aug 09 22:44:01 2006] [error] [client xxx.xxx.241.247] mod_security: Warning. Pattern match "^$" at HEADER("User-Agent") [severity "EMERGENCY"] [uri "/xmlsrv/xmlrpc.php"]
[Wed Aug 09 22:44:01 2006] [error] [client xxx.xxx.241.247] mod_security: Warning. Pattern match "^$" at HEADER("Accept") [severity "EMERGENCY"] [uri "/xmlsrv/xmlrpc.php"]
 
Seems like someone is trying to exploit your server:

mod_security: Warning. Pattern match "^$" at HEADER("Accept") [severity "EMERGENCY"] [uri "/xmlsrv/xmlrpc.php"]

Take a look at the /xmlsrv/xmlrpc.php file and see whats in there, may be some hack attempt.
 
Ok thanks.

But i still have the SIGTERM problem which occurs every night at 00:10

Does anybody know what the problem might be?

[Tue Aug 15 00:10:06 2006] [warn] child process 16866 still did not exit, sending a SIGTERM
[Tue Aug 15 00:10:08 2006] [warn] child process 16866 still did not exit, sending a SIGTERM
[Tue Aug 15 00:10:10 2006] [warn] child process 16866 still did not exit, sending a SIGTERM
[Tue Aug 15 00:10:12 2006] [error] child process 16866 still did not exit, sending a SIGKILL
[Tue Aug 15 00:10:13 2006] [notice] SIGHUP received. Attempting to restart
Warning: DocumentRoot [/home/xxx/xxx/xxxx/xxx/xxx] does not exist
[Tue Aug 15 00:10:14 2006] [warn] NameVirtualHost nameserver1:80 has no VirtualHosts
[Tue Aug 15 00:10:14 2006] [warn] NameVirtualHost nameserver1:443 has no VirtualHosts
[Tue Aug 15 00:10:14 2006] [warn] NameVirtualHost nameserver2:80 has no VirtualHosts
[Tue Aug 15 00:10:14 2006] [warn] NameVirtualHost nameserver2:443 has no VirtualHosts
[Tue Aug 15 00:10:14 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Tue Aug 15 00:10:14 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Tue Aug 15 00:10:14 2006] [notice] http server configured -- resuming normal operations
[Tue Aug 15 00:11:01 2006] [notice] caught SIGTERM, shutting down
[Tue Aug 15 00:11:03 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Tue Aug 15 00:11:03 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Tue Aug 15 00:11:03 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Aug 15 00:11:03 2006] [notice] mod_security/1.9.4 configured - Apache/2.0.58 (Unix) mod_perl/1.99_17-dev Perl/v5.8.5 mod_ssl/2.0.58 OpenSSL/0.9.7a
[Tue Aug 15 00:11:03 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Tue Aug 15 00:11:03 2006] [warn] RSA server certificate CommonName (CN) `www.snakeoil.dom' does NOT match server name!?
[Tue Aug 15 00:11:03 2006] [notice] http server configured -- resuming normal operations


Why does it restart every night? I don't get it.
 
I also see lots off:


[Mon Aug 21 00:11:04 2006] [notice] SIGHUP received. Attempting to restart
[Mon Aug 21 00:16:02 2006] [notice] caught SIGTERM, shutting down

It always is resuming normal operations, my server tech is looking into this at the moment, i will keep you updated
 
Huh.... getting the same thing 2-5 times daily!
What is this ??? :(

[Sun Aug 27 00:11:01 2006] [warn] child process 27042 did not exit, sending another SIGHUP
[Sun Aug 27 00:11:01 2006] [warn] child process 27043 did not exit, sending another SIGHUP
[Sun Aug 27 00:11:01 2006] [warn] child process 27044 did not exit, sending another SIGHUP
[Sun Aug 27 00:11:02 2006] [notice] SIGHUP received. Attempting to restart
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:80 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:443 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:80 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:443 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:80 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:443 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xxx:80 has no VirtualHosts
[Sun Aug 27 00:11:03 2006] [warn] NameVirtualHost 66.29.xx.xx:443 has no VirtualHosts
[Sun Aug 27 00:11:05 2006] [notice] Apache/1.3.34 (Unix) mod_jk/1.2.18 mod_ssl/2.8.25 OpenSSL/0.9.7a PHP/4.4.0 mod_perl/1.29 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Sun Aug 27 00:11:05 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Aug 27 00:11:05 2006] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sun Aug 27 00:12:00 2006] [notice] caught SIGTERM, shutting down
 
Last edited:
I get the error every time I restart apache, or after a system backup (with the built-in backup in DA). I'm going to look at it tomorrow, and if I find any solution I'll post it here.
 
For the first time in history my server didn't restart at 00:10. I didn't change anything or whatever.

Is the sigterm shutdown problem known at the DA team? There quite some people with the same problem.
 
I have the same issue on my server.
Any updates on this thread regarding solutions or causes?

Happens about 5/6 times each day.

Thanks in advance.
 
I had almost the same problem which was solved when I got the right directadmin binary. Have you installed DirectAdmin with an operating system which doesn't match the one registered for that license? If that's the case, talk to DA and change the registered OS and then download a new directadmin binary.
 
Last edited:
I'm running centos 4.3 on my server.
I'm sure i've installed the right binary.

DirectAdmin Values
Compiled for Redhat Enterprise 4.0
Server Version 1.27.5
Current Available Version 1.275000
Last Updated Tue Sep 12 21:22:24 2006
 
I found something in the directadmin cron file.

10 0 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

After the cron executes, apache restarts.
Does apache need to restart after the log files are deleted?
 
Even though this thread is a little old I would still like to reply, because I had the same problem on my webserver.

I upgraded my Apache manually from 1.3.x to 2.x. After that DA was convinced that apache was down because the process httpd was not running. No wonder: apache 2 was running as httpd2.

My solution: I renamed the binary httpd2 in /usr/local/apache2/bin to httpd en edited the script in /etc/init.d/httpd
Now the process is starting as httpd and DA and myself are satisfied.
 
Log rotation

Just FYI... the root cause of the sigterms that come at the same time of the night is your machine's log rotation script.

The question is why does it not work right with apache2 on some servers, and works fine on others.

What I have noticed is that on machines that are busy, or have too little memory, a condition occures where apache2 is not restarting.

The log rotation script is supposed to move the log file, and then tell apache to restart. Apache2 appears to take too long to exit, and the restart is attempted while there is still a lock file in place preventing it.

Other than that, it is normal for apache to be stopped and restarted by the log rotation script. But something is wrong with the apache2 scripts, or perhaps the lock file isn't removed early enough in the sequence. The script needs to be better at detecting this race condition, and overcoming it.
 
I understand this is a very old thread, but I'm experiencing the same issues right now.

Apache was down for 1 hour last night, and this is what the logs have been saying:

Code:
[Sun Mar 30 04:02:59 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a DAV/2 PHP/5.2.5 configured -- resuming normal operations
[Sun Mar 30 17:56:05 2008] [notice] child pid 23129 exit signal Segmentation fault (11)
[Mon Mar 31 00:27:08 2008] [notice] SIGHUP received.  Attempting to restart
[Mon Mar 31 00:27:22 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a DAV/2 PHP/5.2.5 configured -- resuming normal operations
[Mon Mar 31 00:44:02 2008] [notice] caught SIGTERM, shutting down
[Mon Mar 31 00:44:12 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 31 00:44:13 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a DAV/2 PHP/5.2.5 configured -- resuming normal operations
[Mon Mar 31 14:33:01 2008] [notice] caught SIGTERM, shutting down
[Mon Mar 31 14:47:06 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 31 14:47:08 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a DAV/2 PHP/5.2.5 configured -- resuming normal operations

About this box: ~300 customers, 1gb ram, dual p4 3ghz cpu's, and it used to have Apache 1.3 PHP 4 and MySQL 4 up until about two weeks ago, when we upgraded the server using DA's upgrade script.

We have ordered 4gb of memory, which should be here shortly. I'll update this post when I find out if this solves the issue. Unfortunately I was going to try pvdleek's solution but it's already named httpd instead of httpd2.

If anyone else has a solution and knows it's not the memory please let me know. Thanks!
 
Back
Top