Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654136 - dev-db/pgbouncer-1.8.1 - Error appearing in /var/log/pgbouncer/pgbouncer.log: WARNING Cannot listen on unix:/run/postgresql/.s.PGSQL.6432: bind(): Permission denied
Summary: dev-db/pgbouncer-1.8.1 - Error appearing in /var/log/pgbouncer/pgbouncer.log:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on: 667412
Blocks:
  Show dependency tree
 
Reported: 2018-04-26 16:37 UTC by Ștefan Talpalaru
Modified: 2018-10-03 02:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ștefan Talpalaru 2018-04-26 16:37:24 UTC
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
Comment 1 Aaron W. Swenson gentoo-dev 2018-04-28 11:20:06 UTC
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?
Comment 2 Ștefan Talpalaru 2018-04-28 11:27:08 UTC
> 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.
Comment 3 Larry the Git Cow gentoo-dev 2018-08-28 10:09:17 UTC
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(-)
Comment 4 Larry the Git Cow gentoo-dev 2018-10-03 02:00:03 UTC
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(-)