pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
TCP/IP connection
9+ messages / 7 participants
[nested] [flat]

* TCP/IP connection
@ 2003-05-21 10:42  Dhananjay Mishra <dmishra@vt.edu>
  0 siblings, 2 replies; 9+ messages in thread

From: Dhananjay Mishra @ 2003-05-21 10:42 UTC (permalink / raw)
  To: pgsql-admin

 I am trying to open the server for TCP/IP connection. My server is RedHat 7.2(postgresql-7.1.3).My question is - Is it necessary to edit  etc/rc.d/init.d/postgresql  and appened -i and -o options in postgres start script line. 

I am trying to acheive this by changing the tcp-connaction flag in postgresql.conf file in data directory. But it does not seem to be working on this platform. But I used to do the same on Solaris and it perfectly worked. 

Please suggest/comment!

Thanks and Best Regards,
-----------------------------------------------------------------------------------
Dhananjay Mishra (dmishra@vt.edu)
Graduate Student, Department Of Computer Science
Virginia Tech
-----------------------------------------------------------------------------------
"This one step -- choosing a goal and sticking to it -- changes everything." 
-Scott Reed 

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

* Re: TCP/IP connection
@ 2003-05-21 19:13  Nick Fankhauser <nickf@ontko.com>
  parent: Dhananjay Mishra <dmishra@vt.edu>
  1 sibling, 0 replies; 9+ messages in thread

From: Nick Fankhauser @ 2003-05-21 19:13 UTC (permalink / raw)
  To: Dhananjay Mishra <dmishra@vt.edu>; pgsql-admin


A few thoughts:

Setting tcpip_socket = 1 on postgresql.conf should do the job.

Is there any chance that a link from the data directory is making your
postamaster look in a different location for the file? For instance, in most
debian installs, postgresql.conf lives in /etc/postgresql, with a link to it
form the data dir. I'm unfamiliar with rehat, bu perhaps something similar
is occuring.

Also, are you sure it isn't working? perhaps there is an auth problem in
pg_hba.conf that causes it to deny access or some network-related issue if
you're connecting from another box.

Have you tried connecting from the same box using psql -h<host> ?

-Nick



-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Dhananjay Mishra
Sent: Wednesday, May 21, 2003 5:42 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] TCP/IP connection


 I am trying to open the server for TCP/IP connection. My server is RedHat
7.2(postgresql-7.1.3).My question is - Is it necessary to edit
etc/rc.d/init.d/postgresql  and appened -i and -o options in postgres start
script line.

I am trying to acheive this by changing the tcp-connaction flag in
postgresql.conf file in data directory. But it does not seem to be working
on this platform. But I used to do the same on Solaris and it perfectly
worked.

Please suggest/comment!

Thanks and Best Regards,
----------------------------------------------------------------------------
-------
Dhananjay Mishra (dmishra@vt.edu)
Graduate Student, Department Of Computer Science
Virginia Tech
----------------------------------------------------------------------------
-------
"This one step -- choosing a goal and sticking to it -- changes everything."
-Scott Reed




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

* Re: TCP/IP connection
@ 2003-05-21 20:14  Dhananjay Mishra <dmishra@vt.edu>
  0 siblings, 1 reply; 9+ messages in thread

From: Dhananjay Mishra @ 2003-05-21 20:14 UTC (permalink / raw)
  To: pgsql-admin

Thanks for the response. I have all the client IPs added in hba.conf. Also 
postgresql.conf and hba.conf both reside inside pgdata(data) directory. which 
is used with -D option as data directory while starting the postmaster. So I 
do not think it's a problem with authentication. As its giving error " Is the 
postmaster running with -i option and accepting TCP/IP connection at port 
5432? " And ofcourse  I am restarting the postmaster after each of the changes 
tried.

Moreover please note that, I have tried setting tcpip_socket= true  in 
postgresl.conf on Solaris and it works just fine. I am having problem with 
RedHat only.

comments /suggestions invited.
Thanks 
Dhananjay
>===== Original Message From nickf@ontko.com =====
>A few thoughts:
>
>Setting tcpip_socket = 1 on postgresql.conf should do the job.
>
>Is there any chance that a link from the data directory is making your
>postamaster look in a different location for the file? For instance, in most
>debian installs, postgresql.conf lives in /etc/postgresql, with a link to it
>form the data dir. I'm unfamiliar with rehat, bu perhaps something similar
>is occuring.
>
>Also, are you sure it isn't working? perhaps there is an auth problem in
>pg_hba.conf that causes it to deny access or some network-related issue if
>you're connecting from another box.
>
>Have you tried connecting from the same box using psql -h<host> ?
>
>-Nick
>
>
>
>-----Original Message-----
>From: pgsql-admin-owner@postgresql.org
>[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Dhananjay Mishra
>Sent: Wednesday, May 21, 2003 5:42 AM
>To: pgsql-admin@postgresql.org
>Subject: [ADMIN] TCP/IP connection
>
>
> I am trying to open the server for TCP/IP connection. My server is RedHat
>7.2(postgresql-7.1.3).My question is - Is it necessary to edit
>etc/rc.d/init.d/postgresql  and appened -i and -o options in postgres start
>script line.
>
>I am trying to acheive this by changing the tcp-connaction flag in
>postgresql.conf file in data directory. But it does not seem to be working
>on this platform. But I used to do the same on Solaris and it perfectly
>worked.
>
>Please suggest/comment!
>
>Thanks and Best Regards,
>----------------------------------------------------------------------------
>-------
>Dhananjay Mishra (dmishra@vt.edu)
>Graduate Student, Department Of Computer Science
>Virginia Tech
>----------------------------------------------------------------------------
>-------
>"This one step -- choosing a goal and sticking to it -- changes everything."
>-Scott Reed




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

* Re: TCP/IP connection
@ 2003-05-21 21:00  Robert Treat <xzilla@users.sourceforge.net>
  parent: Dhananjay Mishra <dmishra@vt.edu>
  1 sibling, 0 replies; 9+ messages in thread

From: Robert Treat @ 2003-05-21 21:00 UTC (permalink / raw)
  To: Dhananjay Mishra <dmishra@vt.edu>; +Cc: pgsql-admin

On Wed, 2003-05-21 at 06:42, Dhananjay Mishra wrote:
>  I am trying to open the server for TCP/IP connection. My server is
> RedHat 7.2(postgresql-7.1.3).My question is - Is it necessary to edit
> etc/rc.d/init.d/postgresql  and appened -i and -o options in postgres
> start script line. 
>  
> I am trying to acheive this by changing the tcp-connaction flag in
> postgresql.conf file in data directory. But it does not seem to be
> working on this platform. But I used to do the same on Solaris and it
> perfectly worked. 
>  

That should work ok, but make sure you restart your postmaster after
making the change.

Robert Treat





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

* Re: TCP/IP connection
@ 2003-05-22 02:22  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Dhananjay Mishra <dmishra@vt.edu>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2003-05-22 02:22 UTC (permalink / raw)
  To: Dhananjay Mishra <dmishra@vt.edu>; +Cc: pgsql-admin

Dhananjay Mishra <dmishra@vt.edu> writes:
>> I am trying to open the server for TCP/IP connection. My server is RedHat
>> 7.2(postgresql-7.1.

Recent versions of Red Hat (I think as far back as 7.2) have fairly
draconian packet filtering installed by default.  Are you getting a
"connection refused" error, rather than a Postgres-ish "no pg_hba entry"
error?  If the former, your problem is probably that the kernel is
configured not to allow any traffic to port 5432.  You'll need to poke 
a hole in the filtering rules.

			regards, tom lane



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

* Re: TCP/IP connection
@ 2003-05-22 02:28  Dhananjay Mishra <dmishra@vt.edu>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 9+ messages in thread

From: Dhananjay Mishra @ 2003-05-22 02:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: bhuvan@symonds.net; nickf@ontko.com; pgsql-admin


I am able to track down the problem now. But still I need some help. The
host machine has a firewall and it accepts only ssh (not rsh) connections. I
was wondering if I could use ssh tunneling somehow. I tried tunneling ; but
still it waits for server to respond. Please help !

Thanks and best regards,
Dhananjay


> Dhananjay Mishra <dmishra@vt.edu> writes:
> >> I am trying to open the server for TCP/IP connection. My server is
RedHat
> >> 7.2(postgresql-7.1.
>
> Recent versions of Red Hat (I think as far back as 7.2) have fairly
> draconian packet filtering installed by default.  Are you getting a
> "connection refused" error, rather than a Postgres-ish "no pg_hba entry"
> error?  If the former, your problem is probably that the kernel is
> configured not to allow any traffic to port 5432.  You'll need to poke
> a hole in the filtering rules.
>
> regards, tom lane




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

* TCP/IP connection
@ 2003-12-05 11:52  Ashok Chauhan <ashok@kalculate.com>
  0 siblings, 2 replies; 9+ messages in thread

From: Ashok Chauhan @ 2003-12-05 11:52 UTC (permalink / raw)
  To: pgsql-admin

hi

i want to accsess my postgresql data base from network it is only
possible when i start postgresql by following command:-
postmaster -i -D /var/lib/pgsql/data
after rebooting the system it does not listen for TCP/IP connection.
how can i configure it for listening TCP/IP connection after rebooting.
plz help me.







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

* Re: TCP/IP connection
@ 2003-12-05 12:53  Devrim GUNDUZ <devrim@gunduz.org>
  parent: Ashok Chauhan <ashok@kalculate.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Devrim GUNDUZ @ 2003-12-05 12:53 UTC (permalink / raw)
  To: Ashok Chauhan <ashok@kalculate.com>; +Cc: pgsql-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

On 5 Dec 2003, Ashok Chauhan wrote:

> i want to accsess my postgresql data base from network it is only
> possible when i start postgresql by following command:-
> postmaster -i -D /var/lib/pgsql/data
> after rebooting the system it does not listen for TCP/IP connection.
> how can i configure it for listening TCP/IP connection after rebooting.

edit /var/lib/pgsql/data/postgresql.conf .

Uncomment tcpip_socket option and set it to true.

tcpip_socket = true

Then PostgreSQL will listen to 5432, its default port. If you need to 
change it, edit port option.

You need to restart PostgreSQL for the changes to take effect when you 
edit the conf file.

Regards,
- -- 
Devrim GUNDUZ
devrim@gunduz.org				devrim.gunduz@linux.org.tr 
			http://www.TDMSoft.com
			http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/0H+ytl86P3SPfQ4RAk4jAKDJnSM1LpyRDrsr7sYAl5wEPhKXHgCeI17v
W0nWFKNJcHk8g1eK8cCByJ4=
=xYyw
-----END PGP SIGNATURE-----




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

* Re: TCP/IP connection
@ 2003-12-05 12:54  Frank Finner <postgresql@finner.de>
  parent: Ashok Chauhan <ashok@kalculate.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Frank Finner @ 2003-12-05 12:54 UTC (permalink / raw)
  To: pgsql-admin-owner@postgresql.org; +Cc: pgsql-admin

On Fri, 5 Dec 2003 17:22:55 +0530
pgsql-admin-owner@postgresql.org wrote:

> hi
> 
> i want to accsess my postgresql data base from network it is only
> possible when i start postgresql by following command:-
> postmaster -i -D /var/lib/pgsql/data
> after rebooting the system it does not listen for TCP/IP connection.
> how can i configure it for listening TCP/IP connection after
> rebooting. plz help me.
> 

In postgresql.conf, set tcpip_socket = true.

Regards, Frank



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


end of thread, other threads:[~2003-12-05 12:54 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 10:42 TCP/IP connection Dhananjay Mishra <dmishra@vt.edu>
2003-05-21 19:13 ` Nick Fankhauser <nickf@ontko.com>
2003-05-21 21:00 ` Robert Treat <xzilla@users.sourceforge.net>
2003-05-21 20:14 Re: TCP/IP connection Dhananjay Mishra <dmishra@vt.edu>
2003-05-22 02:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-05-22 02:28   ` Dhananjay Mishra <dmishra@vt.edu>
2003-12-05 11:52 TCP/IP connection Ashok Chauhan <ashok@kalculate.com>
2003-12-05 12:53 ` Devrim GUNDUZ <devrim@gunduz.org>
2003-12-05 12:54 ` Frank Finner <postgresql@finner.de>

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