MrMEEE / awx-rpm-v2

AWX-RPM Reignited
GNU Affero General Public License v3.0
36 stars 11 forks source link

Rocky 9.3 and DB Auth Error #19

Closed sadsfae closed 7 months ago

sadsfae commented 7 months ago

Hello, thank you for putting together this project.

I'm hitting the following issue with authentication during the initial playbook installation and database access for the awx user.

"django.db.utils.OperationalError: connection failed: password authentication failed for user \"awx\""], "stdout": 

The problem is how /var/lib/pgsql/data/pg_hba.conf comes configured in that you need this adjustment:

#local   all             all                                     peer
local    all             all                                     md5

Then, restart Postgres.

I had tested logging in via the awx user manually with psql -U awx and before this it gave me psql: error: FATAL: Peer authentication failed for user "awx" After this change I can login manually and the playbook proceed past this task, I'll report back if it completes 100% and I can send you a PR.

MrMEEE commented 7 months ago

Hmmm.. I don't understand why this shouldn't be working..

Are you using the playbook? The playbook replaces the pg_hba.conf with a version that should be working..

Feel free to submit a PR if you figure out something

sadsfae commented 7 months ago

Hmmm.. I don't understand why this shouldn't be working..

Are you using the playbook? The playbook replaces the pg_hba.conf with a version that should be working..

Aye I see it does here: https://github.com/MrMEEE/awx-rpm-v2/blob/main/ansible/awx-rpm/files/pg_hba.conf#L84 but I needed to change peer to md5 for L84.

Feel free to submit a PR if you figure out something

Thanks will do, still waiting to see how things complete with a fresh VM since before I manually made the change, restarted postgres and logged in manually for awx user (and set the password too via ALTER).

sadsfae commented 7 months ago

I wasn't able to reproduce this again, it's probably something I did. Going to close this now.