Question

Debian 11 Update 23.10.7 to 23.10.8 sql errors

  • 22 February 2024
  • 2 replies
  • 57 views

Badge

Hi,

We try to update Centreon 23.10.7 to 23.10.8.

The apt part is OK but the update wizard send us an error :

23.10.7 to 23.10.8UPGRADE - 23.10.8: Unable to insert centreon-widget-resourcestable in dashboard_widgets

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.

The logs :

root@vm-centreon:~# cat /var/log/centreon/upgrade.log
2024-02-22 12:14|0|0|UPGRADE - 23.10.8: Unable to insert centreon-widget-resourcestable in dashboard_widgets - Code : 0 - Error : SQLSTATE[HY000]: General error: 1364 Field 'version' doesn't have a default value - Trace : #0 /usr/share/centreon/www/class/centreonDB.class.php(311): PDO->query()
#1 /usr/share/centreon/www/install/php/Update-23.10.8.php(35): CentreonDB->query()
#2 /usr/share/centreon/www/install/php/Update-23.10.8.php(49): Core\Platform\Infrastructure\Repository\DbWriteUpdateRepository->{closure}()
#3 /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php(144): include_once('...')
#4 /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php(61): Core\Platform\Infrastructure\Repository\DbWriteUpdateRepository->runScript()
#5 /usr/share/centreon/www/install/step_upgrade/process/process_step4.php(46): Core\Platform\Infrastructure\Repository\DbWriteUpdateRepository->runUpdate()
#6 {main}
root@vm-centreon:~# cat /var/log/centreon/sql-error.log
2023-10-13 15:57|0|0|SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE host_id = 13' at line 1 QUERY : UPDATE host SET WHERE host_id = :hostId, null
2024-02-22 12:14|0|0|SQLSTATE[HY000]: General error: 1364 Field 'version' doesn't have a default value QUERY : INSERT INTO dashboard_widgets (name)
VALUES ('centreon-widget-resourcestable')


2 replies

Badge +2

Hello,

 

check topic “UPGRADE - 23.10.8 Failed”

UPGRADE - 23.10.8 Failed | Community (centreon.com)

Userlevel 5
Badge +11

Hi @agenet, did you succeed in solving your problem? Then please don't forget to click on Best Answer! Or tell us how you ended up solving it. This will help other people with the same problem to find an easy solution. That's why we are a community! Thank you, thank you

Reply