Skip to main content

Hello,

I recently upgraded my Centreon dev platform to version 24.10.2. While most features are functioning as expected, I am encountering issues with certain options.

For instance, when I switch from Light to Dark mode or add/delete columns on the Resource Status page, I receive the following error:
Error on updating a user

Immediately after this, I am automatically redirected to the login screen.

However, upon logging in again, I notice that the changes were successfully applied.

 

In developer mode, I can see...

Request URL

https://mydomain/centreon/api/latest/configuration/users/current/parameters

Request Method: PATCH

Status Code: 500 Internal Server Error

Remote Address: XX.XXX.XXX.XXX:443

Referrer Policy: strict-origin-when-cross-origin




Response Headers

Api-version: 24.10

cache-control: no-cache, private

content-type: application/json

date: Wed, 27 Nov 2024 17:36:09 GMT

server: Apache

set-cookie: PHPSESSID=deleted; expires=Thu, 01 Jan 1970 00:00:01 GMT; Max-Age=0; path=/; secure; HttpOnly; SameSite=lax;HttpOnly;Secure;SameSite=Strict

strict-transport-security: max-age=31536000; includeSubDomains



Request Headers
:authority: mydomain.net

:method: PATCH

:path: /centreon/api/latest/configuration/users/current/parameters

:scheme: https

accept: application/json, text/plain, */*

accept-encoding: gzip, deflate, br, zstd

accept-language: en-US,en;q=0.9,fr;q=0.8,fr-FR;q=0.7

content-length: 17

content-type: application/x-www-form-urlencoded

cookie: AWSELBAuthSessionCookie-XXXX…….
Origin: https://mydomain.net
Priority: u=1, i
Referer: https://mydomain.net/centreon/monitoring/resources?details=XXXXX…..

sec-ch-ua: "Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24"

sec-ch-ua-mobile: ?0

sec-ch-ua-platform: "Windows"

sec-fetch-dest: empty

sec-fetch-mode: cors

sec-fetch-site: same-origin

user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0

 

Could you please help?

I have other errors too when trying to add a host : Unexpected return status


[root@centreon-TemcDev php-fpm]# tail -f centreon-error.log
[06-Dec-2024 05:17:11 UTC] [2024-12-06T05:17:11+0000] [warning] Warning: Undefined array key "centreon" {"exception":"[object] (ErrorException(code: 0): Warning: Undefined array key \"centreon\" at /usr/share/centreon/src/Core/Infrastructure/Common/Repository/SystemReadSessionRepository.php:46)"}

[06-Dec-2024 05:17:19 UTC] [2024-12-06T05:17:19+0000] [critical] You are not authorized to access this resource {"context":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): You are not authorized to access this resource at /usr/share/centreon/vendor/symfony/framework-bundle/Controller/AbstractController.php:332)"}

[06-Dec-2024 05:17:19 UTC] [2024-12-06T05:17:19+0000] [critical] You are not authorized to access this resource {"context":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): You are not authorized to access this resource at /usr/share/centreon/vendor/symfony/framework-bundle/Controller/AbstractController.php:332)"}

[06-Dec-2024 05:17:19 UTC] [2024-12-06T05:17:19+0000] [critical] You are not authorized to access this resource {"context":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): You are not authorized to access this resource at /usr/share/centreon/vendor/symfony/framework-bundle/Controller/AbstractController.php:332)"}

[06-Dec-2024 05:17:26 UTC] [2024-12-06T05:17:26+0000] [error] No route found for "POST https://mydomain/centreon/api/latest/authentication/logout": Method Not Allowed (Allow: GET) {"context":"[object] (Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException(code: 0): No route found for \"POST https://mydomain/centreon/api/latest/authentication/logout\": Method Not Allowed (Allow: GET) at /usr/share/centreon/vendor/symfony/http-kernel/EventListener/RouterListener.php:131)\n[previous exception] [object] (Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException(code: 0): at /usr/share/centreon/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:42)"}

[06-Dec-2024 05:18:21 UTC] [2024-12-06T05:18:21+0000] [warning] Warning: Undefined array key "centreon" {"exception":"[object] (ErrorException(code: 0): Warning: Undefined array key \"centreon\" at /usr/share/centreon/src/Core/Infrastructure/Common/Repository/SystemReadSessionRepository.php:46)"}

[06-Dec-2024 05:18:30 UTC] [2024-12-06T05:18:30+0000] [critical] You are not authorized to access this resource {"context":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): You are not authorized to access this resource at /usr/share/centreon/vendor/symfony/framework-bundle/Controller/AbstractController.php:332)"}

[06-Dec-2024 05:18:30 UTC] [2024-12-06T05:18:30+0000] [error] No route found for "POST https://mydomain/centreon/api/latest/authentication/logout": Method Not Allowed (Allow: GET) {"context":"[object] (Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException(code: 0): No route found for \"POST https://mydomain/centreon/api/latest/authentication/logout\": Method Not Allowed (Allow: GET) at /usr/share/centreon/vendor/symfony/http-kernel/EventListener/RouterListener.php:131)\n[previous exception] [object] (Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException(code: 0): at /usr/share/centreon/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:42)"}

 


I have even tried this

 

>root@centreon-TemcDev php-fpm]# sudo -u apache php /usr/share/centreon/bin/console cache:clear

// Clearing the cache for the prod environment with debug false


OK] Cache for the "prod" environment (debug=false) was successfully cleared.

 


🙇🏻


Reply