Postgresql-HA oc_admin pool_passwd issue
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 534
- Forks
- 314
- Avg merge
- 42m
- Merged PRs (30d)
- 1
Description
I have this issue pool_passwd file does not contain an entry for "oc_admin" when creating an instance with postgresql-ha cluster
Next OC\DB\Exceptions\DbalException: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] FATAL: md5 authentication failed
Wed, Nov 2 2022 12:51:40 am | DETAIL: pool_passwd file does not contain an entry for "oc_admin" in /var/www/html/lib/private/DB/Exceptions/DbalException.php:71
Wed, Nov 2 2022 12:51:40 am | Stack trace:
Wed, Nov 2 2022 12:51:40 am | #0 /var/www/html/lib/private/DB/ConnectionAdapter.php(59): OC\DB\Exceptions\DbalException::wrap(Object(Doctrine\DBAL\Exception))
Wed, Nov 2 2022 12:51:40 am | #1 /var/www/html/lib/private/legacy/OC_DB.php(55): OC\DB\ConnectionAdapter->prepare('SHOW SERVER_VER...', NULL, NULL)
Wed, Nov 2 2022 12:51:40 am | #2 /var/www/html/lib/private/legacy/OC_DB.php(128): OC_DB::prepare('SHOW SERVER_VER...', NULL, NULL)
Wed, Nov 2 2022 12:51:40 am | #3 /var/www/html/lib/private/legacy/OC_Util.php(759): OC_DB::executeAudited(Array)
Wed, Nov 2 2022 12:51:40 am | #4 /var/www/html/lib/private/legacy/OC_Util.php(739): OC_Util::checkDatabaseVersion()
Wed, Nov 2 2022 12:51:40 am | #5 /var/www/html/lib/private/Console/Application.php(157): OC_Util::checkServer(Object(OC\SystemConfig))
Wed, Nov 2 2022 12:51:40 am | #6 /var/www/html/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Wed, Nov 2 2022 12:51:40 am | #7 /var/www/html/occ(11): require_once('/var/www/html/c...')
Wed, Nov 2 2022 12:51:40 am | #8 {main}Retrying install...
Wed, Nov 2 2022 12:51:51 am | An unhandled exception has been thrown:
Wed, Nov 2 2022 12:51:51 am | Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] FATAL: md5 authentication failed
Wed, Nov 2 2022 12:51:51 am | DETAIL: pool_passwd file does not contain an entry for "oc_admin" in /var/www/html/lib/private/DB/Connection.php:139
Wed, Nov 2 2022 12:51:51 am | Stack trace:
Wed, Nov 2 2022 12:51:51 am | #0 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
Wed, Nov 2 2022 12:51:51 am | #1 /var/www/html/3rdparty/doctrine/dbal/src/Statement.php(73): Doctrine\DBAL\Connection->getWrappedConnection()
Wed, Nov 2 2022 12:51:51 am | #2 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1016): Doctrine\DBAL\Statement->__construct('SHOW SERVER_VER...', Object(OC\DB\Connection))
Wed, Nov 2 2022 12:51:51 am | #3 /var/www/html/lib/private/DB/Connection.php(238): Doctrine\DBAL\Connection->prepare('SHOW SERVER_VER...')
Wed, Nov 2 2022 12:51:51 am | #4 /var/www/html/lib/private/DB/ConnectionAdapter.php(56): OC\DB\Connection->prepare('SHOW SERVER_VER...', NULL, NULL)
Wed, Nov 2 2022 12:51:51 am | #5 /var/www/html/lib/private/legacy/OC_DB.php(55): OC\DB\ConnectionAdapter->prepare('SHOW SERVER_VER...', NULL, NULL)
Wed, Nov 2 2022 12:51:51 am | #6 /var/www/html/lib/private/legacy/OC_DB.php(128): OC_DB::prepare('SHOW SERVER_VER...', NULL, NULL)
Wed, Nov 2 2022 12:51:51 am | #7 /var/www/html/lib/private/legacy/OC_Util.php(759): OC_DB::executeAudited(Array)
Wed, Nov 2 2022 12:51:51 am | #8 /var/www/html/lib/private/legacy/OC_Util.php(739): OC_Util::checkDatabaseVersion()
Wed, Nov 2 2022 12:51:51 am | #9 /var/www/html/lib/private/Console/Application.php(157): OC_Util::checkServer(Object(OC\SystemConfig))
Wed, Nov 2 2022 12:51:51 am | #10 /var/www/html/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Wed, Nov 2 2022 12:51:51 am | #11 /var/www/html/occ(11): require_once('/var/www/html/c...')
Wed, Nov 2 2022 12:51:51 am | #12 {main}
Since pgpool requires to specify a list of users and passwords in the pool_passwd file; For some reason, the nextcloud installation process internally creates an oc_admin user (maybe password genered here), but pgpool won't recognize it until it is added to this pool_passwd file with the password the user was created with.
Everything seems to work fine with the mariadb-galera cluster; so this is an issue only for postgresql-ha cluster.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the Helm chart's PostgreSQL HA and pgpool configuration, then compare it with the referenced lib/private/Setup/PostgreSQL.php setup path and the reported connection errors. Reproduce installation with PostgreSQL HA; done means the generated oc_admin credentials are accepted by pgpool and the Nextcloud instance completes installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, postgresql
- Domain
- database, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100