Symptoms
-
Plesk shows the following error:
Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-all ) Details: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-server [1] => -no-restart ) Details: [2018-11-05 09:03:41.854] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1] [2018-11-05 09:03:42.016] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1] [2018-11-05 09:03:42.017] ERR [panel] Apache config (15414158200.83848700) generation failed: Template_Exception: AH00543: httpd: bad user name jdoe file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 75
-
The following errors can be seen in
/var/log/plesk/panel.log
:ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/usermng' '--del-user' '--user=jdoe' '--homedir=/var/www/vhosts/example.com'] with exit code [1]
ERR [1] '/usr/local/psa/admin/bin/usermng' '--del-user' '--user=jdoe' '--homedir=/var/www/vhosts/example.com' failed with code 1. -
The following message appears when accessing any website on the server:
502 Bad Gateway
-
Subscription/domain was not fully removed as data is still present in the vhost direcotry
/var/www/vhosts/example.com
-
The user is still present in the Plesk database:
# plesk db "SELECT * FROM psa.sys_users WHERE login='jdoe'"
+----+---------------+-------------+------------+-----------------------------+------------+-------+-----------+
| id | serviceNodeId | login | account_id | home | shell | quota | mapped_to |
+----+---------------+-------------+------------+-----------------------------+------------+-------+-----------+
| 3 | 1 | jdoe | 7 | /var/www/vhosts/example.com | /bin/false | 0 | NULL |
+----+---------------+-------------+------------+-----------------------------+------------+-------+-----------+
Cause
Product issues:
-
#PPPM-10195 "Fixed issues related with removing subscriptions."
Fixed in:- Plesk Onyx 17.8.11 Update 56 10 June 2019 (Linux)
-
#PPP-41164 "Enhanced reliability of removing subscriptions."
Fixed in:- Plesk Obsidian Release Candidate 1 (RC1 18.0.15) 04 June 2019 (Linux)
Resolution
Workaround
Upgrade Plesk to the latest version.
Click on a section to expand
If upgrade is not possible, use the following workaround
-
Connect to the server via SSH.
- Backup
psa
database as per the instruction in the following article: How to backup/restore a Plesk database dump -
Remove the user in Plesk database:
# plesk db "DELETE FROM psa.sys_users WHERE login='jdoe';"
-
Remove the directory for the subscription/domain:
# rm -r /var/www/vhosts/example.com
-
Recreate subscription/domain in Plesk > Subscriptions > Add Subscription or Plesk > Domains > Add domain respectively.
-
Remove subscription/domain in Plesk > Subscriptions > select subscription > Remove or Plesk > Domains > select domain > Remove respectively.
Note: if the issue re-occur for another user, resolve database inconsistency by removing orphaned domain services and system users by running:
# plesk repair db