Skip to main content
Solved

Insertion bloquante

  • February 25, 2022
  • 1 reply
  • 87 views

Forum|alt.badge.img+9

Bonjour,

 

Dans broker , j’ai le message suivant qui apparait: [error] mysql_connection: could not store logs correctly:  Incorrect string value: '\xCE\xBCs' for column `centreon_storage`.`logs`.`output` at row 3517

 

Cela coupe la lecture de broker et donc rend l’application indisponible.

 

Quelqu’un a déjà vu ce cas/trouvé une solution?

 

Cordialement,

Francis DOUNGA

Best answer by omercier

Hi Francis,

You had an issue because broker could not insert UTF-8 characters in a Latin1 column.

On freshly installed Centreon platforms, all text columns in the storage database are stored with `utf8` charset, but on platforms installed prior to 18.10, some unmigrated columns remain in `latin1` charset.

As you know, converting the charset of columns surch as `centreon_storage`.`logs`.`output` can take a very long time, so we cannot just convert them in the update process, because it would block the database for too long.

We will submit a procedure here and on our documentation site to list the differences between the “live” and the reference database definitions.

 

Meanwhile, if you want to get your database definition, run the following command:

mysqldump -h server_ip -u login -ppassword --no-data --extended-insert=FALSE centreon_storage | sed 's/ AUTO_INCREMENT=[0-9]*//g' > datamodel_history_centreon_storage.sql

mysqldump -h server_ip -u login -ppassword --no-data --extended-insert=FALSE centreon | sed 's/ AUTO_INCREMENT=[0-9]*//g' > datamodel_history_centreon.sql

 

 

1 reply

omercier
Centreonian
Forum|alt.badge.img+13
  • Centreonian
  • Answer
  • March 3, 2022

Hi Francis,

You had an issue because broker could not insert UTF-8 characters in a Latin1 column.

On freshly installed Centreon platforms, all text columns in the storage database are stored with `utf8` charset, but on platforms installed prior to 18.10, some unmigrated columns remain in `latin1` charset.

As you know, converting the charset of columns surch as `centreon_storage`.`logs`.`output` can take a very long time, so we cannot just convert them in the update process, because it would block the database for too long.

We will submit a procedure here and on our documentation site to list the differences between the “live” and the reference database definitions.

 

Meanwhile, if you want to get your database definition, run the following command:

mysqldump -h server_ip -u login -ppassword --no-data --extended-insert=FALSE centreon_storage | sed 's/ AUTO_INCREMENT=[0-9]*//g' > datamodel_history_centreon_storage.sql

mysqldump -h server_ip -u login -ppassword --no-data --extended-insert=FALSE centreon | sed 's/ AUTO_INCREMENT=[0-9]*//g' > datamodel_history_centreon.sql