Skip to main content
Solved

Bug since update to Centreon 21.04.9

  • December 13, 2021
  • 11 replies
  • 1076 views

Forum|alt.badge.img+5

Hi,

i upgraded to Centreon 21.04.9 from 21.04 and now i have the error message “ when i go on administration interface “Oops something went wrong”. I don't see where i have to look in the logs to try to find where the error came from.

Thanks for your help. 

Regards.

Best answer by Adrien Morais-Mestre

Regarding your browser console errors you can follow this procedure.

SELECT * FROM user_filter WHERE criterias LIKE '%"status_severity_code",null%';

This SQL request will give you all the filters that has the malformated criterias saved in the database.
You can update the column criterias in the DB of the filters that match the LIKE condition and the problem will be solved.

To update it, you can copy/paste the “criterias” value and replace ["status_severity_code",null] by ["status_severity_code","asc"]

Here is an example:

UPDATE user_filter SET criterias ='[{"name":"resource_types","type":"multi_select","value":[{"id":"host","name":"Host"}]},{"name":"states","type":"multi_select","value":[{"id":"unhandled_problems","name":"Unhandled"},{"id":"acknowledged","name":"Acknowledged"},{"id":"in_downtime","name":"In downtime"}]},{"name":"statuses","type":"multi_select","value":[]},{"name":"host_groups","type":"multi_select","value":[],"object_type":"host_groups"},{"name":"service_groups","type":"multi_select","value":[],"object_type":"service_groups"},{"name":"search","type":"text","value":""},{"name":"sort","type":"array","value":["status_severity_code","asc"]}]' WHERE id='2';

Regards

11 replies

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • December 13, 2021

Hi @TeXmeX , can you check in you browser console if you have errors and in /var/log/php-fpm/centreon-error.log

 

Regards


Forum|alt.badge.img+5
  • Author
  • Steward **
  • December 13, 2021

Hi @Laurent ,

in browser console i have these errors :

GET https://cdn.eu.pendo.io/agent/static/b06b875d-4a10-4365-7edf-8efeaf53dfdd/pendo.js net::ERR_BLOCKED_BY_CLIENT

API Request              <CustomFilters> decoder failed at key "result" with error: <CustomFilter> decoder failed at index "0" with error: <CustomFilter> decoder failed at key "criterias" with error: <FilterCriterias> decoder failed at index "6" with error: <FilterCriterias> decoder failed at key "value" with error: <FilterCriteriaValue> decoder failed because ["status_severity_code",null] can't be decoded with any of the provided oneOf decoders

Uncaught (in promise) <CustomFilters> decoder failed at key "result" with error: <CustomFilter> decoder failed at index "0" with error: <CustomFilter> decoder failed at key "criterias" with error: <FilterCriterias> decoder failed at index "6" with error: <FilterCriterias> decoder failed at key "value" with error: <FilterCriteriaValue> decoder failed because ["status_severity_code",null] can't be decoded with any of the provided oneOf decoders

 

In the file /var/opt/rh/rh-php73/log/php-fpm/centreon-error.log

[12-Dec-2021 03:45:33 Europe/London] PHP Notice:  PDO::__construct(): send of 142 bytes failed with errno=32 Broken pipe in /usr/share/centreon/src/Centreon/Infrastructure/DatabaseConnection.php on line 61
[12-Dec-2021 03:45:33 Europe/London] CRITICAL: SQLSTATE[HY000] [2006] MySQL server has gone away {"context":"[object] (PDOException(code: 2006): SQLSTATE[HY000] [2006] MySQL server has gone away at /usr/share/centreon/src/Centreon/Infrastructure/DatabaseConnection.php:61)"}

 

Thanks !


Adrien Morais-Mestre
Centreonian
Forum|alt.badge.img+8

Hi,

Could you please share the result of this query in the centreon database ?

SELECT * FROM user_filter\G

Regards


Forum|alt.badge.img+5
  • Author
  • Steward **
  • December 13, 2021

Ok, what is the default MariaDB password on the CentOS VM provided by Centreon ?

Thanks.


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • December 13, 2021

DBMS is on the same server as the Centreon central ?


Forum|alt.badge.img+5
  • Author
  • Steward **
  • December 13, 2021

Yes.


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • December 13, 2021

Adrien Morais-Mestre
Centreonian
Forum|alt.badge.img+8

Hi TeXmeX,

If you want to connect to the centreon database, credential information are available in this file

/etc/centreon/centreon.conf.php

Once you get the credentials you can connect to the centreon database and check for the table user_filter and share the content of this table.

SELECT * FROM user_filter\G

Thanks


Adrien Morais-Mestre
Centreonian
Forum|alt.badge.img+8

Regarding your browser console errors you can follow this procedure.

SELECT * FROM user_filter WHERE criterias LIKE '%"status_severity_code",null%';

This SQL request will give you all the filters that has the malformated criterias saved in the database.
You can update the column criterias in the DB of the filters that match the LIKE condition and the problem will be solved.

To update it, you can copy/paste the “criterias” value and replace ["status_severity_code",null] by ["status_severity_code","asc"]

Here is an example:

UPDATE user_filter SET criterias ='[{"name":"resource_types","type":"multi_select","value":[{"id":"host","name":"Host"}]},{"name":"states","type":"multi_select","value":[{"id":"unhandled_problems","name":"Unhandled"},{"id":"acknowledged","name":"Acknowledged"},{"id":"in_downtime","name":"In downtime"}]},{"name":"statuses","type":"multi_select","value":[]},{"name":"host_groups","type":"multi_select","value":[],"object_type":"host_groups"},{"name":"service_groups","type":"multi_select","value":[],"object_type":"service_groups"},{"name":"search","type":"text","value":""},{"name":"sort","type":"array","value":["status_severity_code","asc"]}]' WHERE id='2';

Regards


Forum|alt.badge.img+5
  • Author
  • Steward **
  • December 27, 2021

Hi, Thank you, it’s working now ! I have also an issue with Gorgone. Modification of Apache directive as @Laurent explained in this Github page doesn’t work https://github.com/centreon/centreon/issues/10445

2021-12-27 10:57:47 - DEBUG - => Recv header: X-Frame-Options: sameorigin
2021-12-27 10:57:47 - DEBUG - => Recv header: Transfer-Encoding: chunked
2021-12-27 10:57:47 - DEBUG - => Recv header: Content-Type: application/json
2021-12-27 10:57:47 - DEBUG - => Recv header:
2021-12-27 10:57:47 - DEBUG - => Recv data: 2c
{"code":401,"message":"Invalid credentials"}
0

2021-12-27 10:57:47 - DEBUG - == Info: Connection #15580 to host 127.0.0.1 left intact
2021-12-27 10:57:47 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '401'] [message: 'Unauthorized']
 


Forum|alt.badge.img+5
  • Author
  • Steward **
  • January 6, 2022

Hello, any help please ? I really would like to fix this error. Thank you.

 

Hi, Thank you, it’s working now ! I have also an issue with Gorgone. Modification of Apache directive as @Laurent explained in this Github page doesn’t work https://github.com/centreon/centreon/issues/10445

2021-12-27 10:57:47 - DEBUG - => Recv header: X-Frame-Options: sameorigin
2021-12-27 10:57:47 - DEBUG - => Recv header: Transfer-Encoding: chunked
2021-12-27 10:57:47 - DEBUG - => Recv header: Content-Type: application/json
2021-12-27 10:57:47 - DEBUG - => Recv header:
2021-12-27 10:57:47 - DEBUG - => Recv data: 2c
{"code":401,"message":"Invalid credentials"}
0

2021-12-27 10:57:47 - DEBUG - == Info: Connection #15580 to host 127.0.0.1 left intact
2021-12-27 10:57:47 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '401'] [message: 'Unauthorized']