Drupal update fails: Cannot find service with id

Created:

2016-11-16 13:25:06 UTC

Modified:

2017-08-16 16:51:57 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Drupal update fails: Cannot find service with id

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Symptoms

Updating Drupal via Application tab under Domain level fails with following error:

Cannot find service with id

There is the following error in panel.log with debug mode:

Fatal Error Cannot add index system_list to table system: index already exists.

Cause

Most likely there was previous migration from Drupal6 to Drupal7 performed not by Plesk tools which caused subsequent inconsistencies in Drupal database. Such inconsistencies prevents to update Drupal properly.

Resolution

Before all actions create dump of psa and apsc databases:

# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > ~/psa.`date +%F_%H:%M`.sql
# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` apsc > ~/apsc.`date +%F_%H:%M`.sql

Perform the following steps to fix the issue:

  1. Dump database for such Drupal App and replace current database with default database of Drupal App.

  2. Set up version of Drupal to the previous ones:

    List of Drupal packages available to install:

    mysql> select id, name, version from apsc.aps_package where name='Drupal';
    +----+--------+---------+
    | id | name | version |
    +----+--------+---------+
    | 3 | Drupal | 6.22 |
    | 8 | Drupal | 7.21 |
    | 9 | Drupal | 7.9 |
    | 17 | Drupal | 7.22 |
    | 23 | Drupal | 7.23 |
    | 31 | Drupal | 7.26 |
    | 38 | Drupal | 7.28 |
    | 45 | Drupal | 7.27 |
    | 59 | Drupal | 7.32 |
    | 61 | Drupal | 7.33 |
    | 62 | Drupal | 7.34 |
    +----+--------+---------+

    Find what value of registry_object_id in apsc.aps_application table in apsc database is binded for Drupal instance for example.com :

    SELECT a.name AS "DOMAIN NAME", e.registry_object_id AS "REGISTRY OBJECT ID", e.package_id AS "PACKAGE ID" 
    FROM psa.domains a, psa.apsContexts b, psa.apsContextsApplications c, apsc.aps_registry_object d, apsc.aps_application e
    WHERE a.id=b.pleskId AND b.id=c.apsContextId AND c.registryApplicationId=d.uid AND d.id=e.registry_object_id AND a.name='example.com';

    +-------------+--------------------+------------+
    | DOMAIN NAME | REGISTRY OBJECT ID | PACKAGE ID |
    +-------------+--------------------+------------+
    | newday2.tld | 77 | 62 |
    +-------------+--------------------+------------+

    mysql> update apsc.aps_application set package_id=31 where registry_object_id=77;
  3. Perform Drupal update via Plesk GUI:

    Domain -> Applications -> Drupal -> Update

  4. Restore Drupal database from dump.

Have more questions? Submit a request
Please sign in to leave a comment.