Question

This pgbouncer.ini setting can't start pgbouncer:

[databases]
mydb = host=127.0.0.1 port=5432 dbname=mydb

[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = md5
auth_file = userlist.txt
logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
admin_users = someuser

No pid file generated, no log file created. No process running(ps aux | grep pgbouncer).

But if set logfile and pidfile to:

logfile = pgbouncer.log
pidfile = pgbouncer.pid

pgbouncer can be started by run pgbouncer -d pgbouncer.ini. It will create log file and pid file at the same path of pgbouncer.ini.

I am using normal user doing it.

Was it helpful?

Solution

Either you don't have permission to write to /var/log/pgbouncer as the user you are running as, or the directory doesn't exist and pgbouncer doesn't or can't create it.

A third possibility is that the permissions on that directory are TOO relaxed, but I don't think pgbouncer checks that.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top