Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66AXMa83540 for ; Fri, 6 Jul 2001 06:33:22 -0400 (EDT) (envelope-from dev@archonet.com) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 15ISvW-000P3w-0W; Fri, 6 Jul 2001 11:33:35 +0100 Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id ECD4C129B4; Fri, 6 Jul 2001 11:10:37 +0100 (BST) Message-ID: <003901c10603$e70de2c0$1001a8c0@archonet.com> From: "Richard Huxton" To: "Bhuvan A" Cc: References: Subject: Re: ConnecDB() -- couldn't send SSL negotiation packet: Date: Fri, 6 Jul 2001 11:10:34 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200107/57 X-Sequence-Number: 3838 From: "Bhuvan A" > 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