• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Apache not starting

pointblank

New Pleskian
Hi Everyone,

Before I post my question, please be aware that I am not very familiar with this stuff so please be gentle with me!

I have my store website hosted on Debian OS 8.11 with Plesk Onyx 17.8.11. I got a warning from Jetpack that my website was down so I tried to load it and got a 502 bad gateway error.

When I logged into Plesk, I see this message:

"New configuration files for the Apache web server were not created due to the errors in configuration templates: Can not restart web server: . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter"

I try generating new configuration files but no success. I then get this email in my inbox.

Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0

I am not sure what to do next..Please help!

Thanks in advance.
 
Hi AYamshanov,

I ran the following commands from the KB and tried to rebuild the configuration files and got error below.

root@stock:~# cp -p /opt/psa/admin/sbin/pleskrc /opt/psa/admin/sbin/pleskrc.back
root@stock:~# sed -i 's/systemctl/systemctl_pp/g' /opt/psa/admin/sbin/pleskrc
root@stock:~# systemctl restart apache2.service

Unable to configure the web server: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-all ) Details: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-domains [1] => vanitynailbar.ca ) Details: [2018-08-22 10:44:08.765] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081'] with exit code [255] [2018-08-22 10:44:11.294] ERR [panel] Apache config (15349487170.55998200) generation failed: Template_Exception: Can not restart web server: file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php line: 109 code: 0 Can not restart web server:

Going thru the comments of the KB, I see a suggestion to run the Plesk installler update and repair installation. Unfortunately, it failed too and here is the important part from the repair log.

Warning: web server configuration is broken. We will try to repair it. This operation can take a lot of time, please do not interrupt the process.
Unable to rebuild web server configuration, possible there are broken domains
Trying to reconfigure web-server configurations skipping broken domains... Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => vanitynailbar.ca
[2] => -skip-broken
)

Details: [2018-08-22 10:57:07.085] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081'] with exit code [255]
[2018-08-22 10:57:08.281] ERR [panel] Apache config (15349496740.32881400) generation failed: Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
[2018-08-22 10:59:40.883] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081'] with exit code [255]
Can not restart web server:


I have already contacted Plesk Support 24 hours ago but no response yet...sheesh.
 
Hi,

Currently, we don't have any ticket backlog, thus it was strange for me to hear there is no reply yet. I did some research and found that the ticket was created by your hosting provider. Support requested additional information to check what's going on, but never got a reply back.

I see that the website mentioned in error currently works, so I assume problems solved, however, if not I recommend to check what is inside Apache log:
less /var/log/apache2/error.log

"Can not restart web server" error is very general so checking log for details might help, using that additional symptom you may search through our knowledgebase to solve the issue.

p.s. If you want to be able to contact Plesk support directly, consider the below options:
How to get technical support for Plesk?
 
Hi,

Currently, we don't have any ticket backlog, thus it was strange for me to hear there is no reply yet. I did some research and found that the ticket was created by your hosting provider. Support requested additional information to check what's going on, but never got a reply back.

I see that the website mentioned in error currently works, so I assume problems solved, however, if not I recommend to check what is inside Apache log:
less /var/log/apache2/error.log

"Can not restart web server" error is very general so checking log for details might help, using that additional symptom you may search through our knowledgebase to solve the issue.

p.s. If you want to be able to contact Plesk support directly, consider the below options:
How to get technical support for Plesk?

Hi Anton,

My original ticket was created by OVH on 08/21 and I sent them an email yesterday asking for an update and I got this response:

Screenshot
km19ti


I changed the DNS to point to a second host that I used in the past for the website so yes it is currently up but it is 3 months old so it is dated and missing 3 months worth of customer data.

This is state of my current website :

Screenshot
km1c3v


Here is the content of the Apache error log:

Code:
[Wed Aug 22 10:57:09.266262 2018] [unique_id:alert] [pid 616] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 10:58:25.267790 2018] [unique_id:alert] [pid 1378] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 12:07:33.300368 2018] [unique_id:alert] [pid 9205] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 12:08:37.024397 2018] [unique_id:alert] [pid 9957] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 13:21:25.578038 2018] [unique_id:alert] [pid 932] (EAI 3)Temporary failure in name resolution: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 13:48:51.037153 2018] [unique_id:alert] [pid 2931] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 13:49:55.213793 2018] [unique_id:alert] [pid 3741] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 15:09:56.082788 2018] [unique_id:alert] [pid 5764] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
[Wed Aug 22 15:10:59.508734 2018] [unique_id:alert] [pid 6496] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "stock.ovh"
AH00016: Configuration Failed
 
Yes I found that article after I posted and the results is that everything is good to go!

Thank you for your support and guidance to finding the solution.
 
Back
Top