Applicable to:
- Plesk Onyx for Linux
- Plesk Onyx for Windows
Symptoms
Cannot access Plesk from WHMCS via API as a customer or cannot change password:
CONFIG_TEXT: Error code: 1013. Error message: Customer with external id 'whmcs_plesk_XX' is not found in panel.
CONFIG_TEXT: 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:
MYSQL_LIN: 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):
MYSQL_LIN: 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
:CONFIG_TEXT: SELECT tblhosting.username, mod_pleskaccounts.panelexternalid FROM mod_pleskaccounts, tblhosting where mod_pleskaccounts.userid = tblhosting.userid and tblhosting.username <> '';
-
Back up Plesk database:
# plesk db dump psa > psa.current.sql
-
Prepare a file with logins of the customers and external IDs separated by spaces:
# cat customers.txt
cus1 f8fc8a02-870a-483a-8de7-2f2cf6d16ace
edjhlbrh 1d0fa7bc-ecd8-4689-9931-99146b22a657 -
Take the ID and customer login from the customers.txt file and set IDs for clients with the appropriate logins:
# while read i j; do plesk db "update clients set external_id='$j' where login='$i'"; done < customers.txt
-
Check the result in
psa.clients
table:# plesk db "select pname,login,external_id from clients"
+-------------------+----------+--------------------------------------+
| pname | login | external_id |
+-------------------+----------+--------------------------------------+
| Administrator | admin | NULL |
| SomeCustomer | cus1 | f8fc8a02-870a-483a-8de7-2f2cf6d16ace |
| whmcsReseller | res | 1d0fa7bc-ecd8-4689-9931-99146b22a657 |
+-------------------+----------+--------------------------------------+
-
Back up Plesk database:
C:\> plesk db dump psa > psa_backup.sql
-
Prepare a file with logins of the customers and external IDs separated by spaces:
C:\> more customers.txt
cus1 f8fc8a02-870a-483a-8de7-2f2cf6d16ace
edjhlbrh 1d0fa7bc-ecd8-4689-9931-99146b22a657 -
Take the ID and customer login from the customers.txt file and set IDs for clients with the appropriate logins:
C:\> for /f "usebackq tokens=1,2" %a in (customers.txt) do plesk db "update clients set external_id='%b' where login='%a'"
-
Check the result in
psa.clients
table:C:\> plesk db "select pname,login,external_id from clients"
+-------------------+----------+--------------------------------------+
| pname | login | external_id |
+-------------------+----------+--------------------------------------+
| Administrator | admin | NULL |
| SomeCustomer | cus1 | f8fc8a02-870a-483a-8de7-2f2cf6d16ace |
| whmcsReseller | res | 1d0fa7bc-ecd8-4689-9931-99146b22a657 |
+-------------------+----------+--------------------------------------+
Comments
11 comments
when i execute this i got ERROR 1046 (3D000): No database selected
what is the name of database?
i solve with this:
http://kb.odin.com/en/123492
@Felipe, you might have not logged in to the Plesk database properly. I have added this step to the article. Thanks for the reporting.
Reproduced same issue on Plesk Onyx 17.5 on Windows Server 2012 R2
External ID-s are lost on every Plesk Onyx Update (happened 2x times withing last month)
@Kotso, Can you please clarify whether the issue is reproduced after forcing Plesk to reinstall microupdates with the command below:
plesk installer --select-release-current --reinstall-patch --upgrade-installed-components
Please, do not forget to make a dump of Plesk database. using this KB article https://support.plesk.com/hc/en-us/articles/213904125-How-to-backup-restore-a-Plesk-database-dump
we are facing different issue with same error code
Error code: 1013. Error message: Customer with email 'XXXX@gmail.com' is not found in panel. Please contact your service provider.
Hello @Sathiya,
As I can see, the issue is already under the investigation in the scope of a ticket, as additional checks are required to find the cause.
Hello there, im also getting the same problem ,
Error code: 1013. Error message: Customer with email 'johndoe@example.com' is not found in panel. Please contact your service provider
and i dont know host to access on plesk databse im using reseller club reseller account.
Hello @Hardik Lamichhane,
If you cannot solve the issue on your side using instructions from this article, consider submitting a support request to Plesk directly or to a reseller, depending on where the license was purchased. To be particular, if you got Plesk from a reseller, report this issue to the reseller directly so that they investigate it on their side.
Hi
This is still missing information in this article.
I get this error:
Error code: 1013. Error message: Customer with email 'customer@email.com' is not found in panel. Please contact your service provider.
I then run on PleskDB:
update clients set external_id='customer@email.com' where login='USERNAME';
This does not fix the issue.
if i need an ID then how do i get this as WHMCS now shows email addresses and not the ID like it use to do.
How about for resellers? How do we fix them?
Please sign in to leave a comment.