Giter Site home page Giter Site logo

Comments (6)

idanshimon avatar idanshimon commented on August 18, 2024 1

I discovered this issue after this error msg:

msg: unable to connect to database: FATAL: Peer authentication failed for user "postgres"

After checking my pg_hba configuration and seeing nothing was wrong with that i started to suspect the ansible role parameters. I've done the process manually and noticed the service is never really restarted.

This is the root cause for a lot of users who have Peer authentication error for default user postgres even after setting postgres user as "trust" (in the pg_hba file). Since the role cannot restart the database the pg_hba settings file is never applied - this can cause other major problems as well !

To workaround this issue simply set the following vars:

vars:
    postgresql_version: "9.6"
    postgresql_daemon: "postgresql@{{ postgresql_version }}-main"

I hope this post can help others

from ansible-role-postgresql.

tavinus avatar tavinus commented on August 18, 2024

This also applies to Debian Jessie with Postgres9.4.
On the few times we had reboots the postgres server did not come back.
Can't reboot right now but I enabled the @9.4 service with:

sudo systemctl enable [email protected]

from ansible-role-postgresql.

AlexGluck avatar AlexGluck commented on August 18, 2024

Tomorrow i check this issue and PR with fix. Thx

from ansible-role-postgresql.

AlexGluck avatar AlexGluck commented on August 18, 2024

I done fix for this in PR #47

from ansible-role-postgresql.

geerlingguy avatar geerlingguy commented on August 18, 2024

Testing a fix locally for Debian 8/9.

from ansible-role-postgresql.

DanielJulian avatar DanielJulian commented on August 18, 2024

THANK YOU SO MUCH!! Having this issue with postgresql-11 in ubuntu 18

from ansible-role-postgresql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.