Re: Again, problem with pgbouncer - Mailing list pgsql-general

From raghu ram
Subject Re: Again, problem with pgbouncer
Date
Msg-id CALnrrJSz0mBNrsHzppL86HfSfuU8NyEFnnNuygxSt9keXR3FXA@mail.gmail.com
Whole thread Raw
In response to Again, problem with pgbouncer  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Responses Re: Again, problem with pgbouncer  (Phoenix Kiula <phoenix.kiula@gmail.com>)
List pgsql-general


On Mon, Oct 1, 2012 at 3:56 PM, Phoenix Kiula <phoenix.kiula@gmail.com> wrote:
Hi,

  - PG 9.0.10
  - Pgbouncer version 1.4.2

Not long ago, during the last server reboot for us, we had fixed the
really painful (and largely mysterious) process of setting up
pgbouncer.

File permissions and other mysteries were solved with help from Raghavendra:
http://permalink.gmane.org/gmane.comp.db.postgresql.pgbouncer.general/854

After a long we rebooted our server today and again, as if on cue,
pgbouncer has problems yet again :(

PG itself is running without problems.

The Pgbouncer process starts properly too. All the auth file, log file
etc are setup as mentioned in that URL above. We haven't changed
anything at all!

At first, just connecting via pgbouncer port was giving the "no user"
error. Which is funny, because the authfile has been working without
problems forever. The .pgpass file had the same problems, and is still
the same all this time.

So, upon reading that old thread again, I guessed that the "postgres"
user permissions were needed, so I did this:

  chown -R postgres:postgres /etc/pgbouncer
  chown -R postgres:postgres /var/run/pgbouncer/
  chown postgres:postgres /var/log/pgbouncer.log
  chown postgres:postgres /var/lib/pgsql/pgbouncer.txt

Then restarted both PG and Pgbouncer.

Now pgbouncer won't do anything at all. Trying to connect to psql via
the pgbouncer port gives this error:

     psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.6789"?


And in the log is this line:


     2012-10-01 06:12:00.703  3754 FATAL @src/main.c:553 in function
write_pidfile(): /var/run/pgbouncer/pgbouncer.pid: Permission denied
[13]


What now? Would appreciate some pointers.

Thanks.


Could you please check permission of /var/run/pgbouncer/ directory. If pgbouncer directory does not have "postgres" user permissions,please assign it and then start the pgbouncer. 

Looking to the error thrown by pgbouncer the port shown up as 6789, but whereas the link of pgbouncer.ini file it has 6389. Please mention appropriate port while connecting via pgbouncer and give port number which is in pgbouncer.ini file.

-- 

Thanks & Regards,

Raghu Ram

EnterpriseDB Corporation

skypeid: raghu.ramedb

Blog:http://raghurc.blogspot.in/



pgsql-general by date:

Previous
From: Phoenix Kiula
Date:
Subject: Again, problem with pgbouncer
Next
From: Andrew Hastie
Date:
Subject: Re: pg_upgrade: out of memory