Обсуждение: TCP/IP connection

Поиск
Список
Период
Сортировка

TCP/IP connection

От
"Dhananjay Mishra"
Дата:
 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

Re: TCP/IP connection

От
"Nick Fankhauser"
Дата:
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


Re: TCP/IP connection

От
Dhananjay Mishra
Дата:
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


Re: TCP/IP connection

От
Robert Treat
Дата:
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



Re: TCP/IP connection

От
Tom Lane
Дата:
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

Re: TCP/IP connection

От
"Dhananjay Mishra"
Дата:
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


union of two databases with same schema

От
"Dhananjay Mishra"
Дата:
I  have two databases with the same schema but different data in them. I
want to create a union of the two databases on the same server. I tried
using pg_dump. But  it creates a new database.  Please help !

Thanks and regards,
Dhananjay