This morning I woke up to one of my servers not responding to SSL, immediately my thoughts went to expired certificates – I checked and found I had 2 months left on contract, I took the time to renew, just in case. I then went back to the WHM Manager and reconfigured Apache – even so far as reinstalling but still the message “httpd failed to start please contact your sysadmin” continued.
As most Linux Geeks, I attempted to read logs – but nothing to be found. There’s nothing worse than not having a problem physically eminent on logs. After hours of basic linux commands through various Apache and cPanel logs: grep, tail etc… I was unable to locate the root of this issue. I manually started Apache from the command line and all went well – except there was still no SSL. ARGH!!
/usr/sbin/httpd configtest
Showed no errors, everything loaded fine. I went back to the WHM and reinstalled RPM packages – sat out the 20 minutes and still no SSL. httpd continued to fail on restart.
From here, it was evident that my httpd.conf was configured correctly – proof: Web Pages Loaded. SSL was the problem, and therefore I decided to shut down the ssl portion of Apache and try to debug from there. First I had to find the PID:
ps aux | grep httpd
What you are looking for here, is the PID for the SSL Apache Server. It’s easy to find this among all the other httpd lines. Simply look for the Ss.
kill -9 PID
I restarted this portion of the Apache Server
/usr/sbin/httpd sslstart
File Size Exceeds Limit…
Ah huh! Let’s find that offending file…
du -h /usr/local/apache/domlogs/*
This returned multiple files, at which 2 were way over 4 G. I issued the following commands for both files.
rm domainname.ssl_data_log
Restarted apache using the WHM: httpd restarted
So how do I avoid this in the future? I decided to alter my domain template by removing the ssl log file. This file is unnecessary in my opinion – never use it, and doubt I will require it any other time.
vim /usr/local/cpanel/etc/httptemplates/apache1/ssldefault
Found the line for ssl_data_log and removed it.
cd /usr/local/apache/domlogs
rm *ssl_data_log
Restarted apache with peace of mind – of course, this is until WHM automatic update decides to rewrite my ssldefault file – but for now, I get to sleep comfortably.
The contents of domlogs should be rotated by cPanel automatically to curb the issues that arise when logs grow to over 2G in size. If this is not happening, you may want to let our technical analysts take a look at that for you: http://tickets.cpanel.net/submit
Thanks David, I have a message out to our main SysAdmin on the issue – I’m sure he’ll handle it on his end if necessary. Any reason on why there are no log reports on this?