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

* client connection
@ 2002-03-13 01:33 Gill, Jeffrey L <jeffrey.l.gill@intel.com>
  2002-03-13 08:55 ` Re: client connection Radu-Adrian Popescu <radu.popescu@aldratech.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Gill, Jeffrey L @ 2002-03-13 01:33 UTC (permalink / raw)
  To: pgsql-admin

I am trying to make my first connection from a client machine to a postresql
server machine.   What is the correct client command syntax to connect to
the server?  I do not want to attempt encryption yet so I am not using SSH
or stunnel - I trying the easiest configuration i.e. telnet?.

Specs:  Client RedHat 7.1  2.4.2-2 kernal everything build
            Server RedHat 7.1  2.4.2-2 kernal everything build with
Interchange 4.8 

Both of these hosts are on the same subnet and can ping each other.

I am learning Linux and Postgresql from scratch.

I have started the postmaster with '-i' option to allow TCP/IP connections.

I used the following command to do this and am using port 8888 to avoid lock
with port 5432. 
Not sure if I have to do this but I show a message saying 5432 was locked.  

pg_ctl -D /home/jeff/test -o '-i -p 8888'  restart

I edited the pg_hba.conf to allow any host from this subnet to connect i.e.
host	all	10.240.22.0 	255.255.255.0 	trust

The way I tried to connect as the client to the server was
telnet 10.240.22.203 8888

The response I get is 
Connected 10.240.22.203
Escape character is '^]'.

When I hit the return key I get
Invalid packet length Connection closed by foreign host.

What am I doing wrong or what else do I need to do?

Thanks,
Jeff




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

* Re: client connection
  2002-03-13 01:33 client connection Gill, Jeffrey L <jeffrey.l.gill@intel.com>
@ 2002-03-13 08:55 ` Radu-Adrian Popescu <radu.popescu@aldratech.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Radu-Adrian Popescu @ 2002-03-13 08:55 UTC (permalink / raw)
  To: Gill, Jeffrey L <jeffrey.l.gill@intel.com>; +Cc: pgsql-admin

On Wed, 2002-03-13 at 03:33, Gill, Jeffrey L wrote:

    I am trying to make my first connection from a client machine to a postresql
    server machine.   What is the correct client command syntax to connect to
    the server?  I do not want to attempt encryption yet so I am not using SSH
    or stunnel - I trying the easiest configuration i.e. telnet?.
    
    Specs:  Client RedHat 7.1  2.4.2-2 kernal everything build
                Server RedHat 7.1  2.4.2-2 kernal everything build with
    Interchange 4.8 
    
    Both of these hosts are on the same subnet and can ping each other.
    
    I am learning Linux and Postgresql from scratch.
    
    I have started the postmaster with '-i' option to allow TCP/IP connections.
    
    I used the following command to do this and am using port 8888 to avoid lock
    with port 5432. 
    Not sure if I have to do this but I show a message saying 5432 was locked.  
    
    pg_ctl -D /home/jeff/test -o '-i -p 8888'  restart
    
    I edited the pg_hba.conf to allow any host from this subnet to connect i.e.
    host	all	10.240.22.0 	255.255.255.0 	trust
    
    The way I tried to connect as the client to the server was
    telnet 10.240.22.203 8888
    
    The response I get is 
    Connected 10.240.22.203
    Escape character is '^]'.
    
    When I hit the return key I get
    Invalid packet length Connection closed by foreign host.
    
    What am I doing wrong or what else do I need to do?

Pardon my asking, but do you telnet www.postgresql.org 80 or do you use
a web browser ?
What you're doing wrong is that you're trying to act as a postgresql
client, instead of the default one (psql) or any other (say JDBC-based).
The postgresql protocol is propetary and you cannot simply telnet on
it's port and expect to get right on with whatever is it you want to do.
USE
A CLIENT instead.
You can however quickly verify that it accepts inbound TCP/IP
connections.


    
    Thanks,
    Jeff
    
    
    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?
    

Regards,

--
Radu-A. Popescu 
CSA, DBA, Developer
www.aldratech.com

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

* Re: client connection
@ 2002-03-13 11:59 Henshall, Stuart - WCP <SHenshall@westcountrypublications.co.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Henshall, Stuart - WCP @ 2002-03-13 11:59 UTC (permalink / raw)
  To: 'Gill, Jeffrey L' <jeffrey.l.gill@intel.com>; pgsql-admin

You need to use psql to connect
eg:
psql -h 10.240.22.203 -p 8888 -U postgres -d template1
This is assumeing you used initdb as the postgres user.
If you haven't used initdb the command is:
initdb -D /usr/local/pgsql/data
Replace this with wherever you want to place it
I suspect the as port 5432 is locked you either have another postmaster
already running, or some left over lock files (in /tmp). There's a
postgresql tutorial in the docs.
- Stuart

> -----Original Message-----
> From: Gill, Jeffrey L [mailto:jeffrey.l.gill@intel.com]
> Sent: 13 March 2002 01:34
> To: Pgsql Admin (E-mail)
> Subject: client connection
> 
> 
> I am trying to make my first connection from a client machine 
> to a postresql
> server machine.   What is the correct client command syntax 
> to connect to
> the server?  I do not want to attempt encryption yet so I am 
> not using SSH
> or stunnel - I trying the easiest configuration i.e. telnet?.
> 
> Specs:  Client RedHat 7.1  2.4.2-2 kernal everything build
>             Server RedHat 7.1  2.4.2-2 kernal everything build with
> Interchange 4.8 
> 
> Both of these hosts are on the same subnet and can ping each other.
> 
> I am learning Linux and Postgresql from scratch.
> 
> I have started the postmaster with '-i' option to allow 
> TCP/IP connections.
> 
> I used the following command to do this and am using port 
> 8888 to avoid lock
> with port 5432. 
> Not sure if I have to do this but I show a message saying 
> 5432 was locked.  
> 
> pg_ctl -D /home/jeff/test -o '-i -p 8888'  restart
> 
> I edited the pg_hba.conf to allow any host from this subnet 
> to connect i.e.
> host	all	10.240.22.0 	255.255.255.0 	trust
> 
> The way I tried to connect as the client to the server was
> telnet 10.240.22.203 8888
> 
> The response I get is 
> Connected 10.240.22.203
> Escape character is '^]'.
> 
> When I hit the return key I get
> Invalid packet length Connection closed by foreign host.
> 
> What am I doing wrong or what else do I need to do?
> 
> Thanks,
> Jeff
> 
> 



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


end of thread, other threads:[~2002-03-13 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-13 01:33 client connection Gill, Jeffrey L <jeffrey.l.gill@intel.com>
2002-03-13 08:55 ` Radu-Adrian Popescu <radu.popescu@aldratech.com>
2002-03-13 11:59 Re: client connection Henshall, Stuart - WCP <SHenshall@westcountrypublications.co.uk>

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