Thread: Add server error
Hi there, I have problem to add server by using the IP address like 192.168.xxx.xxx. It says the server refused to listen. I followedthe guide by adding the line at the pg-hba but still the same. Also, when I'm using the psqlodbc from the client machine, I can't connect. I can only connect using the Odbc when I'm atthe local. Hope you can give me some insight. Thanks, Nicole.
<br /><br /><div class="gmail_quote">On Wed, Dec 23, 2009 at 15:39, Nicole Lim <span dir="ltr"><<a href="mailto:nicole.lim@ocean-is.com">nicole.lim@ocean-is.com</a>></span>wrote:<br /><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi there,<br /><br /> Ihave problem to add server by using the IP address like 192.168.xxx.xxx. It says the server refused to listen. I followedthe guide by adding the line at the pg-hba but still the same.<br /> Also, when I'm using the psqlodbc from the clientmachine, I can't connect. I can only connect using the Odbc when I'm at the local.<br /><br /> Hope you can give mesome insight.<br /><br /> Thanks,<br /> Nicole.<br /><font color="#888888"></font><br /></blockquote></div><br />Checkfile postgresql.conf on the server. There are 2 settings, listen_addresses and port, which define where the serverwill be listening to connections. Default is localhost on port 5432.<br /> You should change it to:<br /><br /><divstyle="margin-left: 40px;">listen_addresses = '*' # means listen on every IP<br />port = 5432 #change only if its being used already by other apps<br /></div><br /> Afterwards, verify the line you added to pg_hba.conflooks like this:<br /><br /><div style="margin-left: 40px;">host all all <a href="http://192.168.0.0/16">192.168.0.0/16</a> md5<br /></div><br />This will enable a client from network 192.168.x.xto connect with any user to any database. MD5 password check will be enforced.<br /><br />Regards,<br />Fernando.<br/>
> Check file postgresql.conf on the server. And check your firewall. ----------------------------------------------- Quan Zongliang quanzongliang@gmail.com
Thanks Fernando. I got it.
Before that, I followed the documentation, using 192.168.0.0/24 and it didn't work. Now it works.
Merry Christmas!
Nicole Lim
Check file postgresql.conf on the server. There are 2 settings, listen_addresses and port, which define where the server will be listening to connections. Default is localhost on port 5432.
You should change it to:
Afterwards, verify the line you added to pg_hba.conf looks like this:
This will enable a client from network 192.168.x.x to connect with any user to any database. MD5 password check will be enforced.
Regards,
Fernando.
Before that, I followed the documentation, using 192.168.0.0/24 and it didn't work. Now it works.
Merry Christmas!
Nicole Lim
From: Fernando Hevia <fhevia@gmail.com>
Date: Wed, 23 Dec 2009 18:46:44 -0300
To: <nicole.lim@ocean-is.com>
Cc: <pgadmin-support@postgresql.org>
Subject: Re: [pgadmin-support] Add server error
On Wed, Dec 23, 2009 at 15:39, Nicole Lim <nicole.lim@ocean-is.com> wrote:
Hi there,
I have problem to add server by using the IP address like 192.168.xxx.xxx. It says the server refused to listen. I followed the guide by adding the line at the pg-hba but still the same.
Also, when I'm using the psqlodbc from the client machine, I can't connect. I can only connect using the Odbc when I'm at the local.
Hope you can give me some insight.
Thanks,
Nicole.
Check file postgresql.conf on the server. There are 2 settings, listen_addresses and port, which define where the server will be listening to connections. Default is localhost on port 5432.
You should change it to:
listen_addresses = '*' # means listen on every IP
port = 5432 # change only if its being used already by other apps
port = 5432 # change only if its being used already by other apps
Afterwards, verify the line you added to pg_hba.conf looks like this:
host all all 192.168.0.0/16 md5
This will enable a client from network 192.168.x.x to connect with any user to any database. MD5 password check will be enforced.
Regards,
Fernando.