Occaisonally when deleting a domain from plesk, you can run into this error:
Internal error: Unable to find service node for web service on domain with id=XX
Is is caused by an inconsistency in the database. It can be fixed by updating the domain in the PSA database.
The very first thing you need to do before you attempt to make any changes in the database is make a backup. That way, if something goes awry, you can fix it easilly.
To Make a backup, run the following command:
mysqldump -uadmin -p$(cat /etc/psa/.psa.shadow) psa > /root/psa_backup.sql
Once the backup has been created, then run the following commands to repair the issue
mysql>
update domains set htype='none' where id=XX;
** Replace XX with the ID that was listed in the error
This should fix the issue most times. However, if it did not help, then you can manaually delete the DNS records by entering the following commands.
mysql>
delete from domains where id=XX;
mysql>delete from dns_zone where name='yourdomain.com';
mysql>delete from dns_recs where displayHost like '%yourdomain.com%';
** Replace XX with the ID that was listed in the error
** Replace “yourdomain.com” with the domain you are trying to delete.