mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
Connecting to Postgres via Unix socket does not appear to work #491
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mpalmer on GitHub (May 2, 2024).
I'm trying to configure Planka to connect to Postgres over a Unix socket, rather than TCP (because that saves on stuffing around with passwords and such, since I can just use peer auth). After trying a bunch of different formats for
DATABASE_URLthat work with Postgres clients in other languages (postgresql://planka@/planka,postgresql://planka@localhost/planka?host=/var/run/postgresql, and even old-schooldatabase=planka user=planka host=/var/run/postgresqlconnection string), and also using thePG*environment variables, but every time they all failed with a TCP connection tolocalhostand "password authentication failed". Finally, with reference to thepg-connection-stringdocs I was finally able to get past that error by using the formsocket://planka@/var/run/postgresql?db=planka, and now I have a new and interesting behaviour: the database setup seems to (half?) run, over a Unix socket, but then something tries to connect over TCP and the wheels fall off again.The logs from the Postgres container:
As you can see, the first connection at 05:24:38 is over a Unix socket, and succeeds, then the next at 05:25:16 fails because it's over TCP and I'm not using a password. After a couple of minutes of head-scratching, I restarted the
plankacontainer, which caused the second pair of connections, where again the first succeeds over a Unix socket at 05:27:11, but fails because it appears to be retrying the DB setup process. Then again there's a TCP connection at 05:27:15 which fails.Here are the corresponding Planka container logs, which appear (to me) to merely corroborate the Postgres logs:
@satonotdead commented on GitHub (Oct 4, 2024):
Hello, did you figured it out?