1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Expand Upgrade from 2.2.4-1 to 2.3 fails with foreign key error for 'backup_files'

Discussion in 'Plesk Expand 2.2 Troubleshooting Issues' started by eugenevdm, Jun 29, 2008.

  1. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    Expand upgrade from 2.2.4-1 to 2.3 fails with:

    "Jun 29 2008 09:22:45 [:24042] INFO: Unable to add foreign key '(object_server_id)' to table 'backup_files': Cannot add or update a child row: a foreign key constraint fails"

    Complete log below:

    [root@pleskexpand expand_2.3.0-32.fc4]# rpm -Uvh expand-2.3.0*.rpm expand-dist-repository*.rpm expand-locale-base-en-US-2.3.0*.noarch.rpm
    Preparing... ########################################### [100%]
    1:expand-locale-base ########################################### [ 33%]
    Stopping expandtm: [ OK ]
    Stopping expandom: [ OK ]
    setsebool: SELinux is disabled.
    Creating group 'expand'...
    Group 'expand' already exists.
    Creating user 'expand'...
    User 'expand' already exists.
    2:expand ########################################### [ 67%]
    Trying to stop Web server...
    Stoppping SWsoft control panels server...[ OK ]
    expandupm: Exiting due to update script errors
    Updating expand files permissions...
    Trying to start Web server...
    Starting SWsoft control panels server...[ OK ]
    Starting expandom: [ OK ]
    Starting expandtm: [ OK ]
    *********************************************************************
    ************ WARNING!!! Plesk Expand upgrade failed *****************
    * A problem occurred while running post-install update scripts. For
    * more information, please, see Update Manager log file. It is
    * usually located at /usr/local/expand/var/log/update.log
    *********************************************************************


    setsebool: SELinux is disabled.
    Installing locale 'en-US'.
    Locale 'en-US' installed.
    Registering 'en-US' base locale in the Expand database.
    Reloading expandom: [ OK ]
    3:expand-dist-repository ########################################### [100%]
    [root@pleskexpand expand_2.3.0-32.fc4]#

    UPDATE.LOG

    Jun 29 2008 09:22:42 [:24042] INFO: Update manager started. Update config: /usr/local/expand/install/updates/expand/update.conf, update point: 2.2.4-1
    Jun 29 2008 09:22:42 [:24042] INFO: Changing directory to /usr/local/expand/install/updates/expand
    Jun 29 2008 09:22:42 [:24042] INFO: Running update scripts for '2.2.4-1' update point
    Jun 29 2008 09:22:42 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/2.3.0/plesk_client_locale.php
    Jun 29 2008 09:22:43 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:22:43 [:24042] INFO: Update script hasn't written anything to its error stream
    Jun 29 2008 09:22:43 [:24042] INFO: Update script returned exit status: 0
    Jun 29 2008 09:22:43 [:24042] INFO: Consider update script as finished successfully
    Jun 29 2008 09:22:43 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/2.3.0/tmpl_client_ippool.php
    Jun 29 2008 09:22:43 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:22:43 [:24042] INFO: Update script hasn't written anything to its error stream
    Jun 29 2008 09:22:43 [:24042] INFO: Update script returned exit status: 0
    Jun 29 2008 09:22:43 [:24042] INFO: Consider update script as finished successfully
    Jun 29 2008 09:22:43 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/2.3.0/null_plesk_rec_id.php
    Jun 29 2008 09:22:43 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:22:43 [:24042] INFO: Update script hasn't written anything to its error stream
    Jun 29 2008 09:22:43 [:24042] INFO: Update script returned exit status: 0
    Jun 29 2008 09:22:43 [:24042] INFO: Consider update script as finished successfully
    Jun 29 2008 09:22:43 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/2.3.0/curl_debug_level.sh
    Jun 29 2008 09:22:44 [:24042] INFO: Update script output stream dump follows:
    Jun 29 2008 09:22:44 [:24042] INFO: add-param :curl_debug_level 3 --comment " cURL library debug level 0 ... 7"... done
    Jun 29 2008 09:22:44 [:24042] INFO: Update script hasn't written anything to its error stream
    Jun 29 2008 09:22:44 [:24042] INFO: Update script returned exit status: 0
    Jun 29 2008 09:22:44 [:24042] INFO: Consider update script as finished successfully
    Jun 29 2008 09:22:44 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/common/update_version.sh

    ...

    Jun 29 2008 09:22:45 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/2.3.0/backup_processes_update2.php
    Jun 29 2008 09:22:45 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:22:45 [:24042] INFO: Update script hasn't written anything to its error stream
    Jun 29 2008 09:22:45 [:24042] INFO: add-section BackupOp --comment "#################### Backup operator settings"... done
    add-param BackupOp:max_backup_processes 10 --comment " Maximum number of backup processes running on Plesk server"... done
    Jun 29 2008 09:22:45 [:24042] INFO: Update script hasn't written anything to its error stream
    Jun 29 2008 09:22:45 [:24042] INFO: Update script returned exit status: 0
    Jun 29 2008 09:22:45 [:24042] INFO: Consider update script as finished successfully
    Jun 29 2008 09:22:45 [:24042] INFO: Processing /usr/local/expand/install/updates/expand/2.3.0/backup_files_update.php
    Jun 29 2008 09:22:45 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:22:45 [:24042] INFO: Update script error stream dump follows:
    Jun 29 2008 09:22:45 [:24042] INFO: Unable to add foreign key '(object_server_id)' to table 'backup_files': Cannot add or update a child row: a foreign key constraint fails
    Jun 29 2008 09:22:45 [:24042] INFO: Update script returned exit status: 1
    Jun 29 2008 09:22:45 [:24042] INFO: Update script failed due to MySQL is perhaps down.
    Jun 29 2008 09:22:45 [:24042] INFO: Try to start MySQL using /etc/init.d/mysqld script:
    Jun 29 2008 09:22:46 [:24042] INFO: ... MySQL startup script output stream dump follows:
    Jun 29 2008 09:22:46 [:24042] INFO: Starting MySQL: [ OK ]^M
    Jun 29 2008 09:22:46 [:24042] INFO: ... exit status: 0
    Jun 29 2008 09:22:46 [:24042] INFO: Waiting 10 seconds
    Jun 29 2008 09:22:56 [:24042] INFO: Lets try execute update script again (2 attempts left)
    Jun 29 2008 09:22:56 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:22:56 [:24042] INFO: Update script error stream dump follows:
    Jun 29 2008 09:22:56 [:24042] INFO: Unable to add foreign key '(object_server_id)' to table 'backup_files': Cannot add or update a child row: a foreign key constraint fails
    Jun 29 2008 09:22:56 [:24042] INFO: Update script returned exit status: 1
    Jun 29 2008 09:22:56 [:24042] INFO: Update script failed due to MySQL is perhaps down.
    Jun 29 2008 09:22:56 [:24042] INFO: Try to start MySQL using /etc/init.d/mysqld script:
    Jun 29 2008 09:22:56 [:24042] INFO: ... MySQL startup script output stream dump follows:
    Jun 29 2008 09:22:56 [:24042] INFO: Starting MySQL: [ OK ]^M
    Jun 29 2008 09:22:56 [:24042] INFO: ... exit status: 0
    Jun 29 2008 09:22:56 [:24042] INFO: Waiting 10 seconds
    Jun 29 2008 09:23:06 [:24042] INFO: Lets try execute update script again (1 attempts left)
    Jun 29 2008 09:23:06 [:24042] INFO: Update script hasn't written anything to its output stream
    Jun 29 2008 09:23:06 [:24042] INFO: Update script error stream dump follows:
    Jun 29 2008 09:23:06 [:24042] INFO: Unable to add foreign key '(object_server_id)' to table 'backup_files': Cannot add or update a child row: a foreign key constraint fails
    Jun 29 2008 09:23:06 [:24042] INFO: Update script returned exit status: 1
    Jun 29 2008 09:23:06 [:24042] ERR: Exiting due to update script errors

    --------------------------

    Please assist.
     
  2. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    Started getting these errors when clicking on domains, probably due to the botched upgrade:

    "Unable to query the database: Unknown column 'd.backup_process_id' in 'field list'. SQL: SELECT d.id AS id, d.name AS name, d.display_name AS display_name, d.server_id AS server_id, d.plesk_domain_id AS plesk_domain_id, d.client_id AS client_id, d.dns_zone_id AS dns_zone_id, UNIX_TIMESTAMP(d.cr_date) AS cr_date, d.status AS status, d.htype AS htype, d.real_size AS real_size, d.tmpl_id AS tmpl_id, d.binding_state AS binding_state, d.op_state AS op_state, d.backup_process_id AS backup_process_id, d.action_id AS action_id FROM plesk_domain AS d WHERE d.id = 4110
    Please see more details in the Problem Report ('report-Jun292008-103157.log'):"

    I then manually altered the plesk_domain table and added a field called:

    backup_process_id INT 10 Unsigned

    Hopefully this is a good remedy, at least the error is gone.
     
  3. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    I reversed this change and logged a ticket with Parallels :-( $75 down the tube because of a failed upgrade. That's a lot of money in my country!



    I reversed the change because I started noticing a whole bunch of fields missing, e.g. the field above was also missing from plesk_client, plesk_server.
     
  4. Bers

    Bers Basic Pleskian Staff Member

    23
    70%
    Joined:
    Jul 31, 2001
    Messages:
    73
    Likes Received:
    0
    Hi,

    to resolve the problem perform the following:

    1. Log into your Expand database.

    2. Execute queries:

    >DELETE FROM `backup_processes` WHERE `server_id`=0;
    >DELETE FROM `backup_files` WHERE `object_server_id`=0;

    3. Rerun update scripts with the command:
    /usr/local/expand/install/updates/expand/common/runupdates.sh

    best regards,
     
  5. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    Thank you very much! That solved the problem!

    kind regards,
     
Loading...