Articles in this section

Apache / PHP-FPM service fails to start on the Plesk server: "bad user name john_doe" or "cannot get uid for user 'john_doe'"

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Apache service fails to start. Configuration checker shows this error:
    • on AlmaLinux / CloudLinux / RHEL

      # httpd -t
      AH00543: httpd: bad user name john_doe

    • on Debian / Ubuntu

      # apache2 -t
      AH00543: apache2: bad user name john_doe

  • PHP-FPM XX service (XX is a PHP version) is in the 'activating' state. The following error message is logged in service error log /var/log/plesk-phpXX-fpm/error.log:

    CONFIG_TEXT: ERROR: [pool example.com] cannot get uid for user 'john_doe'

  • One of the following error messages may appear on the Home page in Plesk:

    PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: AH00543: httpd: bad user name john_doe

    PLESK_ERROR: Unable to create system user: vhostmng-structure failed: Fatal error: std::runtime_error(cannot find user with name john_doe: Success)

  • The system user, mentioned in the error, exists in the Plesk database:

    # plesk db "select login,home from sys_users where login='john_doe'"
    +----------+-----------------------------+
    | login      | home                        |
    +----------+-----------------------------+
    | john_doe | /var/www/vhosts/example.com |
    +----------+-----------------------------+

  • The domain from the home path exists in Plesk:

    # plesk bin site --list | grep example.com
    example.com

Cause

System user of a subscription does not exist in the system.

Resolution

Recreate the missing system user:

  1. Connect to your Plesk server via SSH.
  2. Restore the missing system user:

    # plesk repair sysusers -y example.com

  3. Repair the web server configuration:

    # plesk repair web -y

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.