pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
client connection problem
4+ messages / 3 participants
[nested] [flat]

* client connection problem
@ 2002-01-16 13:52  Rasmus Mohr <rmo@Netpointers.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Rasmus Mohr @ 2002-01-16 13:52 UTC (permalink / raw)
  To: pgsql-admin

Hmmm... I've installed PostgreSQL 7.1.3 with the Red Hat 7.2 installation
package, and everything works fine when connecting from localhost as the
postgres user, but when I try to connect via TCP I get the usual
"connectDBStart() -- ..." error suggesting that postmaster was started
without the "-i" option.

"-i" is added to /etc/init.d/postgresql - a "ps ax | grep postmaster"
confirms this. The pg_hba.conf has modified to allow incoming connections
from the subnet, as shown

... 
host         all         192.168.1.164   255.255.255.0     trust
host         all         192.168.1.150   255.255.255.0     trust
host         all         192.168.1.0     255.255.255.0     trust
...

and I've set "tcpip_socket=true" in the postgresql.conf file...

Yet I'm unable to establish a connection - what is wrong?

(nmap confirms that postgresql is listening at port 5432)

-----------------------------------------------------------
Rasmus T. Mohr            Phone   :          +45 70 117 117
Application Developer     Direct  :          +45 36 910 122
Netpointers Intl.         Mobile  :          +45 28 731 827
Vestergade 18 B           Website :     www.netpointers.com      
1456 Copenhagen K         Email   :     rmo@netpointers.com



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: client connection problem
@ 2002-01-16 14:14  Nick Fankhauser <nickf@ontko.com>
  parent: Rasmus Mohr <rmo@Netpointers.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Nick Fankhauser @ 2002-01-16 14:14 UTC (permalink / raw)
  To: Rasmus Mohr <rmo@Netpointers.com>; pgsql-admin

Rasmus-

Try adding a line to pg_hba.conf for localhost specifically- I'd guess that
the request is coming in with that address rather than the local machine's
IP address.

use a line like this:

host   all   127.0.0.1   255.0.0.0   trust

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/



> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Rasmus Mohr
> Sent: Wednesday, January 16, 2002 8:52 AM
> To: 'pgsql-admin@postgresql.org'
> Subject: [ADMIN] client connection problem
>
>
> Hmmm... I've installed PostgreSQL 7.1.3 with the Red Hat 7.2 installation
> package, and everything works fine when connecting from localhost as the
> postgres user, but when I try to connect via TCP I get the usual
> "connectDBStart() -- ..." error suggesting that postmaster was started
> without the "-i" option.
>
> "-i" is added to /etc/init.d/postgresql - a "ps ax | grep postmaster"
> confirms this. The pg_hba.conf has modified to allow incoming connections
> from the subnet, as shown
>
> ...
> host         all         192.168.1.164   255.255.255.0     trust
> host         all         192.168.1.150   255.255.255.0     trust
> host         all         192.168.1.0     255.255.255.0     trust
> ...
>
> and I've set "tcpip_socket=true" in the postgresql.conf file...
>
> Yet I'm unable to establish a connection - what is wrong?
>
> (nmap confirms that postgresql is listening at port 5432)
>
> -----------------------------------------------------------
> Rasmus T. Mohr            Phone   :          +45 70 117 117
> Application Developer     Direct  :          +45 36 910 122
> Netpointers Intl.         Mobile  :          +45 28 731 827
> Vestergade 18 B           Website :     www.netpointers.com
> 1456 Copenhagen K         Email   :     rmo@netpointers.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: client connection problem
@ 2002-01-16 15:51  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Nick Fankhauser <nickf@ontko.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2002-01-16 15:51 UTC (permalink / raw)
  To: nickf@ontko.com; +Cc: Rasmus Mohr <rmo@Netpointers.com>; pgsql-admin

"Nick Fankhauser" <nickf@ontko.com> writes:
> Try adding a line to pg_hba.conf for localhost specifically- I'd guess that
> the request is coming in with that address rather than the local machine's
> IP address.

Another possibility is that the connection request is being dropped on
the floor by kernel packet filtering.  The default filtering in RH 7.2
is pretty aggressive (just the other day I had to change quite a few
things to get it to allow incoming and outgoing NFS, for example).
Check your ipchains setup in /etc/sysconfig/ipchains.

IIRC, the default ipchains setup does *not* filter localhost
connections, but I think it would apply to connections showing a source
address of your Ethernet IP.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: client connection problem
@ 2002-01-17 10:35  Rasmus Mohr <rmo@Netpointers.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Rasmus Mohr @ 2002-01-17 10:35 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Bullseye! Packet filtering was the problem, and was solved by allowing
packets destined to port 5432 in ipchains.

thanx a lot!

-----Oprindelig meddelelse-----
Fra: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]På vegne af Tom Lane
Sendt: 16. januar 2002 16:52
Til: nickf@ontko.com
Cc: Rasmus Mohr; pgsql-admin@postgresql.org
Emne: Re: [ADMIN] client connection problem 


"Nick Fankhauser" <nickf@ontko.com> writes:
> Try adding a line to pg_hba.conf for localhost specifically- I'd guess
that
> the request is coming in with that address rather than the local machine's
> IP address.

Another possibility is that the connection request is being dropped on
the floor by kernel packet filtering.  The default filtering in RH 7.2
is pretty aggressive (just the other day I had to change quite a few
things to get it to allow incoming and outgoing NFS, for example).
Check your ipchains setup in /etc/sysconfig/ipchains.

IIRC, the default ipchains setup does *not* filter localhost
connections, but I think it would apply to connections showing a source
address of your Ethernet IP.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-01-17 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-16 13:52 client connection problem Rasmus Mohr <rmo@Netpointers.com>
2002-01-16 14:14 ` Nick Fankhauser <nickf@ontko.com>
2002-01-16 15:51   ` Tom Lane <tgl@sss.pgh.pa.us>
2002-01-17 10:35 Re: client connection problem Rasmus Mohr <rmo@Netpointers.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox