Error "Oops something went wrong" since update to 21.04.8
Closed this issue · 4 comments
Hi,
I have an error since last update of Centreon, de la 21.04 (VM provided by the website) to 21.04.8. When i navigate on the Centreon pages, i have regularly this error " Oops something went wrong". I checked the logs and saw this error in Gorgone :
ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '401'] [message: 'Unauthorized']
Thank you for your help,
Regards.
Same problem right here, upgraded from 21.04 to 21.10 and can't connect to the web UI, same messages in red boxes but differences in gorgone logs error 500 :
2021-11-30 16:45:00 - INFO - [cron] Launching job 'broker_stats'
2021-11-30 16:45:00 - INFO - [cron] Launching job 'engine_stats'
2021-11-30 16:45:00 - INFO - [statistics] Collecting Engine statistics from target '1'
2021-11-30 16:45:03 - INFO - [core] Setcoreid changed 1
2021-11-30 16:45:04 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '500'] [message: 'Internal Server Error']
2021-11-30 16:46:05 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '500'] [message: 'Internal Server Error']
2021-11-30 16:47:05 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '500'] [message: 'Internal Server Error']
Hi,
Error with gorgone is independent of UI.
Can you check your Centreon Apache configuration and specially the LocationMatch directive?
You should have:
For Centreon 21.10.x
<LocationMatch ^/centreon/(?!api/latest/|api/beta/|api/v[0-9]+/|api/v[0-9]+\.[0-9]+/)(.*\.php(/.*)?)$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/www/$1
</LocationMatch>
<LocationMatch ^/centreon/(authentication|api/(latest|beta|v[0-9]+|v[0-9]+\.[0-9]+))/.*$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/api/index.php/$1
</LocationMatch>
For Centreon 21.04.x
<LocationMatch ^/centreon/(?!api/latest/|api/beta/|api/v[0-9]+/|api/v[0-9]+\.[0-9]+/)(.*\.php(/.*)?)$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/www/$1
</LocationMatch>
<LocationMatch ^/centreon/api/(latest/|beta/|v[0-9]+/|v[0-9]+\.[0-9]+/)(.*)$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/api/index.php/$1
</LocationMatch>
Then you need to rebuild the PHP Symfony cache using this command:
su - apache -s /bin/bash -c "/usr/share/centreon/bin/console cache:clear" >> /dev/null 2>&1
Fix from: https://thewatch.centreon.com/platform-7/bug-since-update-to-centreon-21-04-9-183?postid=368#post368
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
Hi, i applied the directive for 21.04.x in 10-centreon.conf file but it's not working. Thanks.
> 2021-12-16 15:45:41 - DEBUG - => Recv header: X-Frame-Options: sameorigin
> 2021-12-16 15:45:41 - DEBUG - => Recv header: Transfer-Encoding: chunked
> 2021-12-16 15:45:41 - DEBUG - => Recv header: Content-Type: application/json
> 2021-12-16 15:45:41 - DEBUG - => Recv header:
> 2021-12-16 15:45:41 - DEBUG - => Recv data: 2c
> {"code":401,"message":"Invalid credentials"}
> 0
>
> 2021-12-16 15:45:41 - DEBUG - == Info: Connection #70 to host 127.0.0.1 left intact
> 2021-12-16 15:45:41 - ERROR - [autodiscovery] -class- host discovery - cannot get platform versions - Login error [code: '401'] [message: 'Unauthorized']