-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Peer authentication failed for user "postgres" on initial chef run (reboot + 2nd run works fine) #232
Comments
I'm having a similar issue - Creating databases in the same Chef run as configuring postgresql seems to me like a regular usecase. +1 |
I experienced this on 3.4.14 but can not reproduce this on 3.4.20. So it seems to be fixed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am trying to setup a fairly simple Vagrantfile that boots a VM with postgresql and creates a couple of users and databases using hw-cookbooks/database. In the end I need access to the database from the host machine, so I change the
pg_hba.conf
by setting a couple of attributes in the Vagrantfile:Now, when I boot the VM for the first time I get
FATAL: Peer authentication failed for user "postgres"
. When I reboot the VM and run chef again everything works as it should, but I destroy and reprovision the VM a couple of times per month and it's just cumbersome.I also see this in my log:
So my guess is this has to do with the service notification having been changed from
:immediately
to:delayed
and therefore when I try to create the users and databases during the initial convergence run the defaultpg_hba.conf
is still in effect.Am I doing something wrong? Help would be appreciated.
The text was updated successfully, but these errors were encountered: