- Plesk for Linux
- Plesk for Windows
The following error appears in Plesk UI during an attempt to open a domain control panel in Plesk, or open the Home > Domains link in the left navigation bar, or login to Plesk:
PLESK_INFO: Internal error: Unable to load object of type BsDomain with id=3: Domain does not exist.
The issue is caused by a
psa database inconsistency. It occurs if a record in the
domain_aliases.dom_id columns of a psa database points to a non-existing domain ID.
For Plesk 12.5 or higher try "plesk repair db" utility first. Refer to the documentation for details.
If Solution 1 did not help use the solution below, login to the server via SSH and do the following:
# plesk db dump psa > psa_backup.$(date +%F_%R).sql
Check the links to
<id from error>in the
# plesk db "SELECT * FROM domains WHERE webspace_id=<id from error>"
The above query will return a list of domains that belong to a broken webspace, if there are any.
Check the domain-related tables and domain aliases:
# for table in domain_aliases hosting dom_param DomainServices subdomains;do echo TABLE: $table; plesk db "select * from $table where dom_id=<id from error>";done
This query will return domain aliases that belong to the missing
dom_idand also entries in related tables that contain information about the domain.
DomainServicestables returned a non-empty result on step 3, check whether the actual domain content folder exists (
# ls -la /var/www/vhosts/example.com/httpdocs
If it does, the domain entry in the database should be recreated. Fetch it from Plesk database dumps using the below command:
# export dom_id=<dom_id that you got from hosting table>
# find /var/lib/psa/dumps/ -name mysql.daily.dump.*|sort -n |while read dump_file;do zcat $dump_file|grep '^INSERT INTO `domains'|sed 's/INSERT INTO `domains` VALUES //g'|sed 's/),(/)\n(/g'|grep "($dom_id,";if [ $? == 0 ];then echo;echo Dump file $dump_file contains the entry;exit 0;fi;done
Dump file /var/lib/psa/dumps/mysql.daily.dump.8.gz contains the entry
The above command will return the domain entry from Plesk database dumps if it exists there. Re-insert the entry into the domains table:
# plesk db "INSERT INTO domains VALUES (2,'2013-11-21','domain.com','domain.com',3,0,'vrt_hst',760319296,1,0,NULL,NULL,'53238f70-4818-49a3-8d7e-1a5220e0e06e','','false','on',1,0,0,0,0);"
If the domain entry is missing in the dumps and the content folder does not exist, set the
dom_idto 0 for all the domains that have
webspace_idpointing to the missing domain. Also, remove entries from the following tables:
MYSQL_LIN: mysql> begin;
mysql> DELETE FROM hosting WHERE dom_id = <id from error>;
mysql> DELETE FROM dom_param WHERE dom_id = <id from error>;
mysql> DELETE FROM DomainServices WHERE dom_id = <id from error>;
mysql> DELETE FROM domain_aliases WHERE dom_id = <id from error>;
mysql> DELETE FROM subdomains WHERE dom_id = <id from error>;
If the content folder is in place but the domain entry is missing in dumps, create a support request in order to resolve the issue.