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

Re: reg:conninfo

From: "Andy Shellam" <andy(dot)shellam(at)mailnetwork(dot)co(dot)uk>
To: "'sandhya'" <sandhyar(at)amiindia(dot)co(dot)in>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: reg:conninfo
Date: 2006-03-20 09:52:48
Message-ID: !&! (view raw or whole thread)
Lists: pgsql-admin

You have mentioned 3 different IP addresses for your server in this topic so

Your pg_hba.conf entry says "" - which means only that IP can
connect - the IP address/range in pg_hba.conf should be your client IP (if
this is on the same server as PGSQL, the best way is to use (the
system default localhost IP)).

Your application appears to be trying to connect to, which is
different to the one you've just said your server is

Do an "ifconfig" on the console and find out what network adapters there are
in your server, and what IPs they're bound to - then in your postgresql.conf
bind PostgreSQL to one of them (if you have multiple adapters) (using the
listen_address=... option - then you can use that IP to specify as the
connection IP in your application.

But you need to get some consistency in the IPs your server is listening on,
and your application is trying to connect to.


-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of sandhya
Sent: Monday, 20 March, 2006 9:49 AM
To: Robin Iddon
Cc: Postgres
Subject: Re: [ADMIN] reg:conninfo

Thanks Robin.
What u said is right!
But my problem is i am not trying connecting from any remote client.

In my ConnectionInfo if i mention the host as,
host=localhost.The connection is successful.

But the same if i give my localsystem IP where my server is running..
host = localhost IP).
The Connection is failed.
Why is this so?Whether i need to give only localhost in my application (or)
why it is not accepting when i gave IP of the same system(When the entry of
this IP is already present in pg_hba.conf file)?

----- Original Message ----- 
From: "Robin Iddon" <robin(at)edesix(dot)com>
To: "sandhya" <sandhyar(at)amiindia(dot)co(dot)in>
Cc: "Postgres" <pgsql-admin(at)postgresql(dot)org>
Sent: Monday, March 20, 2006 2:28 PM
Subject: Re: [ADMIN] reg:conninfo

> Try looking at the manual for the postmaster process ...
> A simple way of achieving what you want is adding the -i option to the
> postmaster command line which allows TCP/IP connections.  Otherwise only
> localhost can connect.
> There are possibly other ways of configuring this same option, but we
> use the -i on the command line to the postmaster process.
> Hope this helps,
> Robin
> sandhya wrote:
> >hi,
> >
> >   I am using postgres8.0.3 on windows.When i am compiling a small sample
i am facing problem in connection information.
> >
> >I have given entry in my pg_hba.conf file:
> >host            all             all       
> >
> >And in my application when i pass host in conninfo as,
> >host= is not connecting..and throwing error  like,
> >Is server running on
> >But when i give as,
> >host=localhost..It is running fine.
> >After each change i am doing pg_reload.
> >What i need to do inorder to mention the IP in my application instead of
> >Please tell me.
> >
> >Thank you,
> >Sandhya
> >
> >
> >
> >
> >
> >

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


In response to

pgsql-admin by date

Next:From: Andy ShellamDate: 2006-03-20 10:18:27
Subject: Re: reg:conninfo
Previous:From: sandhyaDate: 2006-03-20 09:48:33
Subject: Re: reg:conninfo

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