Admin-Ahead Community

Linux => Control Panels => Plesk => Topic started by: jominj on January 27, 2014, 06:57:11 am

Title: Internal error: Domain Service Web not exists
Post by: jominj on January 27, 2014, 06:57:11 am
Plesk Panel shows following error after login :
Code: [Select]
Internal error: Domain Service Web not exists: domain=sub.domain.tld, id=41
Domain Service Web not exists: domain=sub.domain.tld, id=41
File     DSWeb.php
Line    76
Type    PleskFatalException
The reason for this error is missing the  subdomain sub.domain.tld but 'psa' database is still containing entry for this subdomain or Plesk database was not properly upgraded, psa.DomainServices table has no records with "web" type.

There are two possible solutions for this issue:
1. Delete subdomain sub.domain.tld from psa database and re-create it from scratch:
Code: [Select]
mysql> delete from domains where id='41';
Query OK, 1 row affected (0.04 sec)
please make sure to check whether domain exists physically beforehand. If it does, backup all the domain content from corresponding folders /var/www/vhosts/ and /var/qmail/mailnames/. Also please take a backup of Plesk database
Code: [Select]
/usr/local/psa/admin/bin/php /usr/local/psa/admin/plib/scripts/upgrade_web_domain_services_1010.php
2. Add missing entries to psa database.
First, check if there is an entry in 'DomainServices' for this domain:
Code: [Select]
mysql> select * from DomainServices where dom_id = 41;
+-----+--------+------+--------+---------------+----------------+
| id  | dom_id | type | status | parameters_id | ipCollectionId |
+-----+--------+------+--------+---------------+----------------+
| 322 |    41  | mail |     16 |           585 |            322 |
+-----+--------+------+--------+---------------+----------------+
1 row in set (0.00 sec)
Then add similar entrie of type "web", and add related records to 'IpAddressesCollections':

Code: [Select]
mysql> begin;
mysql> select @d:=<missing_domain_id>;
mysql> select @a:=(select max(id)+1  from IpAddressesCollections );
mysql> select @b:=(select ipAddressId from IpAddressesCollections where ipCollectionId=322)
mysql> insert into IpAddressesCollections values (@a,@b);
mysql> insert into DomainServices values('',@d,'web',0,0,@a);
mysql> commit;