Jul 13, 2016
16
1
3
Toronto
cPanel Access Level
Root Administrator
Hi guys,

Apache keeps restarting gracefully and I don't know why!

Here is a snippet from the logs:
Jul 13 14:52:49 2016] [error] [client 98.221.10.74] File does not exist: /usr/local/apache/htdocs/405.shtml
[Wed Jul 13 14:52:49 2016] [error] [client 98.221.10.74] File does not exist: /usr/local/apache/htdocs/405.shtml
[Wed Jul 13 15:12:29 2016] [error] [client 24.15.14.95] File does not exist: /usr/local/apache/htdocs/favicon.ico, referer:
[Wed Jul 13 16:03:28 2016] [notice] Graceful restart requested, doing restart
[Wed Jul 13 16:03:28 2016] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed Jul 13 16:03:28 2016] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed Jul 13 16:03:28 2016] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.0-fips mod_bwlimited/1.4 configured -- resuming normal operations
[Wed Jul 13 16:03:40 2016] [error] [client 100.0.82.196] File does not exist: /usr/local/apache/htdocs/405.shtml
[Wed Jul 13 16:03:40 2016] [error] [client 100.0.82.196] File does not exist: /usr/local/apache/htdocs/405.shtml

This happens almost every 2 hours or randomly. Sometimes it goes hours without restarting. It looks like it started happening 5 days ago.

Attached is a pic of my memory usage. I don't think it's that. I've enabled piped logs after reading about it here.

Can you guys point me in the right directin?
 
Jul 13, 2016
16
1
3
Toronto
cPanel Access Level
Root Administrator
Thanks Michael!

Informative. Just one question though. I hadn't been on WHM in months and this all of a suddenly started happening on the 8th. I enabled piped logging after reading a few posts here (somehow I missed the one you linked, apologies) and it still restart last night at midnight. Shouldn't it have not restarted last night? I enabled piped logging yesterday evening.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Thanks Michael!

Informative. Just one question though. I hadn't been on WHM in months and this all of a suddenly started happening on the 8th. I enabled piped logging after reading a few posts here (somehow I missed the one you linked, apologies) and it still restart last night at midnight. Shouldn't it have not restarted last night? I enabled piped logging yesterday evening.
Hello,

You will also notice Apache restarts when a cPanel or WHM user performs a change that involves modifying the httpd.conf file (e.g. adding/removing addon or subdomains). Or, in some cases, you may notice this with automatic package updates on EasyApache 4. Keep in mind that "Graceful Restarts" are generally accepted and don't result in downtown. There's documentation from Apache that explains this:

https://httpd.apache.org/docs/current/stopping.html

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
You can review the YUM log at:

/var/log/yum.log

You can also check the the cPanel update log with a command such as:

Code:
grep restartsrv_httpd /var/cpanel/updatelogs/*
An entry like this is normal during cPanel updates:

Code:
*** Running updateuserdomains ***
*** Done updateuserdomains ***
*** Running apache_conf_distiller ***
Distilled successfully
*** Done apache_conf_distiller ***
*** Running build_apache_conf ***
Built /usr/local/apache/conf/httpd.conf OK
*** Done build_apache_conf ***
*** Running restartsrv_httpd ***
Waiting for “httpd” to restart ………waiting for “httpd” to initialize ………finished.
Thank you.
 
Jul 13, 2016
16
1
3
Toronto
cPanel Access Level
Root Administrator
Hi,

So I get permission denied when running those commands. I can't even sudo them. Where in WHM or cpanel are the user accounts listed? I need to change password on root as I don't know it.

Thanks,
Pedro
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

Are you sure that you are reviewing /var/log/yum.log with a command such as "cat" instead of simply entering the path to the log file? For instance, you would view a log file like this with a command such as:

Code:
cat  /var/log/yum.log
Your request for root access assistance is handled on the following thread:

Root Access

Thank you.
 
Jul 13, 2016
16
1
3
Toronto
cPanel Access Level
Root Administrator
So no entries in the yum.log for that string Michael!

Is there any other logs I should be checking? The restarts only started to happen around July 8th, just curious as to what changed as I certainly did not log into it WHM/Cpanel and make changes.

..and thank you very much for your help, it's been great!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
So no entries in the yum.log for that string Michael!

Is there any other logs I should be checking? The restarts only started to happen around July 8th, just curious as to what changed as I certainly did not log into it WHM/Cpanel and make changes.

..and thank you very much for your help, it's been great!
Were you able to check the cPanel update logs referenced in the earlier post to this thread?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Keep in mind the Apache restarts are by design. It's likely a subdomain was added, or some other normal action resulted in the restart. Feel free to open a support ticket using the link in my signature so we can take a closer look and determine which action resulted in the graceful restart. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 
Jul 13, 2016
16
1
3
Toronto
cPanel Access Level
Root Administrator
Hmm, I don't have any of those type of accounts, I don't think.

It's not restarting any longer (except at midnight which is fine) so the problem is solved. I just wanted to know why it started doing it all of a sudden. I'll wait until it happens again.

THank you very much for your help Michael, really appreciate it.
 
  • Like
Reactions: cPanelMichael