Published on: July 5, 2010 by Subin M.
Scenario:
This error is shown while using plesk remove domain option from plesk panel. When trying to remove the domain for the first time, it will show a success. But on listing the domains again from plesk, we will find the entry for the domain with a cross mark to the left of it hinting that the domain was tried for removal but still, not properly removed 🙁 We can verify this. Try adding a new domain of the same name and it will show an error stating that the an entry for the domain already exixts.
So after several tries we find that it is not possible to remove the domain from the plesk interface. So the problem needs to be dealt at the root level. So what is the root of all the entries in plesk? Of course the plesk’s DB ! Here are the steps to follow for the troubleshoot:
1) Since plesk uses different DBs we shall now try to find what DB server it uses.
Go to Start>All Programs>Plesk?Plesk Reconfigurator. In the pop up window obtained, select ‘Switch DB provider’. Note the field for ‘Server Type’. It will show the DB type plesk is currently using. You may find that it supports MySQl,MSSQL and Jet. I shall now continue the article with refernce to Jet DB.
2) Now we have our target clear: editing plesk’s Jet DB to remove all instances of a particular domain. We shall now try to find a frontend GUI tool for editing plesk’s Jet DB tables. I used ‘MDB Viewer Plus’. It is a DB viewer combined and an editor software. You can download the file from:
http://www.alexnolan.net/software/MDBPlus.exe
Then proceed with the installation.
3)Run the program. Navigate to File>Open. Now search for the DB location. It will usually be in %Program Files\Parallels\Plesk\admin\db\psa.mdb. Open the particular db.
4)Open the ‘Query’ from the toolbar. This helps us to execute MSSQL queries from this program. Into the space for query, enter:
SELECT d.name FROM domains d LEFT JOIN dns_zone z ON d.dns_zone_id=z.id WHERE z.id IS NULL;
and click ‘Execute’. It will display the list of domains having missing or inappropriate IDs in psa.mdb.
The meaning and reason for the error is that in the DB file psa.mdb, the ‘dns_zone_id’ record in the table ‘domains’ points to inexistent ‘id’ record in ‘dns_zone’ table for one or several domains. It may happen because of Plesk internal issues, broken database, incomplete domain deletion. We shall verify this now.
5) In the toolbar for the list of tables of the psa.mdb, navigate to the table ‘dns_zone’. You will find multiple entries for the domain in question. Remove the latest entries and then note the ‘id’ record for the particular domain.
6)From the toolbar navugate to the table ‘domains’. Click on the domain in question. Then move the scroll bar below to search for the record(or coloumn ‘dns_zone_id’). Note the this id. You will note that this will be different from the ‘id’ record in step 5. This mismatch had led to the dns zone being NULL for the particular domain.
7)We can verify this by running commnads in ‘Query’ toolbar also. Open ‘Query’ from the toolbar and run the commands:
a. to verify step 5: Select id from [dns_zone] where name=’domainname’
b. to verify step 6: Select dns_zone_id from [domains] where name=’domainname’
We can see the two different id results.
8)So we need to eliminate this mismatch. For that we will need to provide the correct id for the table: ‘domains’. For this we will replace the result of 7)b with 7)a. Run the following command:
UPDATE domains SET dns_zone_id=’dns-zone-id’ WHERE name=’domainname’;
Replace dns-zone-id with the result of 7)a.
The issue is fixed ! 🙂 Now try to use the Plesk remove domain option.
Category : Plesk, Troubleshooting, Windows
Add new commentSIGN IN