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.
-
Log in to the server via SSH
-
Create a backup of psa database:
# plesk db dump > psa.current.sql
-
Access Plesk database from command line:
# plesk db
-
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
- 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';
- Create a file with all
external_id
extracted from WHMCS database. -
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
-
Back up Plesk database:
# plesk…