Site cannot be published with Web Presence Builder (WPB). Publishing process hangs or finishes with the following error:
Unexpected server behavior. Please contact the server administrator.
How to troubleshoot the issue?
Enable debug mode in WPB and Plesk backend utilities:
/usr/local/sb/config --->8--- [debug] debug = on ---8<--- ~# echo "replace into misc values ('debug_util_exec', 'true')" | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa ~# touch /usr/local/psa/tmp/util_exec.log ~# chmod 777 /usr/local/psa/tmp/util_exec.log ~# /etc/init.d/sw-cp-server restart
The errors are shown in these logs:
For example, site cannot be published. The following error is shown in WPB log:
/usr/local/psa/admin/logs/sitebuilder.log --->8--- 2012-08-13T23:42:40-04:00 [EMERG] [System] /sitebuilder/JsonApi/ PleskFatalException: Execution failed. Command: sbpublish Arguments: Array (  => --publish  => /var/www/vhosts/DOMAIN.TLD/httpdocs  => -source-file  => /usr/local/psa/tmp/tmpnFrfnb  => -owner  => OWNER  => -group  => psacln  => -domain-id  => 29 ) Details: Empty error message from utility. ---8<---
Since version 11.0 temporary file
/usr/local/psa/tmp/tmpnFrfnb is not removed in debug mode. Execute the command manually to see the error:
~# /usr/local/psa/admin/bin/sbpublish --publish /var/www/vhosts/DOMAIN.TLD/httpdocs -source-file /usr/local/psa/tmp/tmpnFrfnb -owner OWNER -group psacln -domain-id 29 Failed to copy local temporary storage to target path. filemng: Error occurred during /bin/cp command. ~#
sbpublish is backend utility of Plesk. In debug mode the error is written into
/usr/local/psa/tmp/util_exec.log ---8<--- 2012-08-14-04-45-43 [AGENT][DEBUG] 10 errcode = 1; stderr = filemng: Error occurred during /bin/cp command. ; stdout = cp: cannot create regular file `/var/www/vhosts/DOMAIN.TLD/httpdocs/images/blank.gif': Permission denied filemng: Error occurred during /bin/cp command. 14/08/2012 04:45:43 5e3efefde62048423ce558794038637c send-error-report /usr/local/psa/admin/bin/send-error-report 'warning' TRUE 0.00428 --->8---
So reason of failed publishing is incorrect permissions to file
Remember to disable debug mode after finish investigation.