• 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

Error: New files of configuration for Apache web server were not built

burnley

Regular Pleskian
Plesk 10.3.1, CentOS 5.7

I keep getting the following error in the panel, it's also logged in /var/log/sw-cp-server/error_log and /usr/local/psa/admin/logs/panel.log:
2011-10-05T11:05:01+11:00 ERR (3): 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 <a href="/admin/subscription/webserver-configuration-rebuild/?returnUrl=%2Fhome%2Fadmin">here</a> to retry generating configuration.
I can't tell where the error is exactly because there's no email sent to the admin account. Previously I could fix the same error on another 10.3.1 server after running /usr/local/psa/admin/bin/httpdmng --reconfigure-all but this time didn't work.
Where can I look to get more information about what's exactly wrong with the existing templates?
 
It appears to be related to an DB inconsistency in one of the tables storing aps data. I found one domain that's possibly causing this problem. When I go to control panel for that domain, then click on Applications -> Manage Installed Applications -> Wordpress (which the only one installed) I get the following error and stack trace:

Internal error: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)
Message SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)
File /usr/local/psa/admin/plib/Zend/Db/Statement/Pdo.php
Line 238
Type Zend_Db_Statement_Exception
Stack trace #0 /usr/local/psa/admin/plib/Zend/Db/Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/local/psa/admin/plib/Zend/Db/Adapter/Abstract.php(433): Zend_Db_Statement->execute(Array)
#2 /usr/local/psa/admin/plib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Table_Select), Array)
#3 /usr/local/psa/admin/plib/Zend/Db/Table/Abstract.php(1335): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Table_Select))
#4 /usr/local/psa/admin/plib/Zend/Db/Table/Abstract.php(1163): Zend_Db_Table_Abstract->_fetch(Object(Zend_Db_Table_Select))
#5 /usr/local/psa/admin/plib/Db/Table/Abstract.php(141): Zend_Db_Table_Abstract->fetchAll('`registryUid` =...')
#6 /usr/local/psa/admin/smb/application/library/Smb/Db/Table/Broker/ApsPackageUpdates.php(196): Db_Table_Abstract->findByFields(Array)
#7 /usr/local/psa/admin/plib/CommonPanel/Aps/Update/Searcher.php(127): Smb_Db_Table_Broker_ApsPackageUpdates->getPackageUpdate(Object(Smb_Db_Table_Row_ApsPackage), false)
#8 /usr/local/psa/admin/smb/application/library/Smb/Db/Table/Row/ApsInstance.php(256): CommonPanel_Aps_Update_Searcher::getUpdatePackage('5aa7d5da-a913-4...')
#9 /usr/local/psa/admin/smb/application/controllers/ServiceController.php(54): Smb_Db_Table_Row_ApsInstance->getUpdateInfo(Object(Smb_Plesk_Bridge_Aps_Catalog))
#10 /usr/local/psa/admin/plib/Zend/Controller/Action.php(503): ServiceController->indexAction()
#11 /usr/local/psa/admin/plib/Zend/Controller/Dispatcher/Standard.php(285): Zend_Controller_Action->dispatch('indexAction')
#12 /usr/local/psa/admin/plib/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /usr/local/psa/admin/smb/application/library/Smb/Application/Web.php(50): Zend_Controller_Front->dispatch(NULL)
#14 /usr/local/psa/admin/smb/application/public/index.php(15): Smb_Application_Web->run()
#15 {main}

Code fragment #233: } else {
#234: return $this->_stmt->execute();
#235: }
#236: } catch (PDOException $e) {
#237: ;// require_once 'Zend/Db/Statement/Exception.php';
#238: throw new Zend_Db_Statement_Exception($e->getMessage());
#239: }
#240: }
#241:
#242: /**

Also, if I run /usr/local/psa/bin/site --info <domain> I get:
PHP Notice: Undefined variable: locale; File: /usr/local/psa/admin/plib/report/ApsReportSection.php, Line: 66

Error report was sent successfully
Report body:
<?xml version="1.0"?>
<error><type>Exception</type><message>PHP Notice: Undefined variable: locale; File: /usr/local/psa/admin/plib/report/ApsReportSection.php, Line: 66
</message><file>/usr/local/psa/admin/smb/application/library/Smb/Exception/Syntax.php</file><line>55</line><code>0</code><trace>#0 /usr/local/psa/admin/plib/report/ApsReportSection.php(66): Smb_Exception_Syntax::handleError(8, 'Undefined varia...', '/usr/local/psa/...', 66, Array)
#1 /usr/local/psa/admin/plib/report/class.DomainReport.php(750): report_ApsReportSection::get(655)
#2 /usr/local/psa/admin/plib/report/class.Report.php(281): DomainReport-&gt;make_report_full_siteapps_()
#3 /usr/local/psa/admin/plib/api-common/AbstractCuDomain.php(1022): Report-&gt;make_report(655)
#4 /usr/local/psa/admin/plib/api-common/cuDomain.php(958): AbstractCuDomain-&gt;_cmdInfo('admark.com.au')
#5 /usr/local/psa/admin/plib/api-common/AbstractCuExecutor.php(21): cuDomain-&gt;__construct()
#6 /usr/local/psa/admin/plib/api-common/CuExecutor.php(29): AbstractCuExecutor-&gt;_execUtil('cuDomain', NULL)
#7 /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php(18): CuExecutor-&gt;run()
#8 /usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php(43): CliUtilityRunner-&gt;run()
#9 /usr/local/psa/admin/plib/api-cli/domain.php(4): require_once('/usr/local/psa/...')
#10 {main}</trace><user-ip/><host/><request-url/><request-method/><product-version>10.3.1 CentOS 5 1013110726.09
</product-version></error>

<pre>PHP Notice: Undefined variable: locale
Line: 66
File: /usr/local/psa/admin/plib/report/ApsReportSection.php
Stack Trace:
#0 Smb_Exception_Syntax::handleError(8, Undefined variable: locale, /usr/local/psa/admin/plib/report/ApsReportSection.php, 66, Array ([domainId] => 655,[registryApplicationsIds] => Array ([0] => 5aa7d5da-a913-42b5-a04f-209cb1a82886),[report] => Array (),[registryApplicationId] => 5aa7d5da-a913-42b5-a04f-209cb1a82886,[registryApplication] => APS_Registry_Application Object ([_cPtr] => Resource id #336,[] => Array ()),[ctx] => Apspp_Hosting_Context_Site Object ([] => 655,[] => hosting,[] => ,[] => 0,[] => Apspp_Hosting_ResourceBrokerFactory Object ([] => Array ([aps.environment] => Apspp_Hosting_ResourceBroker_Environment Object ([] => Apspp_Hosting_Context_Site Object ( *RECURSION*,[] => Zend_Log Object ([] => Array ([0] => EMERG,[1] => ALERT,[2] => CRIT,[3] => ERR,[4] => WARN,[5] => NOTICE,[6] => INFO,[7] => DEBUG),[] => Array ([0] => Zend_Log_Writer_Stream Object ([] => Resource id #55,[] => Array (),[] => Zend_Log_Formatter_Simple Object ([] => %timestamp% %priorityName% (%priority%): %message%
)),[1] => Zend_Log_Writer_Stream Object ([] => Resource id #75,[] => Array (),[] => Zend_Log_Formatter_Simple Object ([] => %timestamp% %priorityName% (%priority%): %message%
[...]
called at [/usr/local/psa/admin/plib/report/ApsReportSection.php:66]
#1 report_ApsReportSection::get(655) called at [/usr/local/psa/admin/plib/report/class.DomainReport.php:750]
#2 DomainReport->make_report_full_siteapps_() called at [/usr/local/psa/admin/plib/report/class.Report.php:281]
#3 Report->make_report(655) called at [/usr/local/psa/admin/plib/api-common/AbstractCuDomain.php:1022]
#4 AbstractCuDomain->_cmdInfo(admark.com.au) called at [/usr/local/psa/admin/plib/api-common/cuDomain.php:958]
#5 cuDomain->__construct() called at [/usr/local/psa/admin/plib/api-common/AbstractCuExecutor.php:21]
#6 AbstractCuExecutor->_execUtil(cuDomain, ) called at [/usr/local/psa/admin/plib/api-common/CuExecutor.php:29]
#7 CuExecutor->run() called at [/usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php:18]
#8 CliUtilityRunner->run() called at [/usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php:43]
#9 require_once(/usr/local/psa/admin/plib/api-cli/CliUtilityRunner.php) called at [/usr/local/psa/admin/plib/api-cli/domain.php:4]

Shell exit code is 1. I intentionally stripped "site --info" trace output because it contains some data that can't be publicly disclosed, but I can provide the complete trace if needed by Parallels developers.
How can I submit this as a bug?
 
More info: I found more domains for which "/usr/local/psa/bin/site --info <domain>" crashes. All these domains have DB entries in a table called apsResourcesParameters, which is consistent with what the stack trace displays. From my initial tests the domains that don't appear in this table don't crash '/usr/local/psa/bin/site' command.
 
(On behalf of burnley user)

Update: we were able to fix the issue with Parallel's tech support team. It proved to be quite a convoluted issue which required fiddling with the database. Since the solution was very particular to our environment we decided to not post it here on the forum.
Regards
 
I'm having this issue too, can you post the solution that worked for you please?
Hi, I'd suggest you should contact Parallels tech support, they're pretty good at dealing with these types of issues. I wouldn't post the solution that 'worked for me'(TM), it may or may not work for other setups and you, or someone else reading this post, could lose data (or cause major database stuff-up) if blindly following the steps, in which case neither me, nor Parallels for that matter, should be held liable for any data loss.
Again, sorry for not publishing the solution, but I repeat: the fix involved some significant work on the psa and APS databases (hint!).
I hope you'll be able to fix your problem quickly, good luck!
 
Parallels won't accept a ticket without billing me $75, despite the fact that my licence is leased.

I'm not paying them to fix their mess. I'm beginning to think it's time to move on from Plesk.
 
Try to replace file /usr/local/psa/admin/smb/application/library/Smb/Db/Table/Broker/ApsPackageUpdates.php with attached and inform with result.
 

Attachments

  • ApsPackageUpdates.zip
    7.6 KB · Views: 78
I have the same error message in Plesk and tried the solutions mentioned above. I still get this:

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

stdout:
httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed
httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed


stderr:
httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed
httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed

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

2012-03-18T21:09:05+00:00 ERR (3): Apache config (13321048120.71489800) generation failed: Can not restart web server: httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed
httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed

Can not restart web server: httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed
httpd stop failed
1 /usr/sbin/apache2 processes are killed
0 ../lib/apache2/mpm-prefork/apache2 processes are killed

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

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

Details: Empty error message from utility.
 
Back
Top