Re: ConnecDB() -- couldn't send SSL negotiation packet:

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: ConnecDB() -- couldn't send SSL negotiation packet:
Дата
Msg-id 003901c10603$e70de2c0$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на Re: ConnecDB() -- couldn't send SSL negotiation packet:  (Bhuvan A <bhuvanbk@yahoo.com>)
Список 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: While Using COPY COMMAND ...
Следующее
От: Morgan Curley
Дата:
Сообщение: Cross database foreign keys