pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ConnecDB() -- couldn't send SSL negotiation packet:
6+ messages / 2 participants
[nested] [flat]

* ConnecDB() -- couldn't send SSL negotiation packet:
@ 2001-06-26 13:54 Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-05 13:47 ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Bhuvan A @ 2001-06-26 13:54 UTC (permalink / raw)
  To: pgsql-sql


hi,

While i am trying to connect pgsql from a perl program, i am
getting the error message as

ConnectDB()  -- couldn't send SSL negotiation packet:
errno=9 Bad file descriptor

Why i am getting this error?
How can i rectify this problem?

Remember, i am socksifying my application for some necessary
reason.






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

* Re: ConnecDB() -- couldn't send SSL negotiation packet:
  2001-06-26 13:54 ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
@ 2001-07-05 13:47 ` Richard Huxton <dev@archonet.com>
  2001-07-06 04:42   ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Richard Huxton @ 2001-07-05 13:47 UTC (permalink / raw)
  To: Bhuvan A <bhuvanbk@yahoo.com>; pgsql-sql

From: "Bhuvan A" <bhuvanbk@yahoo.com>

> While i am trying to connect pgsql from a perl program, i am
> getting the error message as
>
> ConnectDB()  -- couldn't send SSL negotiation packet:
> errno=9 Bad file descriptor

Are you checking return values from whatever connect/open call you make? It
sounds like the client end is trying to negotiate a connection over a
non-existent socket.

What Perl module are you using?

Can you show some code?

- Richard Huxton




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

* Re: ConnecDB() -- couldn't send SSL negotiation packet:
  2001-06-26 13:54 ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-05 13:47 ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
@ 2001-07-06 04:42   ` Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-06 07:07     ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Bhuvan A @ 2001-07-06 04:42 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: Bhuvan A <bhuvanbk@yahoo.com>; pgsql-sql


Well, I am using the perl standard module 'Pg'. For your
kind attention, I am socksifying my application, since we
are here using proxy!

On Thu, 5 Jul 2001, Richard Huxton wrote:

> From: "Bhuvan A" <bhuvanbk@yahoo.com>
> 
> > While i am trying to connect pgsql from a perl program, i am
> > getting the error message as
> >
> > ConnectDB()  -- couldn't send SSL negotiation packet:
> > errno=9 Bad file descriptor
> 
> Are you checking return values from whatever connect/open call you make? It
> sounds like the client end is trying to negotiate a connection over a
> non-existent socket.
> 
> What Perl module are you using?
> 
> Can you show some code?
> 
> - Richard Huxton
> 




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

* Re: ConnecDB() -- couldn't send SSL negotiation packet:
  2001-06-26 13:54 ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-05 13:47 ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  2001-07-06 04:42   ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
@ 2001-07-06 07:07     ` Richard Huxton <dev@archonet.com>
  2001-07-06 08:48       ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Richard Huxton @ 2001-07-06 07:07 UTC (permalink / raw)
  To: Bhuvan A <bhuvanbk@yahoo.com>; +Cc: pgsql-sql

Bhuvan A wrote:
> 
> Well, I am using the perl standard module 'Pg'. For your
> kind attention, I am socksifying my application, since we
> are here using proxy!

Right - can you post the 10 lines of code or so leading up to where the
error occurs?

- Richard Huxton



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

* Re: ConnecDB() -- couldn't send SSL negotiation packet:
  2001-06-26 13:54 ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-05 13:47 ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  2001-07-06 04:42   ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-06 07:07     ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
@ 2001-07-06 08:48       ` Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-06 10:10         ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Bhuvan A @ 2001-07-06 08:48 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: pgsql-sql


Well, here is the part of my code where i am trying to
connect to database server which uses the perl module 'Pg'.


$db    =   'user=bhuvan dbname=bhuvan host=localhost';
$conn  =  Pg::connectdb($db);
die "Sorry! DATABASE CONNECTION FAILED\n",
	$conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status;
print "db connection SUCCESSFUL\n";


Here is again the output:

Sorry! DATABASE CONNECTION FAILED
connectDB() -- couldn't send SSL negotiation packet: errno=9
Bad file descriptor

255 returned

--------END---------


MISC: Sir, why my message is not getting posted in pgsql-sql
mailing list!

On Fri, 6 Jul 2001, Richard Huxton wrote:

> Bhuvan A wrote:
> > 
> > Well, I am using the perl standard module 'Pg'. For your
> > kind attention, I am socksifying my application, since we
> > are here using proxy!
> 
> Right - can you post the 10 lines of code or so leading up to where the
> error occurs?
> 
> - Richard Huxton
> 




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

* Re: ConnecDB() -- couldn't send SSL negotiation packet:
  2001-06-26 13:54 ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-05 13:47 ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  2001-07-06 04:42   ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
  2001-07-06 07:07     ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Richard Huxton <dev@archonet.com>
  2001-07-06 08:48       ` Re: ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
@ 2001-07-06 10:10         ` Richard Huxton <dev@archonet.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Richard Huxton @ 2001-07-06 10:10 UTC (permalink / raw)
  To: Bhuvan A <bhuvanbk@yahoo.com>; +Cc: pgsql-sql

From: "Bhuvan A" <bhuvanbk@yahoo.com>

> Well, here is the part of my code where i am trying to
> connect to database server which uses the perl module 'Pg'.
>
>
> $db    =   'user=bhuvan dbname=bhuvan host=localhost';
> $conn  =  Pg::connectdb($db);
> die "Sorry! DATABASE CONNECTION FAILED\n",
> $conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status;
> print "db connection SUCCESSFUL\n";
>
>
> Here is again the output:
>
> Sorry! DATABASE CONNECTION FAILED
> connectDB() -- couldn't send SSL negotiation packet: errno=9
> Bad file descriptor

Well - a quick peek at the source shows this error is generated exactly
where you'd expect - in the client connection routines.

It looks like negotiating SSL is the first thing it does after connecting,
and the "Bad file descriptor" doesn't look promising either. BUT - the
initial connection was opened satisfactorily.

Poking around on google turns up a lot of pages for "bad file descriptor"
and adding "socks" gives a fair list including:

  malik.bishkek.su/doc/UNIX/socks/socksfaq.htm

20. What causes the log message "Bind failed for xxx.xxx.xxx.xxx: ..."?
[Top]
This log message occurs when the SOCKS server tries to bind to a port in use
by another process. For example, another SOCKS server is running or inetd is
listening to the port. Use the ps command to find and terminate the other
process or check /etc/inetd.conf for a conflicting entry.
Most UNIX systems return EADDRINUSE, address is already in use. Some
systems, including Linux, return EBADF, bad file descriptor. Although the
messages and codes differ, the source of the problem is that the port is in
use.

Check your socks logfile and see if this is the root of the problem. I'm
assuming pre-socks everything worked fine with Pg?

HTH

- Richard Huxton




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


end of thread, other threads:[~2001-07-06 10:10 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-26 13:54 ConnecDB() -- couldn't send SSL negotiation packet: Bhuvan A <bhuvanbk@yahoo.com>
2001-07-05 13:47 ` Richard Huxton <dev@archonet.com>
2001-07-06 04:42   ` Bhuvan A <bhuvanbk@yahoo.com>
2001-07-06 07:07     ` Richard Huxton <dev@archonet.com>
2001-07-06 08:48       ` Bhuvan A <bhuvanbk@yahoo.com>
2001-07-06 10:10         ` Richard Huxton <dev@archonet.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