Skip site navigation (1) Skip section navigation (2)

Re: Unable to connect to a server

From: Bob McConnell <rmcconne(at)lightlink(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Unable to connect to a server
Date: 2008-11-12 12:07:24
Message-ID: 491AC6FC.5030703@lightlink.com (view raw or flat)
Thread:
Lists: 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


In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2008-11-12 13:27:20
Subject: Re: Unable to connect to a server
Previous:From: A. KretschmerDate: 2008-11-12 10:51:02
Subject: Re: Unable to connect to a server

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group