Received: from www.aldratech.com (unknown [213.157.162.9]) by postgresql.org (Postfix) with ESMTP id EA773475902 for ; Wed, 13 Mar 2002 03:52:15 -0500 (EST) Subject: Re: client connection From: Radu-Adrian Popescu To: "Gill, Jeffrey L" Cc: "Pgsql Admin (E-mail)" In-Reply-To: <01BDB7EEF8D4D3119D95009027AE999511DD2CD5@FMSMSX33> References: <01BDB7EEF8D4D3119D95009027AE999511DD2CD5@FMSMSX33> Content-Type: multipart/alternative; boundary="=-Rejr5Mixzy63YSylcL3B" X-Mailer: Evolution/1.0.2 Date: 13 Mar 2002 10:55:18 +0200 Message-Id: <1016009718.1217.5.camel@rpopescu> Mime-Version: 1.0 Received: from rpopescu ([192.168.0.6]) by mail.aldratech.com (JAMES SMTP Server 1.2.1rc2) with SMTP ID 170; Wed, 13 Mar 2002 10:49:55 +0200 X-Archive-Number: 200203/159 X-Sequence-Number: 3693 --=-Rejr5Mixzy63YSylcL3B Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-Rejr5Mixzy63YSylcL3B Content-Type: text/html; charset=utf-8 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
--=-Rejr5Mixzy63YSylcL3B--