Articles in this section

Plesk shows the following error after removing a subscription: AH00543: httpd: bad user name jdoe

kb: bug kb: fixed Plesk Onyx for Linux ABT: Group A

Applicable to:

  • Plesk Onyx for Linux

Symptoms

  • Plesk shows the following error:

    PLESK_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:

    CONFIG_TEXT: 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:

    CONFIG_TEXT: 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:

Resolution

Please consider updating your server:

Workaround

Upgrade Plesk to the latest version. 

Click on a section to expand

If upgrade is not possible, use the following workaround
  1. Connect to the server via SSH.

  2. Backup psa database as per the instruction in the following article: How to backup/restore a Plesk database dump
  3. Remove the user in Plesk database:

    # plesk db "DELETE FROM psa.sys_users WHERE login='jdoe';"

  4. Remove the directory for the subscription/domain:

    # rm -r /var/www/vhosts/example.com

  5. Recreate subscription/domain in Plesk > Subscriptions > Add Subscription or Plesk > Domains > Add domain respectively.

  6. 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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.