Issue :

ERROR: PleskFatalException : Unable to remove hosting: SiteAppManager: Provided Client object is invalid.

Fix:

If you are getting the  above error when trying to remove a domain from the Plesk control panel follow the steps given below

1) Login to mysql : mysql -u admin -p`cat /etc/psa/.psa.shadow`

2) use psa;

3) Find out the domain id

Login to your client level plesk control panel and point the mouse pointer over the domain name in the domain list . In  the the status bar of the browser you will see something like: https://yourserver.tld:8443/domains/dom_ctrl.php3?dom_id=548&previous_page=domains
here 548 is the domain id .

You can also find this domain id executing the following query :

SELECT id FROM domains where name=’domain-name’;

4) Then execute the following query

SELECT * FROM SiteApps where dom_id=”;

You will see the application , then delete it by executing the following command

DELETE FROM SiteApps where dom_id=”;

5) Try to delete the domain from your plesk control panel

6) If you are  still getting any of the following error ( a or b) execute the two queries mentoned below

SELECT * FROM data_bases where dom_id=”;
DELETE FROM data_bases where dom_id=”;

a)
0: /usr/local/psa/admin/plib/class.PhDomain.php:399
PhDomain->reset(integer ‘0’, boolean true, boolean false)
1: /usr/local/psa/admin/plib/class.BsDomain.php:307
BsDomain->reset(integer ‘0’)
2: /usr/local/psa/admin/plib/class.BsDomain.php:301
BsDomain->delete(integer ‘0’)
3: /usr/local/psa/admin/plib/class.BsDomain.php:541
mdeleteDomains(array)
4: /usr/local/psa/admin/plib/class.Manager.php:352
Manager->removeDomains(array)
5: /usr/local/psa/admin/htdocs/domains/removeDomains.php3:44

b)
ERROR: PleskFatalException
Cannot delete database which is in use by a site application



Shares
Contact Us On WhatsApp