Plesk

Error while accessing Plesk from WHMCS via API: Customer with external id ‘whmcs_plesk_XX’ is not found in panel

Symptoms

Cannot access Plesk from WHMCS via API as a customer or cannot change password:

Error code: 1013. Error message: Customer with external id 'whmcs_plesk_XX' is not found in panel.

Error code: 1013. Error message: Customer with email 'johndoe@example.com' is not found in panel. Please contact your service provider.

Cause

The external_id entry is missing in psa.clients MySQL table.

Resolution

Note: if the issue appears on WHMCS integrated with Plesk Multi Server, this database update should be done on the management node side.

  1. Log in to the server via SSH

  2. Create a backup of psa database:

    # plesk db dump > psa.current.sql

  3. Access Plesk database from command line:

    # plesk db

  4. Update the following value:

    update clients set external_id='whmcs_plesk_XX' where login='johndoe';

    where whmcs_plesk_XX - should be replaced with ID from the error
    johndoe - should be replaced with login of the customer affected by the issue.

 

For several accounts

  1. List all orphaned client accounts (which has no external_id or it is invalid):

    select id,cname,pname,login from clients where parent_id = 1 and (external_id = NULL or external_id = '0' or external_id = '') and clients.type <> 'reseller';

  2. Create a file with all external_id extracted from WHMCS database.
  3. Log in to WHMCS database via PHPMyAdmin or via MySQL CLI and list all external_id:

    SELECT tblhosting.username, mod_pleskaccounts.panelexternalid FROM mod_pleskaccounts, tblhosting where mod_pleskaccounts.userid = tblhosting.userid and tblhosting.username <> '';

Further steps for Linux

  1. Back up Plesk database:

    # plesk…

Exit mobile version