My question is similar but opposite to to Telnetting the Local port not working but trying the ip workingFor me, telnet to the local port works but trying with IP does not work :(I am running pgbouncer on port 6432:$ telnet 192.x.x.x 6432Trying 192.x.x.x...telnet: Unable to connect to remote host: Connection refusedI set listen_addr = *, but still using telnet with IP from another server is not working.See http://lists.pgfoundry.org/pipermail/pgbouncer-general/2013-January/001097.html for the same scenario (but no useful answer).The output of netstat -plnt is tcp 0 0 127.0.0.1:6432 0.0.0.0:* LISTEN 19879/./pgbouncerHow can I fix this?
Telnetting the local port working but trying with ip not working
ip;hostname;hosts;telnet;connection sharing
A quick Google shows that recommended safe configurations for pgbouncer often set up the listening port only on the loopback interface (localhost). Here is one example:[pgbouncer]listen_port = 5433listen_addr = localhostauth_type = anylogfile = pgbouncer.logpidfile = pgbouncer.pidThe configuration documentation explains clearly how to change the addresses on which the service listens:listen_addrSpecifies list of addresses, where to listen for TCP connections. You  may also use * meaning listen on all addresses. When not set, only  Unix socket connections are allowed.Addresses can be specified numerically (IPv4/IPv6) or by name.Default: not setlisten_portWhich port to listen on. Applies to both TCP and Unix sockets.Default: 6432Since you've now responded that you've already done this, I'll leave it here for the record, but make an additional suggestion below.The follow-up posts on the mailing list to the one you referenced provide the answer. I'll quote it here:User 1I restarted using /etc/init.d/pgbouncer restart, which effectively  launches pgbouncer with -R for a online restart.User 2I suspect the -R is working too well for you - it reuses the old  listening socket, with means the bind address stays the same.This preference is natural - you rarely change bind addres, but may  change other settings (or pgbouncer version).You should just do proper stop/start, then it should take new address in use.