Articles in this section

The Hosting page for a Plesk domain cannot be opened: Domain Service Web not exists: domain=example.com, id=XXX

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • An attempt to open the Plesk > Domains > example.com > Hosting & DNS > Hosting page results in an error that is similar to the following:

    PLESK_INFO: Domain Service Web not exists: domain=example.com, id=XXX

  • A search for the contents of the DomainServices table for the mentioned domain ID reveals that entries with type web are not present:

    # plesk db "select * from DomainServices where dom_id = XXX"
    +-----+--------+------+--------+---------------+----------------+
    | id | dom_id | type | status | parameters_id | ipCollectionId |
    +-----+--------+------+--------+---------------+----------------+
    | 292 | XXX | mail | 0 | 132 | 292 |
    +-----+--------+------+--------+---------------+----------------+
    1 row in set (0.001 sec)

  • The domain has a No Web Hosting hosting type

Cause

Plesk database inconsistency that has made the web type entries for this domain go missing from the DomainServices table.

Resolution

  1. Log into the server via SSH
  2. Create Plesk database backup
  3. Access the Plesk database by executing the following command:

    # plesk db

  4. Recreate the web type entries within the DomainServices table by executing the following MySQL queries:

    Note: The domain ID XXX is replaced with 111 in this example. Make sure to use the ID from the error message when executing the commands.

    Set the domain ID:

    MYSQL_LIN: mysql> select @dom_id := 111;
    +----------------+
    | @dom_id := 111 |
    +----------------+
    | 111 |
    +----------------+
    1 row in set (0.000 sec)

    Get the IP address of the domain from its DNS zone:

    MYSQL_LIN: mysql> select @ip := (select dr.val from dns_recs dr, domains d where d.id = @dom_id and dr.dns_zone_id = d.dns_zone_id and dr.type = 'A' and dr.host = concat(d.name,'.'));
    +---------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | @ip := (select dr.val from dns_recs dr, domains d where d.id = @dom_id and dr.dns_zone_id = d.dns_zone_id and dr.type = 'A' and dr.host = concat(d.name,'.')) |
    +---------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | 203.0.113.2 |
    +---------------------------------------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.097 sec)

    Get the ID of that IP address in Plesk:

    MYSQL_LIN: mysql> select @ip_id := (select id from IP_Addresses where ip_address = @ip);
    +----------------------------------------------------------------+
    | @ip_id := (select id from IP_Addresses where ip_address = @ip) |
    +----------------------------------------------------------------+
    | 3 |
    +----------------------------------------------------------------+
    1 row in set (0.000 sec)

    Create a new IP collection:

    MYSQL_LIN: mysql> INSERT INTO IpCollections VALUES (NULL);
    Query OK, 1 row affected (0.000 sec)

    Save the ID of the new collection:

    MYSQL_LIN: mysql> SELECT @ip_collection_id := LAST_INSERT_ID();
    +---------------------------------------+
    | @ip_collection_id := LAST_INSERT_ID() |
    +---------------------------------------+
    | 295 |
    +---------------------------------------+
    1 row in set (0.000 sec)

    Add the missing web entry:

    MYSQL_LIN: mysql> insert into DomainServices (dom_id, type, status, parameters_id, ipCollectionId) values (@dom_id, 'web', 0, 0, @ip_collection_id);
    Query OK, 1 row affected (0.001 sec)

  5. Check that the web type entry is now present for this domain ID:

    MYSQL_LIN: mysql> select * from DomainServices where dom_id = 111;
    +-----+--------+------+--------+---------------+----------------+
    | id | dom_id | type | status | parameters_id | ipCollectionId |
    +-----+--------+------+--------+---------------+----------------+
    | 292 | 111 | mail | 0 | 132 | 292 |
    | 295 | 111 | web | 0 | 0 | 295 |
    +-----+--------+------+--------+---------------+----------------+
    2 rows in set (0.000 sec)

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.