문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top