Skip to main content

httpd FAILED and recovered after 20-30min

Answered

Comments

7 comments

  • Hi,

     

    It appears there is a syntax error in the Apache configuration file based on the log output. Are there any additional errors generated if you try to rebuild the Apache configuration with the following command?

     

    /scripts/rebuildhttpdconf
    0
  • Mauro Meroni

    No:
    /scripts/rebuildhttpdconf
    Built /etc/apache2/conf/httpd.conf OK

    0
  • Hi,

     

    If you do see the issue occur again, usually rebuilding the Apache configuration with the /scripts/rebuildhttpdconf , then restarting Apache ( /scripts/restartsrv_httpd ) will resolve the issue. However, it is unusual to see repeated cases of corruption in the Apache configuration file. To confirm, were any manual edits being made to the Apache configuration on the server? If not, I'd recommend opening a ticket since access to the server would likely be required to determine the cause of the corruption.

    0
  • Mauro Meroni

    Hi, it's a fairly new WHM server, during the initial setup i had the configserver "cPanel Server Services" installed that i know includes "Apache tune and check" so it is possible that they made some edits to the default configs

     

    0
  • Hi,

     

    I'm not familiar with the "Apache tune and check" feature from CSF, but if it makes any manual changes to the Apache configuration it's possible that it caused corruption to the Apache configuration earlier. If you still see the issue happen again with this feature disabled, I'd suggest opening a ticket so this can be reviewed further.

    0
  • stAn

    I believe this issue is caused by writing and reading of httpd.conf file at once by multiple processes within cpanel system. In my case the apache config (httpd.conf) got randomly broken when "lets encrypt certificate" was renewed. (no human action at whm or cpanel at the time of downtime)

    I am experiencing this issue on both ubuntu22+cpanel as well as cloudlinux8+cpanel, but i haven't yet seen this on almalinux 9+cpanel. 

    The issue is present in cpanel for at least last 12 months and still not fixed (i.e. to fix it, the httpd.conf should be written as httpd.conf.tmp and renamed to httpd.conf after it is finished building).

    a root's cron kind of fix could be something like: 

    apachectl configtest || /scripts/rebuildhttpdconf

    Best Regards, Stan

     

    0
  • cPRex Jurassic Moderator

    stAn - do you have a server where you can reproduce this behavior?  If so, we'd be interested in taking a look, although I understand you may not be able to leave a system in the broken state very long for an investigation.

    0

Please sign in to leave a comment.