Postgres 8.4 — connection refused (remote)

Posted on

Question :

I’m new to postgres and looking to set up a small environment here with it.

I’ve installed PostgreSQL 8.4 onto an ubuntu server, able to login to the postgres, submit commands, do queries, etc… however, I’m looking at using pgAdminIII from my windows machine.

I’ve followed along with the instructions from the ubuntu help page and made the following two changes:

In pg_hba.conf I have added the line (using other IP information, which should be fine as it’s tested elsewhere):

host all all trust

in postgresql.conf I had originaly set listen_address = 'localhost,', but changed to listen_address = '*' out of frustration after reading this guide.

How should I configure my listen files here so that postgres isn’t listening to * ?

Answer :

The is the address of your client. What you need to put into listen_addresses is an address on the server. If you don’t want to use *, then it should be the address of the server on the same network as the client. In this case this would probably be some other 10.* address. Check with /sbin/ifconfig or ip addr list what address that would be on your host.

Maybe you just need to restart your Postgres server or reload the configuration, you can do it with:

pg_ctl -D yourDBpath -o -i reload

Also the “-o -i” tells the Postgres server to activate tcp/ip connections.

Leave a Reply

Your email address will not be published. Required fields are marked *