Re: Unable to connect to a server - Mailing list pgsql-novice

From Bob McConnell
Subject Re: Unable to connect to a server
Date
Msg-id 491AC6FC.5030703@lightlink.com
Whole thread Raw
In response to Re: Unable to connect to a server  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: Unable to connect to a server
List pgsql-novice
A. Kretschmer wrote:
> am  Tue, dem 11.11.2008, um 17:37:35 -0800 mailte Steve Henry folgendes:
>> I'm a newbie, using the Mac platform.
>>
>> I've installed PostgreSQL on a server and can run PostgreSQL based
>> application from that server with no problem.  But when I try to
>> access the DB on a different computer, pointing to the server for the
>> log in, I get this error:
>>
>> A connection to the specified xTuple ERP Server cannot be made. This
>> may be due to an incorrect Username and/or Password or the server in
>> question cannot support any more connections.
>> Please verify your Username and Password and try again or wait until
>> the specified xTuple ERP Server is less busy.
>> System Error
>> QPSQL: Unable to connect
>>
>> From doing some reading, I think the solution is to change the value
>> of  listen_addresses to '*'
>
> Not only that, you should also edit your pg_hba.conf to allow remote
> access.
>
>
>> But I don't know where to do that.  I'm using pgAdmin3.  Can it be
>> done there?  Or do I need to use Terminal?
>
> I'm not familiar with PGAdmin...

pgAdmin will not edit the correct files for you. You need to open them
on that server with a text editor to modify those settings. Then you
need to restart postgres, also on that server. You don't say what OS
that server is running, so I can't help any further. However, I suggest
that instead of setting the address to '*', you use the subnet and mask
for your local network. That way if someone gets access to it from the
Internet, they can't connect to your database server. In my case that
would be:

postgres.conf
-------------
listen_address = 'localhost,172.16.10.13'

pg_hba.conf
-----------
# IP4 local connections:
host    all    all    172.16.10.0/24    trust

You may also want to set a different security level rather than trust. I
am the only user on my network, so 'trust' works for me. That's not what
we use on the servers at work.

Bob McConnell
N2SPP


pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Unable to connect to a server
Next
From: Tom Lane
Date:
Subject: Re: Unable to connect to a server