2
votes

I have a postgresql server running on a remote debian box. postgresql is running on unix socket dir /var/run/postgresql. I also have pgbouncer running on port 6432. I also have 6432 open for tcp connections as below ACCEPT tcp -- anywhere anywhere tcp dpt:6432

In spite of this, when i try connecting from pgadmin, i get the following message - could not connect to server: Connection refused (0x0000274D/10061). Is the server running on host "x.x.x.x" and accepting TCP/IP connections on port 6432?

Can you pls help..

1
I opened up port 5432 using iptables and now i can connect through that port. But dont know why i cannot connect via 6432 through pgbouncer..mongle
did you configure pgbouncer? What's in listen_addr ?Daniel Vérité
I didnt have to reconfigure pgbouncer. listen_addr = *mongle
I can also connect via pgbouncer using the command line like so - psql -p 6432 -U test -d testmongle
netstat -tln|grep 6432 would show how it listens. I'd expect it to listen only at 127.0.0.1Daniel Vérité

1 Answers

4
votes

Connections to pgbouncer through pgAdmin do not appear to be supported. I was able to get past the error above by changing listen_addr = *. (After changing the listen_addr, RELOAD is not sufficient, you must SHUTDOWN and then restart pgbouncer.) However, I then get a series of errors that basically indicate that system database objects are not exposed when connecting to pgbouncer. pgAdmin cannot function without data from these objects.