LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to configure postgres 9.1 for remote access on Ubuntu 11.10 (GNU/Linux 3.0.0-1 (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-configure-postgres-9-1-for-remote-access-on-ubuntu-11-10-gnu-linux-3-0-0-1-a-928685/)

KnowGovCTO 02-10-2012 11:56 AM

Unable to configure postgres 9.1 for remote access on Ubuntu 11.10 (GNU/Linux 3.0.0-1
 
I have a dedicated 32bit Ubuntu server setup with the Nuxeo Document management platform installed with the Postgres 9.1 DB. All installs were done with apt-get.

Based upon all of my research, Postgres installs working with localhost. This is fine for Nuxeo, however, I want to do some table and trigger work and as such have been trying to configure postgres to be accessed remotely.

I have installed pgadmin III (thinking this might add additional libraries on the server and ran all updates on postgresql.

Server on my network is 192.168.1.11
am attempting to connect to it with pgAdmin from a Windows 7 desktop from ip 192.168.1.22.

all of the various solutions regarding enabling access to postgres discuss modifying two files:
postgresql.conf (adding listening addresses)
pg_hba.conf (adding authentication parameters)

I have followed all of the tutorials regarding the modifications, even resorting to the "all open" approach to get it working. However, when EVER I modify the postgresql.conf (e.g. listen addresses = '*') and attempt to restart the server (through webmin 1.580), it reports "fail", however, Nuxeo is unaffected and operates correctly. Apparently Nuxeo has a subdir under postgresql and has its own conf files of which the only difference is it uses 5433 as its port..

Please note, that when I restore the conf file to its original form, it starts correctly (or at least reports no errors).

In either case, no matter what I do, I cannot get pgadmin on windows to connect to my database server.

the files I am modifying are in: /etc/postgresql/9.1/main
nuxeo has its configurations in /etc/postgresql/9.1/nuxeo


Now to my question:
Is there a "synchronization" issue between the two different conf files?? meaning, because they are not consistent it is failing??
Of course the obvious question is, am I doing something stoopid or missing something?

Regards,

Don

kbp 02-19-2012 05:05 PM

If you attempt to start postgres from the command line do you get any more information than "fail" ?

michaelk 02-19-2012 05:25 PM

Have you configured the firewall if running to allow traffic on 5432 assuming your still using the default port?

Modifying pg_hba.conf should be all that is required for access on your network. I assume that you have restarted postgresql after making changes.

KnowGovCTO 02-19-2012 06:57 PM

I thought I had it resolved (and was going to post my solution), but I had to shut everything down to do floors in the house and it is NOT working. I am just now getting back up. I will research your (kbp and michaelk) suggestions and get back.
Thanks for responding.

Regards,

Don

cheesus 02-20-2012 12:34 PM

First of all, check if postgres is really listenting on the port you think:
# netstat -ln | grep 5432 | grep tcp
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN
tcp 0 0 :::5432 :::* LISTEN

If not: postgres must be started with "-i" option to listen to remote connections at all.
(most distros come with this pre-configured of course, but it's worth checking...)

Cheers, Tom.


All times are GMT -5. The time now is 09:13 AM.