Error appearing in /var/log/pgbouncer/pgbouncer.log: WARNING Cannot listen on unix:/run/postgresql/.s.PGSQL.6432: bind(): Permission denied Turns out that the pgbouncer daemon needs run under the "postgres" group in order to create a file in that directory. Problem solved in my overlay: https://github.com/stefantalpalaru/gentoo-overlay
That is interesting. I haven't run into that issue, and it doesn't make much sense as the pgbouncer system user is put into a single system group: postgres. What does `groups pgbouncer` return for you?
> What does `groups pgbouncer` return for you? $ groups pgbouncer pgbouncer > the pgbouncer system user is put into a single system group: postgres Only for initial installs of the package after you added the "enewuser pgbouncer -1 -1 -1 postgres" line to the ebuild. The previously existing "pgbouncer" user keeps its "pgbouncer" group.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68521fe516d66a94851bf09352e6155d5a1347a6 commit 68521fe516d66a94851bf09352e6155d5a1347a6 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-08-28 10:09:03 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-08-28 10:09:03 +0000 dev-db/pgbouncer: Specify group to run under Bug: https://bugs.gentoo.org/654136 Package-Manager: Portage-2.3.40, Repoman-2.3.9 dev-db/pgbouncer/files/pgbouncer.initd-r2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d6096a26797a9a97098db1da96a61c894197ab0 commit 9d6096a26797a9a97098db1da96a61c894197ab0 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-10-03 01:41:26 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-10-03 01:59:43 +0000 dev-db/pgbouncer: Cleanup Closes: https://bugs.gentoo.org/654136 Package-Manager: Portage-2.3.49, Repoman-2.3.10 Signed-off-by: Aaron Swenson <titanofold@gentoo.org> dev-db/pgbouncer/Manifest | 1 - dev-db/pgbouncer/files/pgbouncer.confd | 12 ----- dev-db/pgbouncer/files/pgbouncer.initd-r1 | 83 ----------------------------- dev-db/pgbouncer/pgbouncer-1.8.1.ebuild | 86 ------------------------------- 4 files changed, 182 deletions(-)