Question

UPGRADE from 21.04.17

  • 25 August 2022
  • 7 replies
  • 145 views

Badge +1

 

Bonjour, je suis totalement débutant et…. perdu ;)

j’ai suivi le tuto ci dessous:

https://docs.centreon.com/fr/docs/upgrade/upgrade-from-21-04/

et dans l’avant dernier pas … j’ai ce message d’erreur sans savoir que faire ?

si quelqu’un pouvait m’orienter ?

 

Merci à vous

 


7 replies

Badge +1

hello,

I found this error :

{ "result" : "1", "current" : "21.04.17", "next" : "21.10.0-beta.1", "msg" : "Cannot execute query: INSERT INTO `provider_configuration` (type, name, is_active, is_forced) VALUES ('local', 'local', true, true);" }

 

is there someone to help me ?

thanks

 

Userlevel 2
Badge +6

Hi,

Is the upgrade was previously launched or launched on another browser by another user?

Can you verify if you have not already this information in database?

you can use this query for that:
select * from centreon.provider_configuration;

King regards

Badge +1

HI

i have the same problem i tried the command

MariaDB [(none)]> select * from centreon.provider_configuration;     
ERROR 1146 (42S02): Table 'centreon.provider_configuration' doesn't exist

Badge +1

Hello,

 

I have exactly the same problem...

 

Userlevel 2
Badge +6

Hi,
We have identified the issue, you can apply this fix: https://github.com/centreon/centreon/pull/11658/files

After this, run this commands in centreon database:

DROP TABLE `ws_token`;

CREATE TABLE `provider_configuration` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`is_active` BOOLEAN NOT NULL DEFAULT 1,
`is_forced` BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

And then clic refresh button on wizard.

It should be ok.

Regards

Userlevel 5
Badge +12

HI @TaPoN and @Troy3ns can you edit the /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php file at line 289 and change this bloc:

    private function isSqlComment(string $line): bool
{
return str_starts_with(trim($line), '--');
}

Then refresh your page (Ctrl + F5)

Regards

Badge +1

Hello

have you or tested the solution proposed by Laurent 

Reply