lundi 29 décembre 2014

pgbouncer startup problem


I foolowed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup.


When i start pgbouncer, meet err "Cannot open logfile: 'pgbouncer.log': Permission denied"


rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -v pgbouncer.ini 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [databases] 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '' = 'host=localhost port=5432 user=$USER' 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '' = 'host=localhost port=5432 user=$USER' ok:1 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [pgbouncer] 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' 2014-12-29 15:39:31.046 18299 FATAL Cannot open logfile: 'pgbouncer.log': Permission denied


When i start pgbouncer with sudo got "@src/main.c:736 in function main(): PgBouncer should not run as root".


rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ sudo pgbouncer -d -v pgbouncer.ini 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [databases] 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '' = 'host=localhost port=5432 user=$USER' 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '' = 'host=localhost port=5432 user=$USER' ok:1 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [pgbouncer] 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' ok:1 2014-12-29 15:39:54.862 18302 FATAL @src/main.c:736 in function main(): PgBouncer should not run as root


and my pgbouncer.ini file is:


[databases] * = host=localhost port=5432 user=$USER


[pgbouncer] listen_port = 5433 listen_addr = localhost auth_type = any logfile = pgbouncer.log pidfile = pgbouncer.pid



Aucun commentaire:

Enregistrer un commentaire