Solved

cannot access monitoring dashboard after migrating from centos (22.10.7) to debian (23.04.6)

  • 16 September 2023
  • 1 reply
  • 209 views

Badge +1

Hi, 

 

i followed the documentation to migrate my centreon from centos 7 to debian 11.

 

When I log in to the new centreon with the default admin account, I get stuck on that error :

I usually log in with LDAP user which is already configured, but got the same error. The error logs below are the same wether I log in with the local admin account or with the LDAP user account.

 

 

Reading /var/log/centreon/login.log, it seems like the authentication succeeded :

2023-09-16 11:52:51|1|0|0|[local] [x.x.x.x] Authentication succeeded for 'admin'

 

Reading /var/log/apache2/error.log, I get the following :

[Sat Sep 16 11:52:45.063415 2023] [proxy_fcgi:error] [pid 61825] [client x.x.x.x:49339] AH01071: Got error 'PHP message: 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:358)"}\n', referer: http://mycentreon.org/centreon/monitoring/resources

From time to time, I also get this error in /var/log/apache2/error.log :

[Sat Sep 16 11:53:43.930585 2023] [proxy_fcgi:error] [pid 61941] [client 127.0.0.1:59404] AH01071: Got error 'PHP message: ERROR: No route found for "GET http://127.0.0.1/centreon/api/latest/auto-discovery/scheduling/jobs" {"context":"[object] (Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\NotFoundHttpException(code: 0): No route found for \\"GET http://127.0.0.1/centreon/api/latest/auto-discovery/scheduling/jobs\\" at /usr/share/centreon/vendor/symfony/http-kernel/EventListener/RouterListener.php:135)\\n[previous exception] [object] (Symfony\\\\Component\\\\Routing\\\\Exception\\\\ResourceNotFoundException(code: 0): No routes found for \\"/centreon/api/latest/auto-discovery/scheduling/jobs/\\". at /usr/share/centreon/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:74)"}\n'

 

Reading /var/log/centreon/centreon-web.log, I get this error :

[2023-09-16T11:52:49+0200] [ERROR] [Core\Security\Authentication\Application\UseCase\Login\Login:133]: An error occurred during authentication {"trace":"Core\\Security\\Authentication\\Domain\\Exception\\AuthenticationException: Authentication failed in /usr/share/centreon/src/Core/Security/Authentication/Domain/Exception/AuthenticationException.php:32\nStack trace:\n#0 /usr/share/centreon/src/Security/Domain/Authentication/Model/LocalProvider.php(163): Core\\Security\\Authentication\\Domain\\Exception\\AuthenticationException::notAuthenticated()\n#1 /usr/share/centreon/src/Core/Security/Authentication/Infrastructure/Provider/Local.php(75): Security\\Domain\\Authentication\\Model\\LocalProvider->authenticateOrFail()\n#2 /usr/share/centreon/src/Core/Security/Authentication/Application/UseCase/Login/Login.php(95): Core\\Security\\Authentication\\Infrastructure\\Provider\\Local->authenticateOrFail()\n#3 /usr/share/centreon/src/Core/Security/Authentication/Infrastructure/Api/Login/Local/LoginController.php(68): Core\\Security\\Authentication\\Application\\UseCase\\Login\\Login->__invoke()\n#4 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(163): Core\\Security\\Authentication\\Infrastructure\\Api\\Login\\Local\\LoginController->__invoke()\n#5 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#6 /usr/share/centreon/vendor/symfony/http-kernel/Kernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#7 /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#8 {main}"}

I don’t know where these could be coming from.

Any help would be much appreciated !

icon

Best answer by maxime.petitjean 25 November 2023, 17:01

View original

1 reply

Badge +1

For anyone wondering, I managed to solve this issue by disabling plain HTTP in /etc/apache2/conf-available/centreon.conf and using only HTTPS, so I guess I had some bad HTTP routing rules in this file even if I followed the documentation.

Reply