Skip to main content

I have followed the guide https://docs.centreon.com/docs/migrate/migrate-from-3-4/

migration from-3-4 to 24.

Just a few error when

"Everything is ready !
Your Centreon Platform is about to be upgraded from version 2.8.26 to 24.04.6"
I had to manually run the SQL statements in the files:
/usr/share/centreon/www/install/php/Update-20.04.19.php
/usr/share/centreon/www/install/php/Update-20.10.11.php
/usr/share/centreon/www/install/php/Update-20.10.12.php

But when the migration is done, and I try to login, I get:
"An error occurred during authentication" 
 

 

If I check the browser DevTools console (F12), i see “500 Internal Server Error”.

 

BR

Fredrik

From the /var/log/centreon/login.log:

2024-09-17 14:55:21|1|0|0|[local] [172.17.20.23] Authentication succeeded for 'admin'
2024-09-17 14:55:24|0|0|0|[local] [127.0.0.1] Authentication failed for 'centreon-gorgone' : not found
2024-09-17 14:55:39|1|0|0|[local] [172.17.20.23] Authentication succeeded for 'admin'
2024-09-17 14:56:04|1|0|0|[local] [172.17.20.23] Authentication succeeded for 'admin'

From the /var/log/centreon/centreon-web.log:
[2024-09-17T14:56:04+0200] [error] [Core\Security\Authentication\Application\UseCase\Login\Login:166]: An error occurred during authentication {"trace":"TypeError: Centreon\\Domain\\Menu\\Model\\Page::__construct(): Argument #2 ($url) must be of type string, null given, called in /usr/share/centreon/src/Centreon/Infrastructure/Contact/ContactRepositoryRDB.php on line 467 and defined in /usr/share/centreon/src/Centreon/Domain/Menu/Model/Page.php:55\nStack trace:\n#0 /usr/share/centreon/src/Centreon/Infrastructure/Contact/ContactRepositoryRDB.php(467): Centreon\\Domain\\Menu\\Model\\Page->__construct()\n#1 /usr/share/centreon/src/Centreon/Infrastructure/Contact/ContactRepositoryRDB.php(79): Centreon\\Infrastructure\\Contact\\ContactRepositoryRDB->createContact()\n#2 /usr/share/centreon/src/Centreon/Domain/Contact/ContactService.php(58): Centreon\\Infrastructure\\Contact\\ContactRepositoryRDB->findById()\n#3 /usr/share/centreon/src/Security/Domain/Authentication/Model/LocalProvider.php(209): Centreon\\Domain\\Contact\\ContactService->findContact()\n#4 /usr/share/centreon/src/Core/Security/Authentication/Infrastructure/Provider/Local.php(208): Security\\Domain\\Authentication\\Model\\LocalProvider->getUser()\n#5 /usr/share/centreon/src/Core/Security/Authentication/Infrastructure/Provider/Local.php(87): Core\\Security\\Authentication\\Infrastructure\\Provider\\Local->getAuthenticatedUser()\n#6 /usr/share/centreon/src/Core/Security/Authentication/Application/UseCase/Login/Login.php(103): Core\\Security\\Authentication\\Infrastructure\\Provider\\Local->findUserOrFail()\n#7 /usr/share/centreon/src/Core/Security/Authentication/Infrastructure/Api/Login/Local/LoginController.php(71): Core\\Security\\Authentication\\Application\\UseCase\\Login\\Login->__invoke()\n#8 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(181): Core\\Security\\Authentication\\Infrastructure\\Api\\Login\\Local\\LoginController->__invoke()\n#9 /usr/share/centreon/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()\n#10 /usr/share/centreon/vendor/symfony/http-kernel/Kernel.php(197): Symfony\\Component\\HttpKernel\\HttpKernel->handle()\n#11 /usr/share/centreon/api/index.php(47): Symfony\\Component\\HttpKernel\\Kernel->handle()\n#12 {main}"}


Tried the API login request via Postman.
This is the error message I get:

 


Does anyone know where to troubleshoot my API problem?​​​​


I managed to solve it.
The admin user had a value of 2 in the ‘default_page’ column in ‘contact’ table.

 

update contact set default_page=NULL where contact_id=1;

solved the login problem.


Reply