centreon/centreon-archived

Upgrade from 21.10.7 to 22.04 fail

ptitpopey opened this issue · 0 comments

Centos 7

Currently upgrading... please do not interrupt this process.
Step Status
21.10.7 to 22.04.0-beta.1 UPGRADE - 22.04.0-beta.1: Unable to configure centreon-gorgone api user

You seem to be having trouble with your upgrade.

Please check the "upgrade.log" and the "sql-error.log" located in "/var/log/centreon" for more details
You may refer to the line in the specified file in order to correct the issue.

The SQL files are located in "/usr/share/centreon/www/install/sql/"
But do not edit the SQL files unless you know what you are doing.Refresh this page when the problem is fixed.

(root@centreon.infra.eqx)-(/var/log/centreon)# cat upgrade.log
2022-07-11 17:04|0|0|UPGRADE - 22.04.0-beta.1: Unable to configure centreon-gorgone api user - Code : 23000 - Error : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (centreon.contact, CONSTRAINT contact_ibfk_1 FOREIGN KEY (timeperiod_tp_id) REFERENCES timeperiod (tp_id) ON DELETE SET NULL) - Trace : #0 /usr/share/centreon/www/class/centreonDBStatement.class.php(129): PDOStatement->execute()
#1 /usr/share/centreon/www/install/php/Update-22.04.0-beta.1.php(674): CentreonDBStatement->execute()
#2 /usr/share/centreon/www/install/php/Update-22.04.0-beta.1.php(649): createGorgoneUser()
#3 /usr/share/centreon/www/install/php/Update-22.04.0-beta.1.php(156): configureGorgoneApiUser()
#4 /usr/share/centreon/www/install/step_upgrade/process/process_step4.php(72): include_once('...')
#5 {main}
(root@centreon.infra.eqx)-(/var/log/centreon)# cat sql-error.log
2022-07-10 10:34|0|0| QUERY : DELETE FROM security_token
WHERE expiration_date < UNIX_TIMESTAMP(NOW())
2022-07-11 03:16|0|0| QUERY : DELETE FROM security_token
WHERE expiration_date < UNIX_TIMESTAMP(NOW())
2022-07-11 17:04|0|0|SQLSTATE[42S02]: Base table or view not found: 1146 Table 'centreon.contact_password' doesn't exist QUERY : SELECT creation_date
FROM contact_password
WHERE contact_id = :contactId
ORDER BY creation_date DESC LIMIT 1, null
2022-07-11 17:04|0|0|SQLSTATE[42S02]: Base table or view not found: 1146 Table 'centreon.contact_password' doesn't exist QUERY : SELECT contact.\*, contact_password.password AS contact_passwd FROM contact
LEFT JOIN contact_password ON contact_password.contact_id = contact.contact_id
WHERE contact_alias = :contactAlias
AND contact_activate = '1' AND contact_register = '1'
ORDER BY contact_password.creation_date DESC LIMIT 1, null
2022-07-11 17:04|0|0|SQLSTATE[42S22]: Column not found: 1054 Unknown column 'contact_theme' in 'field list' QUERY : SELECT contact_theme FROM contact WHERE contact_id = :contactId, null
2022-07-11 17:04|0|0|SQLSTATE[42S22]: Column not found: 1054 Unknown column 'contact_theme' in 'field list' QUERY : SELECT contact_theme FROM contact WHERE contact_id = :contactId, null
2022-07-11 17:04|0|0|SQLSTATE[42S02]: Base table or view not found: 1146 Table 'centreon.contact_password' doesn't exist QUERY : SELECT creation_date
FROM contact_password
WHERE contact_id = :contactId
ORDER BY creation_date DESC LIMIT 1, null
2022-07-11 17:04|0|0|SQLSTATE[42S02]: Base table or view not found: 1146 Table 'centreon.contact_password' doesn't exist QUERY : SELECT creation_date
FROM contact_password
WHERE contact_id = :contactId
ORDER BY creation_date DESC LIMIT 1, null
2022-07-11 17:04|0|0|SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (centreon.contact, CONSTRAINT contact_ibfk_1 FOREIGN KEY (timeperiod_tp_id) REFERENCES timeperiod (tp_id) ON DELETE SET NULL) QUERY : INSERT INTO contact
(timeperiod_tp_id, timeperiod_tp_id2, contact_name, contact_alias,
contact_lang, contact_host_notification_options, contact_service_notification_options,
contact_email, contact_pager, contact_comment, contact_oreon, contact_admin, contact_type_msg,
contact_activate, contact_auth_type, contact_ldap_dn, contact_enable_notifications)
VALUES(1, 1, :gorgoneUser, :gorgoneUser, 'en_US.UTF-8', 'n', 'n', 'gorgone@localhost', NULL, NULL,
'0', '1', 'txt', '1', 'local', NULL, '0'), null