TurnKey Linux Virtual Appliance Library

Access to PostgreSQL from PGPAdmin III

Peter Goodall's picture

Hi,

I am using the LAPP VM in VMware 7.x Workstation, on Windows Vista. I've followed the instructions in "How to allow remote access to databases" and still cannot connect to postgres from PGPAdmin. I scanned my virtual machine using Zenmap and did not find the 5432 port open.

Is there something I have to do in Linux to open the port for access from within my home network?

 

Thanks,

--PeterG

Peter Goodall's picture

NMap Scan Results

See... No postgres port open - getting nowhere, v. frustrating

Scanning x.x.x.x [65535 ports]
Discovered open port 443/tcp on x.x.x.x
Discovered open port 22/tcp on x.x.x.x
Discovered open port 80/tcp on x.x.x.x
Discovered open port 20000/tcp on x.x.x.x
Discovered open port 12322/tcp on x.x.x.x
Discovered open port 12320/tcp on x.x.x.x
Discovered open port 12321/tcp on x.x.x.x
Completed SYN Stealth Scan at 16:02, 5.83s elapsed (65535 total ports)

Please let me know if I have missed some basic documentation...

Cheers,

--Peter G

Alon Swartz's picture

Double check your postgresql.conf

Make sure that postgresql.conf is configured to listen on all interfaces as described here.

Something like this:

/etc/postgresql/8.3/main/postgresql.conf
listen_addresses = '*'

Also, don't forget to restart the postgres service for the change to take effect.

You can see what ports are "listening" locally on the LAPP appliance like this:

netstat -tan

If you are still having trouble, please post your postgresql.conf

Peter Goodall's picture

Fixed

Thanks Alon,

There are none so blind...

I had left the listen_addresses line commented out. I'm newish at this *nix stuff and haven't got my inbuilt parser trained. I also got sidetracked by reading problems with MySQL root user not having permissions  for anywhere except localhost created another user etc.etc.... Apologies for wasting your time.

Also needed to change IPV4  in pg_hba.conf to accept connections on all hosts - exactly as in user documentation 'How to allow remote access to databases'.

With thanks,

--Peter G

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)