Skip to main content
Question

UPGRADE from 21.04.17

  • August 25, 2022
  • 7 replies
  • 511 views

Forum|alt.badge.img+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

Forum|alt.badge.img+1
  • Author
  • Steward *
  • August 26, 2022

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

 


cmeschin
Centreonian
Forum|alt.badge.img+9
  • Centreonian
  • August 30, 2022

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


Forum|alt.badge.img+2
  • Steward *
  • August 30, 2022

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


Forum|alt.badge.img+1
  • Steward *
  • August 30, 2022

Hello,

 

I have exactly the same problem...

 


cmeschin
Centreonian
Forum|alt.badge.img+9
  • Centreonian
  • September 1, 2022

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


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • September 1, 2022

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


Forum|alt.badge.img+2
  • Steward *
  • September 7, 2022

Hello

have you or tested the solution proposed by Laurent