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

Unable to connect to DB Warn to developer #1928

Open
frohlichcortezh opened this issue Apr 16, 2024 · 2 comments
Open

Unable to connect to DB Warn to developer #1928

frohlichcortezh opened this issue Apr 16, 2024 · 2 comments

Comments

@frohlichcortezh
Copy link

frohlichcortezh commented Apr 16, 2024

sysPass Version
3.2.11

Describe the bug
After docker compose up, during installation.

To Reproduce
Steps to reproduce the behavior:

  1. docker compose up
  2. syspass database server as the name of the container

Expected behavior
Installation goes through

Screenshots
Screenshot 2024-04-16 203437
image

Event log

[2024-04-16 23:34:22] syspass.EXCEPTION: logger {"message":"Unable to connect to DB
#0 /var/www/html/sysPass/lib/SP/Services/Install/Installer.php(190): SP\Services\Install\Installer->saveMasterPassword()
#1 /var/www/html/sysPass/lib/SP/Services/Install/Installer.php(99): SP\Services\Install\Installer->install()
#2 /var/www/html/sysPass/app/modules/web/Controllers/InstallController.php(94): SP\Services\Install\Installer->run(Object(SP\Services\Install\InstallData))
#3 [internal function]: SP\Modules\Web\Controllers\InstallController->installAction()
#4 /var/www/html/sysPass/lib/SP/Bootstrap.php(247): 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\RouteCollec>
#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(Kl>
#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(471): 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"}
[2024-04-16 23:34:22] syspass.EXCEPTION: logger {"message":"(P) Unable to connect to DB
#0 /var/www/html/sysPass/lib/SP/Storage/Database/Database.php(175): SP\Storage\Database\Database->prepareQueryData(Object(SP\Storage\Database\QueryData))
#1 /var/www/html/sysPass/lib/SP/Repositories/Config/ConfigRepository.php(70): SP\Storage\Database\Database->doQuery(Object(SP\Storage\Database\QueryData))
#2 /var/www/html/sysPass/lib/SP/Services/Config/ConfigService.php(93): SP\Repositories\Config\ConfigRepository->create(Object(SP\DataModel\ConfigData))
#3 /var/www/html/sysPass/lib/SP/Services/Install/Installer.php(314): SP\Services\Config\ConfigService->create(Object(SP\DataModel\ConfigData))
#4 /var/www/html/sysPass/lib/SP/Services/Install/Installer.php(190): SP\Services\Install\Installer->saveMasterPassword()
#5 /var/www/html/sysPass/lib/SP/Services/Install/Installer.php(99): SP\Services\Install\Installer->install()
#6 /var/www/html/sysPass/app/modules/web/Controllers/InstallController.php(94): SP\Services\Install\Installer->run(Object(SP\Services\Install\InstallData))
#7 [internal function]: SP\Modules\Web\Controllers\InstallController->installAction()
#8 /var/www/html/sysPass/lib/SP/Bootstrap.php(247): call_user_func_array(Array, Array)
#9 [internal function]: SP\Bootstrap->SP\{closure}(Object(Klein\Request), Object(Klein\Response), Object(Klein\ServiceProvider), Object(Klein\App), Object(Klein\Klein), Object(Klein\DataCollection\RouteC>
#10 /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), Obj>
#11 /var/www/html/sysPass/vendor/klein/klein/src/Klein/Klein.php(588): Klein\Klein->handleRouteCallback(Object(Klein\Route), Object(Klein\DataCollection\RouteCollection), Array)
#12 /var/www/html/sysPass/lib/SP/Bootstrap.php(471): Klein\Klein->dispatch(Object(Klein\Request))
#13 /var/www/html/sysPass/lib/Base.php(75): SP\Bootstrap::run(Object(DI\Container))
#14 /var/www/html/sysPass/index.php(28): require('/var/www/html/s...')
#15 {main}","caller":"N/A"}
@frohlichcortezh
Copy link
Author

image

I'm able to connect to the DB with docker exec using the password set up in the .env with docker compose

@frohlichcortezh
Copy link
Author

Logs DB:

2024-04-16 23:33:06 123706607097600 [Warning] 'user' entry 'sp_661f0ab24a7e7@b0a6dc856541' ignored in --skip-name-resolve mode.
2024-04-16 23:33:06 123706607097600 [Warning] 'db' entry 'syspass sp_661f0ab24a7e7@b0a6dc856541' ignored in --skip-name-resolve mode.
2024-04-16 23:33:06 123706602616576 [Warning] Access denied for user 'sp_661f0ab24a7e7'@'172.20.0.3' (using password: YES)
2024-04-16 23:34:22 123706602616576 [Warning] 'user' entry 'sp_661f0afe0ed3d@b0a6dc856541' ignored in --skip-name-resolve mode.
2024-04-16 23:34:22 123706602616576 [Warning] 'user' entry 'sp_661f0afe0ed3d@b0a6dc856541' ignored in --skip-name-resolve mode.
2024-04-16 23:34:22 123706602616576 [Warning] 'db' entry 'syspass sp_661f0afe0ed3d@b0a6dc856541' ignored in --skip-name-resolve mode.
2024-04-16 23:34:22 123706607097600 [Warning] Access denied for user 'sp_661f0afe0ed3d'@'172.20.0.3' (using password: YES)

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