Skip to main content

Hello everyone, 

 

I have a problem with my update, I have an error see below : 

log of upgrade.log :

2022-06-01 12:49|0|0|UPGRADE - 22.04.0-beta.1: Unable to alter table security_token - Code : 42000 - Error : SQLSTATET42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes - Trace : #0 /usr/share/centreon/www/class/centreonDB.class.php(309): PDO->query()
#1 /usr/share/centreon/www/install/php/Update-22.04.0-beta.1.php(94): CentreonDB->query()
#2 /usr/share/centreon/www/install/step_upgrade/process/process_step4.php(72): include_once('...')
#3 {main}

logs of sql-error.log :

2022-06-01 12:49|0|0|SQLSTATET42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes QUERY : ALTER TABLE security_token MODIFY token varchar(4096)

i have check and test the solution of this issue of art3mis :

Upgrade problem 21.10.6 to 22.04

 

but the problem still here

can you help me ? 

Regards

Hello @Kélian ,

What is your database version ?

What is the return of 

desc centreon.security_token;
SHOW CREATE TABLE centreon.security_token;

Once connected to mysql ?


@Kriko,

MariaDB [(none)]> SELECT VERSION();
+-----------------+
| VERSION() |
+-----------------+
| 10.3.22-MariaDB |
+-----------------+
1 row in set (0.000 sec)

MariaDB [(none)]>
MariaDB [(none)]> desc centreon.security_token;
+-----------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+---------------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| token | varchar(255) | NO | MUL | NULL | |
| creation_date | bigint(20) unsigned | NO | | NULL | |
| expiration_date | bigint(20) unsigned | YES | MUL | NULL | |
+-----------------+---------------------+------+-----+---------+----------------+
4 rows in set (0.016 sec)
MariaDB [(none)]> SHOW CREATE TABLE centreon.security_token;
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| security_token | CREATE TABLE `security_token` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`token` varchar(255) NOT NULL,
`creation_date` bigint(20) unsigned NOT NULL,
`expiration_date` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `token_index` (`token`),
KEY `expiration_index` (`expiration_date`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 |
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

MariaDB [(none)]>

thanks


@Kriko ,

 

i have updated maridb db 10.3 to 10.5,as recommanded in the centreon doc : 

MariaDB D(none)]> SELECT VERSION();
+-----------------+
| VERSION() |
+-----------------+
| 10.5.15-MariaDB |
+-----------------+
1 row in set (0.000 sec)

MariaDB D(none)]>

and it works :) 

 

you can close this topic, thank you,

Kélian


\o/


@Kriko

now i have another error 😭, can’t update the plugins : 

i tried to reinstall the plugins, it’s the same, should I open another topic ?

 

Kelian


Hello o/

You need to upgrade the pp manager in the menu Administration > Extension > Manager :)


@Kriko,

Thanks a lot, it's ok now I could update the plugins.

 

Now you can close this topic 😀,

 

Kelian


Reply