Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Cannot get httpd to start after migration

Discussion in 'EasyApache' started by petru, May 25, 2018.

  1. petru

    petru Active Member

    Joined:
    Jul 12, 2013
    Messages:
    38
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I have a similar problem to what is shown here. Only I am running apache.

    The Background: I have just finished setting up WHM on an AWS EC2 and migrating accounts and settings from my old Physical VPS.

    Everything was fine until the migration took place and now I cannot get httpd to startup.
    I have tried everything and keep getting the same error.
    Code:
    warn [safeapacherestart] The webserver failed to resume normal operations and is not running at /usr/local/cpanel/Cpanel/HttpUtils/ApRestart.pm line 498. Apache Restart Output: Apache could not be started due to an error: The “/usr/local/cpanel/scripts/restartsrv_httpd” command (process 19155) reported error number 255 when it ended. Waiting for “httpd” to start ………Waiting for httpd,litespeed,lscgid to shutdown ... not running. ……failed. Cpanel::Exception::Services::StartError Service Status Service Error (XID yhkc4n) The “httpd” service failed to start. Startup Log May 25 08:50:33 "myip".ap-southeast-2.compute.internal systemd[1]: Starting Apache web server managed by cPanel EasyApache... May 25 08:50:33 "myip".ap-southeast-2.compute.internal restartsrv_httpd[19282]: httpd: Syntax error on line 5424 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.d/includes/post_virtualhost_global.conf: Could not open configuration file /usr/local/apache/conf/pyxsoft-check.conf: No such file or directory May 25 08:50:33 "myip".ap-southeast-2.compute.internal systemd[1]: httpd.service: control process exited, code=exited status=1 May 25 08:50:33 "myip".ap-southeast-2.compute.internal systemd[1]: Failed to start Apache web server managed by cPanel EasyApache. May 25 08:50:33 "myip".ap-southeast-2.compute.internal systemd[1]: Unit httpd.service entered failed state. May 25 08:50:33 "myip".ap-southeast-2.compute.internal systemd[1]: httpd.service failed. Log Messages May 25 08:50:33 "myip" systemd: Failed to start Apache web server managed by cPanel EasyApache. May 25 08:50:33 "myip" restartsrv_httpd: httpd: Syntax error on line 5424 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.d/includes/post_virtualhost_global.conf: Could not open configuration file /usr/local/apache/conf/pyxsoft-check.conf: No such file or directory httpd: Syntax error on line 552 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.d/includes/post_virtualhost_global.conf: Could not open configuration file /usr/local/apache/conf/pyxsoft-check.conf: No such file or directory [Fri May 25 03:51:25.690215 2018] [mpm_prefork:notice] [pid 653] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:36:52.125400 2018] [mpm_prefork:notice] [pid 653] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:36:52.089071 2018] [:notice] [pid 612] ModSecurity for Apache/2.9.2 (ModSecurity: Open Source Web Application Firewall) configured. [Fri May 25 03:33:37.693913 2018] [mpm_prefork:notice] [pid 903] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:33:37.664332 2018] [:notice] [pid 899] ModSecurity for Apache/2.9.2 (ModSecurity: Open Source Web Application Firewall) configured. [Fri May 25 03:13:29.331188 2018] [mpm_prefork:notice] [pid 28706] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:11:40.329936 2018] [mpm_prefork:notice] [pid 28706] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:09:46.077142 2018] [mpm_prefork:notice] [pid 28706] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:09:44.199706 2018] [mpm_prefork:notice] [pid 28706] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:09:39.335695 2018] [mpm_prefork:notice] [pid 28706] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:09:39.304158 2018] [:notice] [pid 28702] ModSecurity for Apache/2.9.2 (ModSecurity: Open Source Web Application Firewall) configured. [Fri May 25 03:08:47.255702 2018] [mpm_prefork:notice] [pid 27572] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:08:47.228371 2018] [:notice] [pid 27571] ModSecurity for Apache/2.9.2 (ModSecurity: Open Source Web Application Firewall) configured. [Fri May 25 03:08:18.998670 2018] [mpm_prefork:notice] [pid 26828] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:08:18.333413 2018] [mpm_prefork:notice] [pid 26828] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:08:18.305878 2018] [:notice] [pid 26827] ModSecurity for Apache/2.9.2 (ModSecurity: Open Source Web Application Firewall) configured. [Fri May 25 03:07:06.619525 2018] [mpm_prefork:notice] [pid 26241] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:07:06.591815 2018] [:notice] [pid 26240] ModSecurity for Apache/2.9.2 (ModSecurity: Open Source Web Application Firewall) configured. httpd has failed. Contact your system administrator if the service does not automagically recover. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Use of uninitialized value in lc at /usr/local/cpanel/Cpanel/ProcessInfo.pm line 61, <$proc_status_fh> chunk 1. Log: [Fri May 25 03:36:52.120750 2018] [:notice] [pid 653] mod_ruid2/0.9.8 enabled [Fri May 25 03:36:52.125400 2018] [mpm_prefork:notice] [pid 653] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:36:52.125433 2018] [core:notice] [pid 653] AH00094: Command line: '/usr/sbin/httpd' [Fri May 25 03:51:25.616644 2018] [mpm_prefork:notice] [pid 653] AH00171: Graceful restart requested, doing restart [Fri May 25 03:51:25.688871 2018] [ssl:warn] [pid 653] AH01909: proxy-subdomains-ssl-default-vhost.localhost:443:0 server certificate does NOT include an ID which matches the server name [Fri May 25 03:51:25.689559 2018] [:notice] [pid 653] mod_ruid2/0.9.8 enabled [Fri May 25 03:51:25.690215 2018] [mpm_prefork:notice] [pid 653] AH00163: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4 configured -- resuming normal operations [Fri May 25 03:51:25.690235 2018] [core:notice] [pid 653] AH00094: Command line: '/usr/sbin/httpd' [Fri May 25 05:15:02.410935 2018] [mpm_prefork:notice] [pid 653] AH00171: Graceful restart requested, doing restart httpd: Syntax error on line 552 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.d/includes/post_virtualhost_global.conf: Could not open configuration file /usr/local/apache/conf/pyxsoft-check.conf: No such file or directory
    
     
    #1 petru, May 25, 2018
    Last edited by a moderator: May 25, 2018
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,664
    Likes Received:
    69
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Syntax error on line 5424 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.d/includes/post_virtualhost_global.conf
    Syntax error on line 552 of /etc/apache2/conf/httpd.conf:

    you need to fix the syntax errors ( you have some custom settings)
    you need to figure out what they are and correct accordingly
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,672
    Likes Received:
    1,788
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The previous post is correct. It looks like you may have migrated over /etc/apache2/conf.d/includes/post_virtualhost_global.conf with entries related to a custom application or plugin that's not installed on the new server. If you decide to remove the custom entries from that file, you can rebuild the Apache configuration file after by running the following command:

    Code:
    /scripts/rebuildhttpdconf
    /scripts/restartsrv_httpd
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. petru

    petru Active Member

    Joined:
    Jul 12, 2013
    Messages:
    38
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I didn't end up fixing it last night, I couldn't even find the httpd.conf file after looking in all the right places. It was very strange. So I ended up making a new EC2 and starting again, this time making sure not to copy over the old configs, and it seems to be okay now.
    Thanks for the help guys.
     
    cPanelMichael likes this.
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,672
    Likes Received:
    1,788
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @petru,

    I'm glad to see you were able to solve the issue. Thanks for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice