• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Reconfiguring Apache on host failed

fearz

Regular Pleskian
Hi,

Whenever a domain is created i receive this notification via email:


Generating new Apache configuration on hostxx failed because the following error(s) occurred:

Can not restart web server:

Please fix error(s) in templates of Apache configuration and retry generating the configuration file.


Although apache does not fail, it is running...

Is there any solution/work around for that?

Plesk 10.1.1 Centos OSx86
 
Try to run

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

and check error messages.
 
Hi all,
I have the same problem in plesk panel 10.4.4 and show me this prompt

Error: New web server configuration for some domains within the marked subscriptions was not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration.
and this prompt
Error: Web server reconfiguration failed: New Apache configuration was not built.
and when i use this command
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
i got this status
[root@m0905 ~]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
PleskUtilException: '/usr/local/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443' failed with code 255.

stdout:
Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start

stderr:
Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start

file: /usr/local/psa/admin/plib/Service/Agent/Transport/Local/Exec.php
line: 98
code: 0
trace: #0 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(58): Service_Agent_Transport_Local_Exec->process(0, Object(Service_Agent_Command_Exec), Object(Service_Agent_Log), Object(Service_Agent_Transport_LocalTransaction))
#1 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(24): Service_Agent_Transport_Local->_command(0, Object(Service_Agent_Command_Exec), Object(Service_Agent_Transport_LocalTransaction), Object(Service_Agent_Log))
#2 /usr/local/psa/admin/plib/Service/Agent.php(133): Service_Agent_Transport_Local->process('de454724aac89ba...', Array, Object(Service_Agent_Log))
#3 /usr/local/psa/admin/plib/Template/Writer/Apache.php(82): Service_Agent->commit()
#4 /usr/local/psa/admin/plib/Template/Configuration/Applier.php(202): Template_Writer_Apache->restart()
#5 /usr/local/psa/admin/plib/Template/Configuration/Applier.php(117): Template_Configuration_Applier->_applyConfigurationsToServiceNode(1, Array)
#6 /usr/local/psa/admin/plib/WebServerManager/Adapter/Apache.php(125): Template_Configuration_Applier->applyConfiguration(true)
#7 /usr/local/psa/admin/plib/WebServerManager.php(311): WebServerManager_Adapter_Apache->sync()
#8 /usr/local/psa/admin/plib/api-common/Httpdmng.php(117): WebServerManager->sync()
#9 /usr/local/psa/admin/sbin/httpdmng(13): Httpdmng->__construct()
#10 {main}

2011-11-28T12:14:08+01:00 ERR (3): Apache config (13224788350.52812700) generation failed: Can not restart web server:
Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start

Can not restart web server: Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start

PleskUtilException: /usr/local/psa/admin/bin/httpdmng '--reconfigure-domains' 't
enstepiran.ir,test.softsun.ir,testradcom.ir,theschooloflife.ir,tka.ir,to
astrestourant.com,tohidy.ir,toplap.ir,tose-e-garan.com,tourpsy.com,touswoollen.c
om,tr-vahy.ir,tradecommerce.ir,trz.ir,tums87.com,uast.co,ubonline.ir,up.anzali.o
rg,upload.arshamp30.com,utg.ir,vagenet.ir,vahdatnik.ir,vakil.net,vali-asr.ir,vij
ename.com,virafan.com,vitrin.co,vivaskin.ir,vrtechnich.com,wag.ir,warlib.ir,web-
gis.ir,web-gostar.ir,web.bakhshdarizarghan.ir,webgam.ir,webiransar.com,workan.ir
,wpforblogfa.ir,xn----zmcaegl2bzdzd9ac14n.com,xn--mgbaiusd4b1hb58g6kf.com,yahuwa
.ir,yamin-id.ir,yaran79.ir,yavaranezaminbabol.com,yogatabassom.com,yones.ir,yoot
ashared.com,zamanadcenter.com,zarinrah.ir,zarrinfam.com,zolal-co.com,zoobinco.ir
' failed with message: Empty error message from utility.
file: /usr/local/psa/admin/plib/common_func.php3
line: 1047
code: 0
trace: #0 /usr/local/psa/admin/plib/common_func.php3(965): util_exec('httpdmng',
Array, Array, 'msg', NULL)
#1 /usr/local/psa/admin/plib/Os.php(17): smart_exec('httpdmng', Array, Array, 'm
sg')
#2 /usr/local/psa/admin/plib/Os.php(28): Os::exec('httpdmng', Array, 'msg')
#3 /usr/local/psa/admin/plib/api-common/Httpdmng.php(105): Os::execEx('httpdmng'
, Array)
#4 /usr/local/psa/admin/sbin/httpdmng(13): Httpdmng->__construct()
#5 {main}

Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => tenstepiran.ir,test.ir,test.softsun.ir,testradcom.ir,theschooloflife.
ir,tka.ir,toastrestourant.com,tohidy.ir,toplap.ir,tose-e-garan.com,tourpsy.com,t
ouswoollen.com,tr-vahy.ir,tradecommerce.ir,trz.ir,tums87.com,uast.co,ubonline.ir
,up.anzali.org,upload.arshamp30.com,utg.ir,vagenet.ir,vahdatnik.ir,vakil.net,val
i-asr.ir,vijename.com,virafan.com,vitrin.co,vivaskin.ir,vrtechnich.com,wag.ir,wa
rlib.ir,web-gis.ir,web-gostar.ir,web.bakhshdarizarghan.ir,webgam.ir,webiransar.c
om,workan.ir,wpforblogfa.ir,xn----zmcaegl2bzdzd9ac14n.com,xn--mgbaiusd4b1hb58g6k
f.com,yahuwa.ir,yamin-id.ir,yaran79.ir,yavaranezaminbabol.com,yogatabassom.com,y
ones.ir,yootashared.com,zamanadcenter.com,zarinrah.ir,zarrinfam.com,zolal-co.com
,zoobinco.ir
)

Details: Empty error message from utility.
[root@m0905 ~]#

please help me.
 
hello,
no i dont use bootstrapper repair
i just use this command.
[root@m0905 pp10.13.4-bootstrapper]# ./bootstrapper.sh repaire
Bootstrap setup actions for Plesk 10.13.4
Usage: ./bootstrapper.sh <prep-install|post-install|repair> [component|BASE]

how can i use this command?
 
hi again
this is a bootstrapper result

[root@m0905 pp10.13.4-bootstrapper]# ./bootstrapper.sh repaire

Bootstrap setup actions for Plesk 10.13.4

Usage: ./bootstrapper.sh <prep-install|post-install|repair> [component|BASE]

[root@m0905 pp10.13.4-bootstrapper]# ./bootstrapper.sh repair
Changing shell for popuser.
Shell not changed.
Changing shell for mhandlers-user.
Shell not changed.
===> Preparing upgrade
Stopping psa... done
psa is stopped
Stopping psa... done
===> Cumulative database upgrade has been started
===> Upgrade completed.
Reloading postfix: [ OK ]
mknod: `/var/www/vhosts/chroot/dev/null': File exists
===> Cumulative upgrade has been started
===> Upgrade completed.
Stopping psa... done
Starting psa... done
Starting xinetd service... done
Starting named service... done
Starting mysqld service... done
Starting postgresql service... not install
ed
Starting psa-spamassassin service... not install
ed
Plesk: Starting Mail Server... already started
Starting psa... done
Starting drwebd service... failed

Congratulations!
All stages of the upgrade were successful.
psa is now running on your system.
To complete the system configuration process, please proceed to URL:
https://m0905.***.com:8443/ or
https://178.***.***.5:8443/
Use 'admin' and '<YOUR ADMIN PASSWORD>' as login name and password.

Further, use the following commands to start and stop the system:
/etc/init.d/psa start and
/etc/init.d/psa stop respectively.
 
hi
after using ./bootstrapper.sh repair apache will be working fine bute we cannot use httpdmng --reconfigure-all and we will get the error again.

by the way, when we are working in plesk panel we got this error :
Error: New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration.

and some times i recive this email from the server :

Generating new Apache configuration on host <m0905.giga-dns.com> failed because the following error(s) occurred:

Can not restart web server: Service /etc/init.d/httpd failed to start
Service /etc/init.d/httpd failed to start


Please fix error(s) in templates of Apache configuration and retry generating the configuration file.
 
Last edited by a moderator:
There are bunch of KB articles regarding different reasons of error

Error: New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration.

Did you try to search it there?
 
Same Problem

I need help please. We have the same problem. This is not how expected a simple upgrade to look like. After upgrading to 10.4.4 we get this error message. An e-mail is sent advising that templates need to be adapted. The funny thing is that we have not changed any. bootsrapper.ch repair has not brought a solution either. We wasted already 10 hours support is not answering.

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
PleskUtilException: '/usr/local/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '80' '--https-port' '443' failed with code 255.

stdout:
Service /etc/init.d/apache2 failed to start
Service /etc/init.d/apache2 failed to start


stderr:
Service /etc/init.d/apache2 failed to start
Service /etc/init.d/apache2 failed to start

file: /usr/local/psa/admin/plib/Service/Agent/Transport/Local/Exec.php
line: 98
code: 0
trace: #0 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(58): Service_Agent_Transport_Local_Exec->process(0, Object(Service_Agent_Command_Exec), Object(Service_Agent_Log), Object(Service_Agent_Transport_LocalTransaction))
#1 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(24): Service_Agent_Transport_Local->_command(0, Object(Service_Agent_Command_Exec), Object(Service_Agent_Transport_LocalTransaction), Object(Service_Agent_Log))
#2 /usr/local/psa/admin/plib/Service/Agent.php(133): Service_Agent_Transport_Local->process('7384a88e7d87a7b...', Array, Object(Service_Agent_Log))
#3 /usr/local/psa/admin/plib/Template/Writer/Apache.php(82): Service_Agent->commit()
#4 /usr/local/psa/admin/plib/Template/Configuration/Applier.php(202): Template_Writer_Apache->restart()
#5 /usr/local/psa/admin/plib/Template/Configuration/Applier.php(117): Template_Configuration_Applier->_applyConfigurationsToServiceNode(1, Array)
#6 /usr/local/psa/admin/plib/WebServerManager/Adapter/Apache.php(125): Template_Configuration_Applier->applyConfiguration(true)
#7 /usr/local/psa/admin/plib/WebServerManager.php(311): WebServerManager_Adapter_Apache->sync()
#8 /usr/local/psa/admin/plib/api-common/Httpdmng.php(117): WebServerManager->sync()
#9 /usr/local/psa/admin/sbin/httpdmng(13): Httpdmng->__construct()
#10 {main}

2011-12-21T00:48:31+01:00 ERR (3): Apache config (13244249010.44677900) generation failed: Can not restart web server: Service /etc/init.d/apache2 failed to start
Service /etc/init.d/apache2 failed to start

Can not restart web server: Service /etc/init.d/apache2 failed to start
Service /etc/init.d/apache2 failed to start

PleskUtilException: /usr/local/psa/admin/bin/httpdmng '--reconfigure-domains' 'abc.com' failed with message: Empty error message from utility.
file: /usr/local/psa/admin/plib/common_func.php3
line: 1047
code: 0
trace: #0 /usr/local/psa/admin/plib/common_func.php3(965): util_exec('httpdmng', Array, Array, 'msg', NULL)
#1 /usr/local/psa/admin/plib/Os.php(17): smart_exec('httpdmng', Array, Array, 'msg')
#2 /usr/local/psa/admin/plib/Os.php(28): Os::exec('httpdmng', Array, 'msg')
#3 /usr/local/psa/admin/plib/api-common/Httpdmng.php(101): Os::execEx('httpdmng', Array)
#4 /usr/local/psa/admin/sbin/httpdmng(13): Httpdmng->__construct()
#5 {main}

Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => abc.com
)

Details: Empty error message from utility.
 
Back
Top