Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade 3.2.2 from 2.1 (2.1.15.17101701) #1756

Closed
supkk opened this issue Sep 22, 2021 · 1 comment
Closed

Upgrade 3.2.2 from 2.1 (2.1.15.17101701) #1756

supkk opened this issue Sep 22, 2021 · 1 comment

Comments

@supkk
Copy link

supkk commented Sep 22, 2021

sysPass Version
Upgrade 3.2.2 from 2.1 (2.1.15.17101701)

Describe the question
when migrating the DB from version 2.1 to 3.2, I get the error:
[2021-09-22 12:47:46] syspass.EXCEPTION: logger {"message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-5' for key 'PRIMARY'
#0 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeDatabaseService.php(173): PDO->exec(String)
#1 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeDatabaseService.php(108): SP\Services\Upgrade\UpgradeDatabaseService->applyUpgrade(String)
#2 /var/www/html/syspass/app/modules/web/Controllers/UpgradeController.php(89): SP\Services\Upgrade\UpgradeDatabaseService->upgrade(String,Object(SP\Config\ConfigData))
#3 [internal function]: SP\Modules\Web\Controllers\UpgradeController->upgradeAction()
#4 /var/www/html/syspass/lib/SP/Bootstrap.php(240): call_user_func_array(Array,Array)
#5 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#6 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#7 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#8 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#9 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#10 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}
[2021-09-22 12:47:46] syspass.EXCEPTION: logger {"message":"Error al aplicar la actualización de la Base de Datos
#0 /var/www/html/syspass/lib/SP/Services/Upgrade/UpgradeDatabaseService.php(108): SP\Services\Upgrade\UpgradeDatabaseService->applyUpgrade(String)
#1 /var/www/html/syspass/app/modules/web/Controllers/UpgradeController.php(89): SP\Services\Upgrade\UpgradeDatabaseService->upgrade(String,Object(SP\Config\ConfigData))
#2 [internal function]: SP\Modules\Web\Controllers\UpgradeController->upgradeAction()
#3 /var/www/html/syspass/lib/SP/Bootstrap.php(240): call_user_func_array(Array,Array)
#4 [internal function]: SP\Bootstrap->SP{closure}(Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#5 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(879): call_user_func(Object(Closure),Object(Klein\Request),Object(Klein\Response),Object(Klein\ServiceProvider),Object(Klein\App),Object(Klein\Klein),Object(Klein\DataCollection\RouteCollection),Array)
#6 /var/www/html/syspass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route),Object(Klein\DataCollection\RouteCollection),Array)
#7 /var/www/html/syspass/lib/SP/Bootstrap.php(464): Klein\Klein->dispatch(Object(Klein\Request))
#8 /var/www/html/syspass/lib/Base.php(75): SP\Bootstrap->run(Object(DI\Container))
#9 /var/www/html/syspass/index.php(28): require(String)","caller":"N/A"}

I have followed all the steps in https://syspass-doc.readthedocs.io/en/3.1/updating/v3.1.html#process. Fail in the step 10

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):

  • OS: Linux
  • OS CentOs 8
  • Browser : Firefox

Additional context
Add any other context about the problem here.
It also crashes in centos 7 and migrating to syspass 3.0.5

@supkk
Copy link
Author

supkk commented Sep 23, 2021

the issue was in the source data, some accounts were assigned to the same user group repeatedly.

@supkk supkk closed this as completed Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant