• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Cannot find hosting ID

S

suite224

Guest
Hello,



I'm pulling my hair out trying to find a solution to this problem. I created a domain earlier and had no problem. Created another one and got an error, yet it created the domain in Plesk, but not seen in IIS. So when I try to delete the domain in Plesk I get this error:

Unable to delete logrotate config: logrot_mng failed: Execute websrvmng --update-log-rotation "--vhost-name=domain name" failed with error code 1: Cannot find hosting by domain ID 99

I have tried everything to remove the domain from the Platform and to no avail. I understand that the domain wasn't successfully created ergo it can't be found to delete. I tried to just recreate the domain and it states that the domain already exists. Tried to change to a new subscriber account and then I get a strange DNS Zone error. Please someone help
 
It looks like that domain with ID 99 has htype as vrt_hst in domains table but hasn't corresponding record in hosting table. Try to set htype to none for this domain and delete domain. I hope it will help.
 
It looks like that domain with ID 99 has htype as vrt_hst in domains table but hasn't corresponding record in hosting table. Try to set htype to none for this domain and delete domain. I hope it will help.

How do you do that?

Do you need to edit the Plesk database directly to correct the htype for the domain?
 
Yes, psa database should be checked and corrected. Contact Support Team if you are not familiar with SQL.
 
Hello Igor,

You wouldn't happen to know the commands to edit the SQL database?
 
psa database cannot be empty. Plesk will not work in this case.
 
Sorry for being stupid, but how do you tell what database system Plesk is using for it's internal / system database?
 
I've found what we're using.

I still can't find anything within Plesk that points to the database format being used and it's location though.
 
There is obviously a bug in this release. This continues to happen. I shouldn't have to edit SQL tables in order to delete a domain. I've used previous plesk panel products and never had this issue.
 
Fix

Ok I have found the fix. You have to use dbclient.exe. The domain ID that the database could not find was 107.

(This displays all the domains within the database)
"%plesk_bin%\dbclient.exe" --direct-sql --sql="select * from domains"

(This deletes the domain)
"%plesk_bin%\dbclient.exe" --direct-sql --sql="DELETE FROM domains where id=107"

Then I had to go into MailEnable and delete the Postoffice for the domain. Thanks again Igor.
 
We have a support ticket open for this issue. Whilst this deals only with the removal of the problem domains, I will be pursuing the actual cause though at present I haven't been able to reproduce the error. Something is causing this (and error messages are produced when these domains are created) which needs to be resolved, though it appears that a restart of Plesk fixes it temporarily.

Though as pointed out, it shouldn't be necessary to run SQL commands to remove these domains. Plesk should be able to handle the error and recover from it by deleting the domains in the correct manner, ie by using the SQL commands we're being told to manually enter.
 
Parallels support ended up deleting the corrupt domains for us. I asked for the commands necessary to do this so we could do it ourselves in the future and got the following reply;

Here are the steps to be followed in order to delete the domain -

Next open a Command Promt and type in "cd %plesk_bin%" to go to the Pleask Admin directory

Run the following commands

mchk --domain --domain-name=problemdomain.com

websrvmng --reconfigure-vhost --vhost-name=problemdomain.com

You can now try removing the domain from the Plesk Control Panel.

If you are still unable to remove the domain from the Control panel it means that the domain account is corrupted, you will need to remove it manually. Before you start this process it is important to backup Plesk and also the psa database.

1. Remove the domain from inetpub > vhosts
2. Remove from Mail Enable Administrator
3. Remove from C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Post Offices
4. Remove from C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Config\Post Offices
5. Remove from Internet Information Services manager
6. Remove from Computer management Console - System Tools > Local Users and Groups > Users. You must remove referances to the domain for Plesk Domain User and Plesk IIS User
7. Remove DNS entry from C:\Program Files\SWsoft\plesk\dns\etc\named.conf
8. Remove all referances to the domain in the psa database for the following tables

* domains
* domain_aliases
* data_bases
* db_users
* sys_users
* hosting
* dns_recs

You can access the psa database by opening a command prompt and changing to the mysql directory, usually \Program Files\SWsoft\Plesk\mysql\bin
The type in the command "mysql -u admin -p password -P8306" where password is the admin password for Plesk.

The support ticket was then marked as resolved and closed. This is crazy.

We shouldn't have to go through so many steps to remove a corrupt domain, in fact we shouldn't have to go through any other than deleting the domain through Plesk. Instead we have to spend 15 minutes plus manually deleting the domain or raise a support ticket (for which we get charged) Others are experiencing this problem so something isn't right.

If the method to delete the domains is known, why isn't Plesk being fixed to do it automatically?
 
Our original support ticket (1066039) was closed. I followed it up with Parallels Sales and a new ticket has now been opened (1087846). If anyone else is experiencing this issue (domain creation fails and leaves them in a corrupt state or unable to delete corrupt domains) please feel free to quote these ticket numbers. Please post details of your tickets and problems here as well.

If enough of us make enough noise we will hopefully see a resolution to both the issues.
 
There is following reply from supporter:

I have tried to reach you by the phone but no one took the phone. I was calling to clarify the issue.
 
I was able to use this procedure to clean up a domain that didn't remove itself correctly.

Everything was cleaned up automatically except the psa.domains table had one entry in it. I was able to remove that one record and it seems ok now.
 
Yes, though I don't specify psa in the command line. Once connected with the mysql command line client I just type 'use psa;' and hit enter (without the quotes).
 
Back
Top